From 1e2caa6cbec890319fdcc3151c019dc1fa7f69c1 Mon Sep 17 00:00:00 2001 From: IvoPaunov Date: Fri, 3 Jan 2025 15:42:21 +0200 Subject: [PATCH] Updates --- asset-manifest.json | 8 +-- index.html | 2 +- .../js/{main.17e44980.js => main.3da73875.js} | 6 +- ...CENSE.txt => main.3da73875.js.LICENSE.txt} | 0 ...n.17e44980.js.map => main.3da73875.js.map} | 2 +- ...-logo.92dadc4292f71fe361154f665a2374a4.svg | 57 +++++++++++++++++++ ...rezor.472fec0c475c4354ace6aa2989c47b04.svg | 3 - 7 files changed, 66 insertions(+), 12 deletions(-) rename static/js/{main.17e44980.js => main.3da73875.js} (68%) rename static/js/{main.17e44980.js.LICENSE.txt => main.3da73875.js.LICENSE.txt} (100%) rename static/js/{main.17e44980.js.map => main.3da73875.js.map} (69%) create mode 100644 static/media/ambire-logo.92dadc4292f71fe361154f665a2374a4.svg delete mode 100644 static/media/trezor.472fec0c475c4354ace6aa2989c47b04.svg diff --git a/asset-manifest.json b/asset-manifest.json index 66830927..fa264f3a 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { "main.css": "/static/css/main.0a9a3ed9.css", - "main.js": "/static/js/main.17e44980.js", + "main.js": "/static/js/main.3da73875.js", "static/js/895.c321996c.chunk.js": "/static/js/895.c321996c.chunk.js", "static/js/155.ba7f7d05.chunk.js": "/static/js/155.ba7f7d05.chunk.js", "static/js/171.9c7140f3.chunk.js": "/static/js/171.9c7140f3.chunk.js", @@ -14,6 +14,7 @@ "static/media/tom-ic.svg": "/static/media/tom-ic.ead3492170ecabb3a0f0f4f268121d3b.svg", "static/media/mail-awards.svg": "/static/media/mail-awards.6b55170223ca289099a37de5c2639d97.svg", "static/media/coming-soon-ic.svg": "/static/media/coming-soon-ic.f2c9d90a53e6429dfcf9aeb33e3c1a9a.svg", + "static/media/ambire-logo.svg": "/static/media/ambire-logo.92dadc4292f71fe361154f665a2374a4.svg", "static/media/staking-logo.svg": "/static/media/staking-logo.21667c7e4019b957419eed64d8e95e36.svg", "static/media/logo-light-theme.svg": "/static/media/logo-light-theme.5f1bbb9a678123b2d08667742c591e3f.svg", "static/media/uniswap-uni-logo.svg": "/static/media/uniswap-uni-logo.9926de98d27951ef18be1c12a5f9dff0.svg", @@ -37,14 +38,13 @@ "static/media/eth-logo.svg": "/static/media/eth-logo.6ed0ea41fa24212880f966f62f464d23.svg", "static/media/leave-ic.svg": "/static/media/leave-ic.4df057e3e5c6c108bd6e01d199fb987a.svg", "static/media/balancer-bal-logo.svg": "/static/media/balancer-bal-logo.228c66875372f5e3042b87eb6ac72867.svg", - "static/media/trezor.svg": "/static/media/trezor.472fec0c475c4354ace6aa2989c47b04.svg", "static/media/url.svg": "/static/media/url.5a5d63ef2614ca679b9f3592705cbfcd.svg", "static/media/info.svg": "/static/media/info.fe3466678d1a10a8839f86746eba3708.svg", "static/media/stats-ic.svg": "/static/media/stats-ic.f59b96c781c0e3cfc02bc23b1dcfd1fc.svg", "static/media/chain-link-logo.svg": "/static/media/chain-link-logo.fed269c702d271ea2fa608bcf6c8e154.svg", "static/media/getFetch.cjs": "/static/media/getFetch.40f37ddea2378391108f.cjs", "main.0a9a3ed9.css.map": "/static/css/main.0a9a3ed9.css.map", - "main.17e44980.js.map": "/static/js/main.17e44980.js.map", + "main.3da73875.js.map": "/static/js/main.3da73875.js.map", "155.ba7f7d05.chunk.js.map": "/static/js/155.ba7f7d05.chunk.js.map", "171.9c7140f3.chunk.js.map": "/static/js/171.9c7140f3.chunk.js.map", "400.b5068637.chunk.js.map": "/static/js/400.b5068637.chunk.js.map", @@ -52,6 +52,6 @@ }, "entrypoints": [ "static/css/main.0a9a3ed9.css", - "static/js/main.17e44980.js" + "static/js/main.3da73875.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index e695834e..0a23ff1e 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.17e44980.js b/static/js/main.3da73875.js similarity index 68% rename from static/js/main.17e44980.js rename to static/js/main.3da73875.js index 5a5ef3db..74a84622 100644 --- a/static/js/main.17e44980.js +++ b/static/js/main.3da73875.js @@ -1,3 +1,3 @@ -/*! For license information please see main.17e44980.js.LICENSE.txt */ -(()=>{var e={79004:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=79004,e.exports=t},18297:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=18297,e.exports=t},40014:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(44931),n=a(98295),c=a(53536),d=a(54154),o=/^0x[0-9A-F]*$/i;t.assert={isBigNumber:function(e,a){var r=n.BigNumber.isBigNumber(a);t.assert.assert(r,t.assert.typeAssertionMessage(e,"BigNumber",a))},isValidBaseUnitAmount:function(e,a){t.assert.isBigNumber(e,a);var r=a.isLessThan(0);t.assert.assert(!r,e+" cannot be a negative number, found value: "+a.toNumber());var n=0!==a.decimalPlaces();t.assert.assert(!n,e+" should be in baseUnits (no decimals), found value: "+a.toNumber())},isString:function(e,a){t.assert.assert(c.isString(a),t.assert.typeAssertionMessage(e,"string",a))},isFunction:function(e,a){t.assert.assert(c.isFunction(a),t.assert.typeAssertionMessage(e,"function",a))},isHexString:function(e,a){t.assert.assert(c.isString(a)&&o.test(a),t.assert.typeAssertionMessage(e,"HexString",a))},isETHAddressHex:function(e,a){t.assert.assert(c.isString(a),t.assert.typeAssertionMessage(e,"string",a)),t.assert.assert(n.addressUtils.isAddress(a),t.assert.typeAssertionMessage(e,"ETHAddressHex",a))},doesBelongToStringEnum:function(e,a,r){var n=c.values(r),d=c.includes(n,a),o=c.map(n,(function(e){return"'"+e+"'"})).join(", ");t.assert.assert(d,"Expected "+e+" to be one of: "+o+", encountered: "+a)},hasAtMostOneUniqueValue:function(e,a){t.assert.assert(c.uniq(e).length<=1,a)},isNumber:function(e,a){t.assert.assert(c.isFinite(a),t.assert.typeAssertionMessage(e,"number",a))},isNumberOrBigNumber:function(e,a){c.isFinite(a)||t.assert.assert(n.BigNumber.isBigNumber(a),t.assert.typeAssertionMessage(e,"number or BigNumber",a))},isBoolean:function(e,a){t.assert.assert(c.isBoolean(a),t.assert.typeAssertionMessage(e,"boolean",a))},isWeb3Provider:function(e,a){n.logUtils.warn("DEPRECATED: Please use providerUtils.standardizeOrThrow() instead");var r=c.isFunction(a.send)||c.isFunction(a.sendAsync);t.assert.assert(r,t.assert.typeAssertionMessage(e,"Provider",a))},doesConformToSchema:function(e,a,n,d){if(void 0===a)throw new Error(e+" can't be undefined");var o=new r.SchemaValidator;void 0!==d&&c.map(d,o.addSchema.bind(o));var i=o.validate(a,n),f=i.errors.length>0,s="Expected "+e+" to conform to schema "+n.id+"\nEncountered: "+JSON.stringify(a,null,"\t")+"\nValidation errors: "+i.errors.join(", ");t.assert.assert(!f,s)},isWebUri:function(e,a){var r=void 0!==d.isWebUri(a);t.assert.assert(r,t.assert.typeAssertionMessage(e,"web uri",a))},isUri:function(e,a){var r=void 0!==d.isUri(a);t.assert.assert(r,t.assert.typeAssertionMessage(e,"uri",a))},isBlockParam:function(e,a){if(!(Number.isInteger(a)&&a>=0)&&"earliest"!==a&&"latest"!==a&&"pending"!==a)throw new Error(t.assert.typeAssertionMessage(e,"BlockParam",a))},isArray:function(e,a){if(!Array.isArray(a))throw new Error(t.assert.typeAssertionMessage(e,"Array",a))},assert:function(e,t){if(!e)throw new Error(t)},typeAssertionMessage:function(e,t,a){return"Expected "+e+" to be of type "+t+", encountered: "+a}}},44931:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(32877);t.ValidatorResult=r.ValidatorResult;var n=a(47245);t.SchemaValidator=n.SchemaValidator;var c=a(22383);t.schemas=c.schemas},47245:function(e,t,a){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&e[Symbol.iterator],a=0;return t?t.call(e):{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var n=a(32877),c=a(32231),d=a(22383),o=function(){function e(){var t,a;this._validator=new n.Validator;try{for(var o=r(c(d.schemas)),i=o.next();!i.done;i=o.next()){var f=i.value;e._assertSchemaDefined(f),this._validator.addSchema(f,f.id)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(a=o.return)&&a.call(o)}finally{if(t)throw t.error}}}return e._assertSchemaDefined=function(e){if(void 0===e)throw new Error("Cannot add undefined schema")},e.prototype.addSchema=function(t){e._assertSchemaDefined(t),this._validator.addSchema(t,t.id)},e.prototype.validate=function(t,a){e._assertSchemaDefined(a);var r=JSON.parse(JSON.stringify(t));return this._validator.validate(r,a)},e.prototype.isValid=function(e,t){return 0===this.validate(e,t).errors.length},e}();t.SchemaValidator=o},22383:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(22247),n=a(38548),c=a(8766),d=a(99638),o=a(80600),i=a(82394),f=a(55706),s=a(38419),b=a(39424),l=a(22265),u=a(14412),h=a(7930),p=a(76496),x=a(43694),m=a(67263),g=a(12062),v=a(59762),y=a(50451),w=a(40170),k=a(29105),I=a(28886),_=a(94683),A=a(88193),E=a(336),S=a(95286),N=a(99410),M=a(35867),H=a(77822),T=a(12329),P=a(67976),R=a(4009),C=a(69544),O=a(306),D=a(47625),B=a(57418),L=a(92290),j=a(84884),U=a(39413),F=a(78388),z=a(10691),q=a(38112),W=a(93864),V=a(23558),K=a(7708);t.schemas={numberSchema:h,addressSchema:r,callDataSchema:o,hexSchema:b,ecSignatureParameterSchema:i,ecSignatureSchema:f,eip712TypedDataSchema:s,indexFilterValuesSchema:l,orderCancellationRequestsSchema:p,orderFillOrKillRequestsSchema:m,orderFillRequestsSchema:g,orderHashSchema:v,orderSchema:y,signedOrderSchema:F,signedOrdersSchema:z,ordersSchema:I,blockParamSchema:c,blockRangeSchema:d,tokenSchema:q,jsNumber:u,requestOptsSchema:U,pagedRequestOptsSchema:_,ordersRequestOptsSchema:k,orderBookRequestSchema:w,orderConfigRequestSchema:x,assetPairsRequestOptsSchema:n,txDataSchema:W,paginatedCollectionSchema:A,relayerApiErrorResponseSchema:M,relayerApiFeeRecipientsResponseSchema:H,relayerApiOrderSchema:R,relayerApiOrdersSchema:j,relayerApiOrderConfigPayloadSchema:T,relayerApiOrderConfigResponseSchema:P,relayerApiOrderbookResponseSchema:C,relayerApiAssetDataPairsResponseSchema:E,relayerApiAssetDataTradeInfoSchema:N,relayerApiOrdersChannelSubscribeSchema:D,relayerApiOrdersChannelSubscribePayloadSchema:O,relayerApiOrdersChannelUpdateSchema:B,relayerApiOrdersResponseSchema:L,relayerApiAssetDataPairsSchema:S,zeroExTransactionSchema:K,wholeNumberSchema:V}},89476:function(e,t,a){"use strict";var r=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))((function(n,c){function d(e){try{i(r.next(e))}catch(t){c(t)}}function o(e){try{i(r.throw(e))}catch(t){c(t)}}function i(e){e.done?n(e.value):new a((function(t){t(e.value)})).then(d,o)}i((r=r.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var a,r,n,c,d={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return c={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function o(c){return function(o){return function(c){if(a)throw new TypeError("Generator is already executing.");for(;d;)try{if(a=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return d.label++,{value:c[1],done:!1};case 5:d.label++,r=c[1],c=[0];continue;case 7:c=d.ops.pop(),d.trys.pop();continue;default:if(!(n=(n=d.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d};Object.defineProperty(t,"__esModule",{value:!0});var i=a(40014),f=a(98295),s=a(481),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t._validateTxParams=function(e){void 0!==e.to&&i.assert.isETHAddressHex("to",e.to),i.assert.isHexString("nonce",e.nonce)},t._validateSender=function(e){if(void 0===e||!f.addressUtils.isAddress(e))throw new Error(s.WalletSubproviderErrors.SenderInvalidOrNotSupplied)},t.prototype.handleRequest=function(e,a,r){return c(this,void 0,void 0,(function(){var n,c,i,f,s,b,l,u,h,p,x,m,g,v,y,w,k;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 c=d.sent(),r(null,c[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 c=d.sent(),r(null,c),[3,8];case 7:return l=d.sent(),r(l),[3,8];case 8:return[2];case 9:i=e.params[0],d.label=10;case 10:return d.trys.push([10,14,,15]),t._validateSender(i.from),[4,this._populateMissingTxParamsAsync(i)];case 11:return p=d.sent(),[4,this.signTransactionAsync(p)];case 12:return x=d.sent(),[4,this._emitSendTransactionAsync(x)];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:i=e.params[0],d.label=17;case 17:return d.trys.push([17,20,,21]),[4,this._populateMissingTxParamsAsync(i)];case 18:return p=d.sent(),[4,this.signTransactionAsync(p)];case 19:return x=d.sent(),r(null,{raw:x,tx:i}),[3,21];case 20:return m=d.sent(),r(m),[3,21];case 21:return[2];case 22:g="eth_sign"===e.method?e.params[1]:e.params[0],f="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(g,f)];case 24:return v=d.sent(),r(null,v),[3,26];case 25:return y=d.sent(),r(y),[3,26];case 26:return[2];case 27:n=o(e.params,2),f=n[0],s=n[1],d.label=28;case 28:return d.trys.push([28,30,,31]),[4,this.signTypedDataAsync(f,s)];case 29:return w=d.sent(),r(null,w),[3,31];case 30:return k=d.sent(),r(k),[3,31];case 31:return[2];case 32:return a(),[2]}}))}))},t.prototype._emitSendTransactionAsync=function(e){return c(this,void 0,void 0,(function(){var t;return d(this,(function(a){switch(a.label){case 0:return t={method:"eth_sendRawTransaction",params:[e]},[4,this.emitPayloadAsync(t)];case 1:return[2,a.sent()]}}))}))},t.prototype._populateMissingTxParamsAsync=function(e){return c(this,void 0,void 0,(function(){var t,a,r,c,o,i,f;return d(this,(function(d){switch(d.label){case 0:return t=e,void 0!==e.gasPrice?[3,2]:[4,this.emitPayloadAsync({method:"eth_gasPrice",params:[]})];case 1:a=d.sent(),r=a.result.toString(),t=n({},t,{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:c=d.sent(),o=c.result,t=n({},t,{nonce:o}),d.label=4;case 4:return void 0!==e.gas?[3,6]:[4,this.emitPayloadAsync({method:"eth_estimateGas",params:[e]})];case 5:i=d.sent(),f=i.result.toString(),t=n({},t,{gas:f}),d.label=6;case 6:return[2,t]}}))}))},t}(a(89886).Subprovider);t.BaseWalletSubprovider=b},86226:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}(),n=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))((function(n,c){function d(e){try{i(r.next(e))}catch(t){c(t)}}function o(e){try{i(r.throw(e))}catch(t){c(t)}}function i(e){e.done?n(e.value):new a((function(t){t(e.value)})).then(d,o)}i((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var a,r,n,c,d={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return c={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function o(c){return function(o){return function(c){if(a)throw new TypeError("Generator is already executing.");for(;d;)try{if(a=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return d.label++,{value:c[1],done:!1};case 5:d.label++,r=c[1],c=[0];continue;case 7:c=d.ops.pop(),d.trys.pop();continue;default:if(!(n=(n=d.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d};Object.defineProperty(t,"__esModule",{value:!0});var i=a(98295),f=a(36277),s=function(e){function t(t){var a=e.call(this)||this,r=i.providerUtils.standardizeOrThrow(t);return a._web3Wrapper=new f.Web3Wrapper(r),a._provider=r,a}return r(t,e),t.prototype.handleRequest=function(e,t,a){return c(this,void 0,void 0,(function(){var r,n,c,i,s,b,l,u,h,p,x,m,g,v,y,w,k;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(),a(null,s),[3,4];case 3:return b=d.sent(),a(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(),a(null,l),[3,8];case 7:return u=d.sent(),a(u),[3,8];case 8:return[2];case 9:h=o(e.params,1),p=h[0],d.label=10;case 10:return d.trys.push([10,12,,13]),x=f.marshaller.unmarshalTxData(p),[4,this._web3Wrapper.sendTransactionAsync(x)];case 11:return m=d.sent(),a(null,m),[3,13];case 12:return g=d.sent(),a(g),[3,13];case 13:return[2];case 14:r=o(e.params,2),i=r[0],c=r[1],d.label=15;case 15:return d.trys.push([15,17,,18]),[4,this._web3Wrapper.sendRawPayloadAsync({method:"personal_sign",params:[c,i]})];case 16:return(w=d.sent())?a(null,w):a(new Error("Error performing eth_sign"),null),[3,18];case 17:return v=d.sent(),a(v),[3,18];case 18:return[2];case 19:n=o(e.params,2),i=n[0],c=n[1],d.label=20;case 20:return d.trys.push([20,22,,23]),y=JSON.stringify(c),[4,this._web3Wrapper.sendRawPayloadAsync({method:"eth_signTypedData_v3",params:[i,y]})];case 21:return(w=d.sent())?a(null,w):a(new Error("Error performing eth_signTypedData"),null),[3,23];case 22:return k=d.sent(),a(k),[3,23];case 23:return[2];case 24:return t(),[2]}}))}))},t.prototype.sendAsync=function(e,t){var a=this;this.handleRequest(e,(function(){a._provider.sendAsync.bind(a._provider)(e,t)}),(function(a,r){a?t(a):t(null,n({},e,{result:r}))}))},t}(a(89886).Subprovider);t.MetamaskSubprovider=s},14245:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}(),n=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))((function(n,c){function d(e){try{i(r.next(e))}catch(t){c(t)}}function o(e){try{i(r.throw(e))}catch(t){c(t)}}function i(e){e.done?n(e.value):new a((function(t){t(e.value)})).then(d,o)}i((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var a,r,n,c,d={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return c={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function o(c){return function(o){return function(c){if(a)throw new TypeError("Generator is already executing.");for(;d;)try{if(a=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return d.label++,{value:c[1],done:!1};case 5:d.label++,r=c[1],c=[0];continue;case 7:c=d.ops.pop(),d.trys.pop();continue;default:if(!(n=(n=d.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var o=a(98295),i=function(e){function t(t){var a=e.call(this)||this;return a._subproviders=t,a}return r(t,e),t._firstSuccessAsync=function(e,t,a){return n(this,void 0,void 0,(function(){var r,n,i,f,s,b,l,u;return c(this,(function(c){switch(c.label){case 0:c.trys.push([0,7,8,9]),f=d(e),s=f.next(),c.label=1;case 1:if(s.done)return[3,6];b=s.value,c.label=2;case 2:return c.trys.push([2,4,,5]),[4,o.promisify(b.handleRequest.bind(b))(t,a)];case 3:return[2,c.sent()];case 4:return l=c.sent(),i=l,[3,5];case 5:return s=f.next(),[3,1];case 6:return[3,9];case 7:return u=c.sent(),r={error:u},[3,9];case 8:try{s&&!s.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}return[7];case 9:if(void 0!==i)throw i;return[2]}}))}))},t.prototype.handleRequest=function(e,a,r){return n(this,void 0,void 0,(function(){var n,d,o;return c(this,(function(c){switch(c.label){case 0:n=this._subproviders.slice(),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,t._firstSuccessAsync(n,e,a)];case 2:return d=c.sent(),r(null,d),[3,4];case 3:return o=c.sent(),r(o),[3,4];case 4:return[2]}}))}))},t}(a(89886).Subprovider);t.RedundantSubprovider=i},98534:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}(),n=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))((function(n,c){function d(e){try{i(r.next(e))}catch(t){c(t)}}function o(e){try{i(r.throw(e))}catch(t){c(t)}}function i(e){e.done?n(e.value):new a((function(t){t(e.value)})).then(d,o)}i((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var a,r,n,c,d={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return c={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function o(c){return function(o){return function(c){if(a)throw new TypeError("Generator is already executing.");for(;d;)try{if(a=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return d.label++,{value:c[1],done:!1};case 5:d.label++,r=c[1],c=[0];continue;case 7:c=d.ops.pop(),d.trys.pop();continue;default:if(!(n=(n=d.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d};Object.defineProperty(t,"__esModule",{value:!0});var o=a(36277),i=function(e){function t(t){var a=e.call(this)||this;return a._web3Wrapper=new o.Web3Wrapper(t),a}return r(t,e),t.prototype.handleRequest=function(e,t,a){return n(this,void 0,void 0,(function(){var r,n,i,f,s,b,l,u,h,p,x,m,g,v,y,w;return c(this,(function(c){switch(c.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 c.trys.push([1,3,,4]),[4,this._web3Wrapper.getNodeVersionAsync()];case 2:return s=c.sent(),a(null,s),[3,4];case 3:return b=c.sent(),a(b),[3,4];case 4:return[2];case 5:return c.trys.push([5,7,,8]),[4,this._web3Wrapper.getAvailableAddressesAsync()];case 6:return l=c.sent(),a(null,l),[3,8];case 7:return u=c.sent(),a(u),[3,8];case 8:return[2];case 9:h=d(e.params,1),p=h[0],c.label=10;case 10:return c.trys.push([10,12,,13]),x=o.marshaller.unmarshalTxData(p),[4,this._web3Wrapper.sendTransactionAsync(x)];case 11:return m=c.sent(),a(null,m),[3,13];case 12:return g=c.sent(),a(g),[3,13];case 13:return[2];case 14:r=d(e.params,2),f=r[0],i=r[1],c.label=15;case 15:return c.trys.push([15,17,,18]),[4,this._web3Wrapper.signMessageAsync(f,i)];case 16:return y=c.sent(),a(null,y),[3,18];case 17:return v=c.sent(),a(v),[3,18];case 18:return[2];case 19:n=d(e.params,2),f=n[0],i=n[1],c.label=20;case 20:return c.trys.push([20,22,,23]),[4,this._web3Wrapper.signTypedDataAsync(f,i)];case 21:return y=c.sent(),a(null,y),[3,23];case 22:return w=c.sent(),a(w),[3,23];case 23:return[2];case 24:return t(),[2]}}))}))},t}(a(89886).Subprovider);t.SignerSubprovider=i},89886:function(e,t,a){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,a=1,r=arguments.length;a0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.AddressNotFound="ADDRESS_NOT_FOUND",e.DataMissingForSignPersonalMessage="DATA_MISSING_FOR_SIGN_PERSONAL_MESSAGE",e.DataMissingForSignTypedData="DATA_MISSING_FOR_SIGN_TYPED_DATA",e.SenderInvalidOrNotSupplied="SENDER_INVALID_OR_NOT_SUPPLIED",e.FromAddressMissingOrInvalid="FROM_ADDRESS_MISSING_OR_INVALID",e.MethodNotSupported="METHOD_NOT_SUPPORTED"}(t.WalletSubproviderErrors||(t.WalletSubproviderErrors={})),function(e){e.TooOldLedgerFirmware="TOO_OLD_LEDGER_FIRMWARE",e.MultipleOpenConnectionsDisallowed="MULTIPLE_OPEN_CONNECTIONS_DISALLOWED"}(t.LedgerSubproviderErrors||(t.LedgerSubproviderErrors={})),function(e){e.EmptyParametersFound="EMPTY_PARAMETERS_FOUND",e.CannotDetermineAddressFromPayload="CANNOT_DETERMINE_ADDRESS_FROM_PAYLOAD"}(t.NonceSubproviderErrors||(t.NonceSubproviderErrors={}))},36863:function(e,t){"use strict";var a=this&&this.__read||function(e,t){var a="function"===typeof Symbol&&e[Symbol.iterator];if(!a)return e;var r,n,c=a.call(e),d=[];try{for(;(void 0===t||t-- >0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d},r=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var n=a(30739),c=function(){function e(e,t){void 0===t&&(t=1e3),this._searchLimit=t,this._parentDerivedKeyInfo=e,this._index=0}return e.prototype.next=function(){var e=this._parentDerivedKeyInfo.baseDerivationPath,a=this._index,r="m/"+e+"/"+a,n="m/"+a,c=this._parentDerivedKeyInfo.hdKey.derive(n),d={address:t.walletUtils.addressOfHDKey(c),hdKey:c,baseDerivationPath:e,derivationPath:r},o=this._index===this._searchLimit;return this._index++,{done:o,value:d}},e.prototype[Symbol.iterator]=function(){return this},e}();t.walletUtils={calculateDerivedHDKeyInfos:function(e,t){var a,n,d=[],o=new c(e,t);try{for(var i=r(o),f=i.next();!f.done;f=i.next()){var s=f.value;d.push(s)}}catch(b){a={error:b}}finally{try{f&&!f.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return d},findDerivedKeyInfoForAddressIfExists:function(e,t,a){var n,d,o,i=e.toLowerCase(),f=new c(t,a);try{for(var s=r(f),b=s.next();!b.done;b=s.next()){var l=b.value;if(l.address===i){o=l;break}}}catch(u){n={error:u}}finally{try{b&&!b.done&&(d=s.return)&&d.call(s)}finally{if(n)throw n.error}}return o},addressOfHDKey:function(e){var t=e.publicKey,a=n.publicToAddress(t,!0).toString("hex");return n.addHexPrefix(a).toLowerCase()}}},30739:(e,t,a)=>{"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},n=a(30994),c=n.keccak224,d=n.keccak384,o=n.keccak256,i=n.keccak512,f=a(39017),s=a(2539),b=a(3225),l=a(6373),u=a(36059),h=a(59966).Buffer;Object.assign(t,a(8647)),t.MAX_INTEGER=new l("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new l("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=h.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=h.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=h.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=l,t.rlp=b,t.secp256k1=f,t.zeros=function(e){return h.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=t.zeros(20);return t.bufferToHex(e)},t.setLengthLeft=t.setLength=function(e,a,r){var n=t.zeros(a);return e=t.toBuffer(e),r?e.length0&&"0"===a.toString();)a=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!h.isBuffer(e))if(Array.isArray(e))e=h.from(e);else if("string"===typeof e)e=t.isHexString(e)?h.from(t.padToEven(t.stripHexPrefix(e)),"hex"):h.from(e);else if("number"===typeof e)e=t.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},t.bufferToInt=function(e){return new l(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new l(e).fromTwos(256)},t.toUnsigned=function(e){return h.from(e.toTwos(256).toArray())},t.keccak=function(e,a){switch(e=t.toBuffer(e),a||(a=256),a){case 224:return c(e);case 256:return o(e);case 384:return d(e);case 512:return i(e);default:throw new Error("Invald algorithm: keccak"+a)}},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),u("sha256").update(e).digest()},t.ripemd160=function(e,a){e=t.toBuffer(e);var r=u("rmd160").update(e).digest();return!0===a?t.setLength(r,32):r},t.rlphash=function(e){return t.keccak(b.encode(e))},t.isValidPrivate=function(e){return f.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?f.publicKeyVerify(h.concat([h.from([4]),e])):!!t&&f.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,a){return e=t.toBuffer(e),a&&64!==e.length&&(e=f.publicKeyConvert(e,!1).slice(1)),s(64===e.length),t.keccak(e).slice(-20)};var p=t.privateToPublic=function(e){return e=t.toBuffer(e),f.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=f.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var a=f.sign(e,t),r={};return r.r=a.signature.slice(0,32),r.s=a.signature.slice(32,64),r.v=a.recovery+27,r},t.hashPersonalMessage=function(e){var a=t.toBuffer("\x19Ethereum Signed Message:\n"+e.length.toString());return t.keccak(h.concat([a,e]))},t.ecrecover=function(e,a,r,n){var c=h.concat([t.setLength(r,32),t.setLength(n,32)],64),d=a-27;if(0!==d&&1!==d)throw new Error("Invalid signature v value");var o=f.recover(e,c,d);return f.publicKeyConvert(o,!1).slice(1)},t.toRpcSig=function(e,a,r){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(h.concat([t.setLengthLeft(a,32),t.setLengthLeft(r,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var a=e[64];return a<27&&(a+=27),{v:a,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(p(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var a=t.keccak(e).toString("hex"),r="0x",n=0;n=8?r+=e[n].toUpperCase():r+=e[n];return r},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,a){return e=t.toBuffer(e),a=(a=new l(a)).isZero()?null:h.from(a.toArray()),t.rlphash([e,a]).slice(-20)},t.isPrecompiled=function(e){var a=t.unpad(e);return 1===a.length&&a[0]>=1&&a[0]<=8},t.addHexPrefix=function(e){return"string"!==typeof e||t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,a,r){var n=new l("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),c=new l("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===a.length&&((27===e||28===e)&&(t=new l(t),a=new l(a),!(t.isZero()||t.gt(c)||a.isZero()||a.gt(c))&&(!1!==r||1!==new l(a).cmp(n))))},t.baToJSON=function(e){if(h.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var a=[],r=0;r=n.length,"The field "+a.name+" must not have more "+a.length+" bytes")):a.allowZero&&0===n.length||!a.length||s(a.length===n.length,"The field "+a.name+" must have byte length of "+a.length),e.raw[r]=n}e._fields.push(a.name),Object.defineProperty(e,a.name,{enumerable:!0,configurable:!0,get:n,set:c}),a.default&&(e[a.name]=a.default),a.alias&&Object.defineProperty(e,a.alias,{enumerable:!1,configurable:!0,set:c,get:n})})),n)if("string"===typeof n&&(n=h.from(t.stripHexPrefix(n),"hex")),h.isBuffer(n)&&(n=b.decode(n)),Array.isArray(n)){if(n.length>e._fields.length)throw new Error("wrong number of fields in data");n.forEach((function(a,r){e[e._fields[r]]=t.toBuffer(a)}))}else{if("object"!==("undefined"===typeof n?"undefined":r(n)))throw new Error("invalid data");var c=Object.keys(n);a.forEach((function(t){-1!==c.indexOf(t.name)&&(e[t.name]=n[t.name]),-1!==c.indexOf(t.alias)&&(e[t.alias]=n[t.alias])}))}}},39017:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=a(59490),c=a(63970),d=a(2873),o=function(e){return 32===e.length&&n.privateKeyVerify(Uint8Array.from(e))};e.exports={privateKeyVerify:o,privateKeyExport:function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var a=c.privateKeyExport(e,t);return d.privateKeyExport(e,a,t)},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(n.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return r.from(c.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,t){return r.from(n.privateKeyTweakAdd(Uint8Array.from(e),t))},privateKeyTweakMul:function(e,t){return r.from(n.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},publicKeyCreate:function(e,t){return r.from(n.publicKeyCreate(Uint8Array.from(e),t))},publicKeyConvert:function(e,t){return r.from(n.publicKeyConvert(Uint8Array.from(e),t))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&n.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,t,a){return r.from(n.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),a))},publicKeyTweakMul:function(e,t,a){return r.from(n.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),a))},publicKeyCombine:function(e,t){var a=[];return e.forEach((function(e){a.push(Uint8Array.from(e))})),r.from(n.publicKeyCombine(a,t))},signatureNormalize:function(e){return r.from(n.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return r.from(n.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return r.from(n.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=d.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return c.signatureImport(t)},sign:function(e,t,a){if(null===a)throw new TypeError("options should be an Object");var c=void 0;if(a){if(c={},null===a.data)throw new TypeError("options.data should be a Buffer");if(a.data){if(32!==a.data.length)throw new RangeError("options.data length is invalid");c.data=new Uint8Array(a.data)}if(null===a.noncefn)throw new TypeError("options.noncefn should be a Function");a.noncefn&&(c.noncefn=function(e,t,n,c,d){var o=null!=n?r.from(n):null,i=null!=c?r.from(c):null,f=r.from("");return a.noncefn&&(f=a.noncefn(r.from(e),r.from(t),o,i,d)),Uint8Array.from(f)})}var d=n.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),c);return{signature:r.from(d.signature),recovery:d.recid}},verify:function(e,t,a){return n.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),a)},recover:function(e,t,a,c){return r.from(n.ecdsaRecover(Uint8Array.from(t),a,Uint8Array.from(e),c))},ecdh:function(e,t){return r.from(n.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},ecdhUnsafe:function(e,t,a){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return r.from(c.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),a))}}},2873:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=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]),c=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]);t.privateKeyExport=function(e,t,a){var d=r.from(a?n:c);return e.copy(d,a?8:9),t.copy(d,a?181:214),d},t.privateKeyImport=function(e){var t=e.length,a=0;if(t2)return null;if(t<(a+=1)+r)return null;var n=e[a+r-1]|(r>1?e[a+r-2]<<8:0);return t<(a+=r)+n||t32||tn)return null;if(2!==e[c++])return null;var o=e[c++];if(128&o){if(c+(d=o-128)>n)return null;for(;d>0&&0===e[c];c+=1,d-=1);for(o=0;d>0;c+=1,d-=1)o=(o<<8)+e[c]}if(o>n-c)return null;var i=c;if(c+=o,2!==e[c++])return null;var f=e[c++];if(128&f){if(c+(d=f-128)>n)return null;for(;d>0&&0===e[c];c+=1,d-=1);for(f=0;d>0;c+=1,d-=1)f=(f<<8)+e[c]}if(f>n-c)return null;var s=c;for(c+=f;o>0&&0===e[i];o-=1,i+=1);if(o>32)return null;var b=e.slice(i,i+o);for(b.copy(t,32-b.length);f>0&&0===e[s];f-=1,s+=1);if(f>32)return null;var l=e.slice(s,s+f);return l.copy(a,32-l.length),{r:t,s:a}}},63970:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=a(6373),c=new(0,a(38086).ec)("secp256k1"),d=c.curve;t.privateKeyExport=function(e,t){var a=new n(e);if(a.ucmp(d.n)>=0)throw new Error("couldn't export to DER format");var r=c.g.mul(a);return o(r.getX(),r.getY(),t)},t.privateKeyModInverse=function(e){var t=new n(e);if(t.ucmp(d.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(d.n).toArrayLike(r,"be",32)},t.signatureImport=function(e){var t=new n(e.r);t.ucmp(d.n)>=0&&(t=new n(0));var a=new n(e.s);return a.ucmp(d.n)>=0&&(a=new n(0)),r.concat([t.toArrayLike(r,"be",32),a.toArrayLike(r,"be",32)])},t.ecdhUnsafe=function(e,t,a){var r=c.keyFromPublic(e),i=new n(t);if(i.ucmp(d.n)>=0||i.isZero())throw new Error("scalar was invalid (zero or overflow)");var f=r.pub.mul(i);return o(f.getX(),f.getY(),a)};var o=function(e,t,a){var n=void 0;return a?((n=r.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(r,"be",32).copy(n,1)):((n=r.alloc(65))[0]=4,e.toArrayLike(r,"be",32).copy(n,1),t.toArrayLike(r,"be",32).copy(n,33)),n}},6066:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Sell="Sell",e.Buy="Buy"}(t.MarketOperation||(t.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"}(t.ExchangeContractErrs||(t.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"}(t.SignatureType||(t.SignatureType={})),function(e){e.ERC20="0xf47261b0",e.ERC721="0x02571792",e.MultiAsset="0x94cfcdd7",e.ERC1155="0xa7cb5fb7",e.StaticCall="0xc339d10a"}(t.AssetProxyId||(t.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"}(t.RevertReason||(t.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"}(t.StatusCodes||(t.StatusCodes={})),function(e){e.Update="update",e.Unknown="unknown"}(t.OrdersChannelMessageTypes||(t.OrdersChannelMessageTypes={})),function(e){e.Close="close",e.Error="error",e.Message="message"}(t.WebsocketConnectionEventType||(t.WebsocketConnectionEventType={})),function(e){e.Connect="connect",e.ConnectFailed="connectFailed"}(t.WebsocketClientEventType||(t.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"}(t.TypeDocTypes||(t.TypeDocTypes={}))},78666:function(e,t,a){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,a=1,r=arguments.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(53536),n=a(82364),c=a(12847),d=a(9530),o=function(){function e(e,t){this._dataItem=e,this._factory=t}return e.prototype.getDataItem=function(){return this._dataItem},e.prototype.getFactory=function(){return this._factory},e.prototype.encode=function(e,t,a){var r=void 0===t?d.constants.DEFAULT_ENCODING_RULES:t,c=new n.Calldata(r);void 0!==a&&c.setSelector(a);var o=this.generateCalldataBlock(e);return c.setRoot(o),c.toString()},e.prototype.decode=function(e,t,a){if(void 0!==a&&!r.startsWith(e,a))throw new Error("Tried to decode calldata, but it was missing the function selector. Expected prefix '"+a+"'. Got '"+e+"'.");var n=void 0!==a,o=new c.RawCalldata(e,n),i=void 0===t?d.constants.DEFAULT_DECODING_RULES:t;return o.getSizeInBytes()>0?this.generateValue(o,i):this.getDefaultValue(i)},e.prototype.decodeAsArray=function(e,t){var a=this.decode(e,t);return r.isObject(a)?r.values(a):[a]},e.prototype.getSignature=function(e){if(r.isEmpty(this._dataItem.name)||!e)return this.getSignatureType();var t=this.getDataItem().name,a=t.lastIndexOf(".");return(void 0!==a&&a>0?t.substr(a+1):t)+" "+this.getSignatureType()},e}();t.DataType=o},45494:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(41322),c=function(e){function t(t,a,r){var n=e.call(this,t,a)||this;return n._sizeKnownAtCompileTime=r,n}return r(t,e),t.prototype.generateCalldataBlock=function(e,t){var a=this.encodeValue(e),r=this.getDataItem().name,c=this.getSignature(),d=void 0===t?"":t.getName();return new n.BlobCalldataBlock(r,c,d,a)},t.prototype.generateValue=function(e,t){return this.decodeValue(e)},t.prototype.isStatic=function(){return this._sizeKnownAtCompileTime},t}(a(16074).DataType);t.AbstractBlobDataType=c},39404:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(13820),c=a(19560),d=a(9530),o=function(e){function t(t,a,r,n){var c=e.call(this,t,a)||this;return c._destination=r,c._parent=n,c}return r(t,e),t.prototype.generateCalldataBlock=function(e,t){if(void 0===t)throw new Error("DependentDataType requires a parent block to generate its block");var a=this._destination.generateCalldataBlock(e,t),r=this.getDataItem().name,n=this.getSignature(),d=t.getName();return new c.PointerCalldataBlock(r,n,d,a,t)},t.prototype.generateValue=function(e,t){var a=e.popWord(),r=n.bufferToHex(a),c=parseInt(r,d.constants.HEX_BASE),o=e.toAbsoluteOffset(c),i=e.getOffset();e.setOffset(o);var f=this._destination.generateValue(e,t);return e.setOffset(i),f},t.prototype.isStatic=function(){return!0},t}(a(16074).DataType);t.AbstractPointerDataType=o},1209:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}(),n=this&&this.__read||function(e,t){var a="function"===typeof Symbol&&e[Symbol.iterator];if(!a)return e;var r,n,c=a.call(e),d=[];try{for(;(void 0===t||t-- >0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d};Object.defineProperty(t,"__esModule",{value:!0});var c=a(13820),d=a(53536),o=a(71607),i=a(69),f=a(9530),s=a(16074),b=a(39404),l=function(e){function t(t,a,r,c,d){var o,i;void 0===r&&(r=!1);var f=e.call(this,t,a)||this;return f._memberIndexByName={},f._members=[],f._isArray=r,f._arrayLength=c,f._arrayElementType=d,r&&void 0!==c?(o=n(f._createMembersWithLength(t,c),2),f._members=o[0],f._memberIndexByName=o[1]):r||(i=n(f._createMembersWithKeys(t),2),f._members=i[0],f._memberIndexByName=i[1]),f}return r(t,e),t.prototype.generateCalldataBlock=function(e,t){return e instanceof Array?this._generateCalldataBlockFromArray(e,t):this._generateCalldataBlockFromObject(e,t)},t.prototype.generateValue=function(e,t){var a,r=this,i=this._members;if(this._isArray&&void 0===this._arrayLength){var s=e.popWord(),b=c.bufferToHex(s),l=new o.BigNumber(b,f.constants.HEX_BASE);i=n(this._createMembersWithLength(this.getDataItem(),l.toNumber()),1)[0]}return e.startScope(),t.shouldConvertStructsToObjects&&!this._isArray?(a={},d.each(this._memberIndexByName,(function(n,c){var d=r._members[n].generateValue(e,t);a[c]=d}))):(a=[],d.each(i,(function(r,n){var c=r.generateValue(e,t);a.push(c)}))),e.endScope(),a},t.prototype.isStatic=function(){return(!this._isArray||void 0!==this._arrayLength)&&void 0===d.find(this._members,(function(e){return e instanceof b.AbstractPointerDataType}))},t.prototype.getDefaultValue=function(e){var t,a=this;return this._isArray&&void 0===this._arrayLength?t=[]:void 0!==e&&e.shouldConvertStructsToObjects&&!this._isArray?(t={},d.each(this._memberIndexByName,(function(e,r){var n=a._members[e].getDefaultValue();t[r]=n}))):(t=[],d.each(this._members,(function(e,a){var r=e.getDefaultValue();t.push(r)}))),t},t.prototype._generateCalldataBlockFromArray=function(e,t){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 a=void 0===t?"":t.getName(),r=new i.SetCalldataBlock(this.getDataItem().name,this.getSignature(),a),o=this._members;if(this._isArray&&void 0===this._arrayLength){o=n(this._createMembersWithLength(this.getDataItem(),e.length),1)[0];var s=c.setLengthLeft(c.toBuffer("0x"+e.length.toString(f.constants.HEX_BASE)),f.constants.EVM_WORD_WIDTH_IN_BYTES);r.setHeader(s)}var b=[];return d.each(o,(function(t,a){var n=t.generateCalldataBlock(e[a],r);b.push(n)})),r.setMembers(b),r},t.prototype._generateCalldataBlockFromObject=function(e,t){var a=this,r=void 0===t?"":t.getName(),n=new i.SetCalldataBlock(this.getDataItem().name,this.getSignature(),r),c=[];return d.forEach(this._memberIndexByName,(function(t,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=a._members[t].generateCalldataBlock(d,n);c.push(o)})),n.setMembers(c),n},t.prototype._computeSignatureOfMembers=function(e){var t=this,a="(";return d.each(this._members,(function(r,n){a+=r.getSignature(e),n"),t._DEPENDENT_PAYLOAD_SIZE_IN_BYTES=32,t._EMPTY_HEADER_SIZE=0,t}(a(58834).CalldataBlock);t.PointerCalldataBlock=o},69:function(e,t,a){"use strict";var r=a(26382).Buffer,n=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var c=a(53536),d=function(e){function t(t,a,r){var n=e.call(this,t,a,r,0,0)||this;return n._members=[],n._header=void 0,n}return n(t,e),t.prototype.getRawData=function(){var e=[];return void 0!==this._header&&e.push(this._header),c.each(this._members,(function(t){var a=t.getRawData();e.push(a)})),r.concat(e)},t.prototype.setMembers=function(e){this._members=e},t.prototype.setHeader=function(e){this._setHeaderSize(e.byteLength),this._header=e},t.prototype.toBuffer=function(){return void 0!==this._header?this._header:new r("")},t.prototype.getMembers=function(){return this._members},t}(a(58834).CalldataBlock);t.SetCalldataBlock=d},82364:function(e,t,a){"use strict";var r=a(26382).Buffer,n=this&&this.__values||function(e){var t="function"===typeof Symbol&&e[Symbol.iterator],a=0;return t?t.call(e):{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var c=a(13820),d=a(53536),o=a(9530),i=a(19560),f=a(69),s=a(13406),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,t;if(void 0===this._root)throw new Error("expected root");this._rules.shouldOptimize&&this._optimize();var a=new s.CalldataIterator(this._root),r=0;try{for(var c=n(a),d=c.next();!d.done;d=c.next()){var o=d.value;o.setOffset(r),r+=o.getSizeInBytes()}}catch(i){e={error:i}}finally{try{d&&!d.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}return this._rules.shouldAnnotate?this._toHumanReadableCallData():this._toEvmCompatibeCallDataHex()},e.prototype._optimize=function(){var e,t;if(void 0===this._root)throw new Error("expected root");var a=new s.ReverseCalldataIterator(this._root),r={};try{for(var d=n(a),o=d.next();!o.done;o=d.next()){var f=o.value;if(f instanceof i.PointerCalldataBlock){var b=f.getDependency().computeHash(),l=c.bufferToHex(b);if(l in r){var u=r[l];u!==f.getDependency()&&f.setAlias(u)}}else{var h=f.computeHash(),p=c.bufferToHex(h);p in r||(r[p]=f)}}}catch(x){e={error:x}}finally{try{o&&!o.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}},e.prototype._toEvmCompatibeCallDataHex=function(){var e,t;if(void 0===this._root)throw new Error("expected root");var a=[c.toBuffer(this._selector)],d=new s.CalldataIterator(this._root);try{for(var o=n(d),i=o.next();!i.done;i=o.next()){var f=i.value;a.push(f.toBuffer())}}catch(l){e={error:l}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}var b=r.concat(a);return c.bufferToHex(b)},e.prototype._toHumanReadableCallData=function(){var e,t;if(void 0===this._root)throw new Error("expected root");var a=""+this._selector,r=0,d=this._root.getName(),i=new s.CalldataIterator(this._root);try{for(var b=n(i),l=b.next();!l.done;l=b.next()){var u=l.value,h=u.getSizeInBytes(),p=u.getName(),x=u.getParentName(),m=p.replace(x+".","").replace(d+".",""),g="",v="",y="";0===h?y="\n"+(g=" ".repeat(10))+(v=" ".repeat(74))+("### "+m.padEnd(80)):(g=("0x"+r.toString(o.constants.HEX_BASE)).padEnd(10),v=c.stripHexPrefix(c.bufferToHex(u.toBuffer().slice(0,o.constants.EVM_WORD_WIDTH_IN_BYTES))).padEnd(74),y=u instanceof f.SetCalldataBlock?"\n"+g+v+("### "+m.padEnd(80)):""+g+v+(" "+m.padEnd(80)));for(var w=o.constants.EVM_WORD_WIDTH_IN_BYTES;w{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(13820),n=function(){function e(e,t,a,r,n){this._name=e,this._signature=t,this._parentName=a,this._offsetInBytes=0,this._headerSizeInBytes=r,this._bodySizeInBytes=n}return e.prototype._setHeaderSize=function(e){this._headerSizeInBytes=e},e.prototype._setBodySize=function(e){this._bodySizeInBytes=e},e.prototype._setName=function(e){this._name=e},e.prototype.getName=function(){return this._name},e.prototype.getParentName=function(){return this._parentName},e.prototype.getSignature=function(){return this._signature},e.prototype.getHeaderSizeInBytes=function(){return this._headerSizeInBytes},e.prototype.getBodySizeInBytes=function(){return this._bodySizeInBytes},e.prototype.getSizeInBytes=function(){return this.getHeaderSizeInBytes()+this.getBodySizeInBytes()},e.prototype.getOffsetInBytes=function(){return this._offsetInBytes},e.prototype.setOffset=function(e){this._offsetInBytes=e},e.prototype.computeHash=function(){var e=this.getRawData();return r.sha3(e)},e}();t.CalldataBlock=n},13406:function(e,t,a){"use strict";var r=a(26382).Buffer,n=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var c=a(53536),d=a(94480),o=a(41322),i=a(19560),f=a(69),s=function(){function e(t){this._root=t,this._queue=e._createQueue(t)}return e._createQueue=function(t){var a=new d.Queue;if(!(t instanceof f.SetCalldataBlock))return a.pushBack(t),a;var r=t;return c.eachRight(r.getMembers(),(function(t){a.mergeFront(e._createQueue(t))})),c.each(r.getMembers(),(function(t){if(t instanceof i.PointerCalldataBlock&&void 0===t.getAlias()){var r=t.getDependency();a.mergeBack(e._createQueue(r))}})),a.pushFront(r),a},e.prototype[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.nextBlock();return void 0!==t?{value:t,done:!1}:{done:!0,value:new o.BlobCalldataBlock("","","",new r(""))}}}},e}(),b=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.nextBlock=function(){return this._queue.popFront()},t}(s);t.CalldataIterator=b;var l=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.nextBlock=function(){return this._queue.popBack()},t}(s);t.ReverseCalldataIterator=l},12847:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(13820),n=a(53536),c=a(9530),d=a(94480),o=function(){function e(t,a){if(void 0===a&&(a=!0),"string"===typeof t&&!n.startsWith(t,"0x"))throw new Error("Expected raw calldata to start with '0x'");if(this._value=r.toBuffer(t),this._selector="0x",this._scopes=new d.Queue,this._scopes.pushBack(e._INITIAL_OFFSET),this._offset=e._INITIAL_OFFSET,a){var o=this._value.slice(c.constants.HEX_SELECTOR_LENGTH_IN_BYTES);this._value=this._value.slice(c.constants.HEX_SELECTOR_LENGTH_IN_BYTES),this._selector=r.bufferToHex(o)}}return e.prototype.popBytes=function(e){var t=this._offset,a=t+e;if(a>this._value.byteLength)throw new Error("Tried to decode beyond the end of calldata");var r=this._value.slice(t,a);return this.setOffset(a),r},e.prototype.popWord=function(){return this.popBytes(32)},e.prototype.popWords=function(e){return this.popBytes(32*e)},e.prototype.readBytes=function(e,t){return this._value.slice(e,t)},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 t=this._scopes.peekFront();if(void 0===t)throw new Error("Tried to access undefined scope.");return e+t},e.prototype.getSelector=function(){return this._selector},e.prototype.getSizeInBytes=function(){return this._value.byteLength},e._INITIAL_OFFSET=0,e}();t.RawCalldata=o},10428:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof E&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(53536),c=a(86099),d=a(72959),o=a(71670),i=a(94007),f=a(82410),s=a(47762),b=a(84066),l=a(97074),u=a(94497),h=a(32330),p=a(11897),x=a(41111),m=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(d.AddressDataType);t.Address=m;var g=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(i.BoolDataType);t.Bool=g;var v=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(s.IntDataType);t.Int=v;var y=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(x.UIntDataType);t.UInt=y;var w=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(u.StaticBytesDataType);t.StaticBytes=w;var k=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(f.DynamicBytesDataType);t.DynamicBytes=k;var I=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(h.StringDataType);t.String=I;var _=function(e){function t(t,a){return e.call(this,t,a,N.getInstance())||this}return r(t,e),t}(l.PointerDataType);t.Pointer=_;var A=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(p.TupleDataType);t.Tuple=A;var E=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(o.ArrayDataType);t.Array=E;var S=function(e){function t(t){return e.call(this,t,N.getInstance())||this}return r(t,e),t}(b.MethodDataType);t.Method=S;var N=function(){function e(){}return e.getInstance=function(){return e._instance||(e._instance=new e),e._instance},e.prototype.create=function(e,t){var a;if(E.matchType(e.type)?a=new E(e):m.matchType(e.type)?a=new m(e):g.matchType(e.type)?a=new g(e):v.matchType(e.type)?a=new v(e):y.matchType(e.type)?a=new y(e):w.matchType(e.type)?a=new w(e):A.matchType(e.type)?a=new A(e):k.matchType(e.type)?a=new k(e):I.matchType(e.type)&&(a=new I(e)),void 0===a)throw new Error("Unrecognized data type: '"+e.type+"'");return void 0===t||a.isStatic()?a:new _(a,t)},e}();function M(e){var t;if(n.isArray(e)&&n.isEmpty(e))t=[];else if(n.isArray(e)&&n.isString(e[0]))t=[],n.each(e,(function(e){var a=c.generateDataItemFromSignature(e);t.push(a)}));else if(n.isArray(e))t=e;else if("string"===typeof e){var a=c.generateDataItemFromSignature(e);t=[a]}else t=[e];return t}t.EvmDataTypeFactory=N,t.create=function(e){var t=function(e){var t;if(n.isArray(e)){t={name:"",type:"tuple",components:e}}else t=n.isString(e)?c.generateDataItemFromSignature(e):e;return t}(e);return N.getInstance().create(t)},t.createMethod=function(e,t,a){var r=void 0===t?[]:M(t),n=void 0===a?[]:M(a);return new S({name:e,inputs:r,outputs:n,type:"function",constant:!1,payable:!1,stateMutability:"nonpayable"})}},72959:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(91253),c=a(13820),d=a(53536),o=a(45494),i=a(9530),f=function(e){function t(a,r){var n=e.call(this,a,r,t._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!t.matchType(a.type))throw new Error("Tried to instantiate Address with bad input: "+a);return n}return r(t,e),t.matchType=function(e){return e===n.SolidityTypes.Address},t.prototype.encodeValue=function(e){if(!c.isValidAddress(e))throw new Error("Invalid address: '"+e+"'");var t=c.toBuffer(e);return c.setLengthLeft(t,i.constants.EVM_WORD_WIDTH_IN_BYTES)},t.prototype.decodeValue=function(e){var a=e.popWord().slice(t._DECODED_ADDRESS_OFFSET_IN_BYTES),r=c.bufferToHex(a);return d.toLower(r)},t.prototype.getDefaultValue=function(){return t._DEFAULT_VALUE},t.prototype.getSignatureType=function(){return n.SolidityTypes.Address},t._SIZE_KNOWN_AT_COMPILE_TIME=!0,t._ADDRESS_SIZE_IN_BYTES=20,t._DECODED_ADDRESS_OFFSET_IN_BYTES=i.constants.EVM_WORD_WIDTH_IN_BYTES-t._ADDRESS_SIZE_IN_BYTES,t._DEFAULT_VALUE="0x0000000000000000000000000000000000000000",t}(o.AbstractBlobDataType);t.AddressDataType=f},71670:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}(),n=this&&this.__read||function(e,t){var a="function"===typeof Symbol&&e[Symbol.iterator];if(!a)return e;var r,n,c=a.call(e),d=[];try{for(;(void 0===t||t-- >0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d};Object.defineProperty(t,"__esModule",{value:!0});var c=a(53536),d=a(1209),o=a(9530),i=function(e){function t(a,r){var c=this,d=n(t._decodeElementTypeAndLengthFromType(a.type),2),o=d[0],i=d[1];return(c=e.call(this,a,r,!0,i,o)||this)._elementType=o,c}return r(t,e),t.matchType=function(e){return t._MATCHER.test(e)},t._decodeElementTypeAndLengthFromType=function(e){var a=t._MATCHER.exec(e);if(null===a||3!==a.length)throw new Error("Could not parse array: "+e);if(void 0===a[1])throw new Error("Could not parse array type: "+e);if(void 0===a[2])throw new Error("Could not parse array length: "+e);return[a[1],c.isEmpty(a[2])?void 0:parseInt(a[2],o.constants.DEC_BASE)]},t.prototype.getSignatureType=function(){return this._computeSignature(!1)},t.prototype.getSignature=function(e){if(c.isEmpty(this.getDataItem().name)||!e)return this.getSignatureType();var t=this.getDataItem().name,a=t.lastIndexOf(".");return(void 0!==a&&a>0?t.substr(a+1):t)+" "+this._computeSignature(e)},t.prototype._computeSignature=function(e){var t={type:this._elementType,name:""},a=this.getDataItem().components;void 0!==a&&(t.components=a);var r=this.getFactory().create(t).getSignature(e);return void 0===this._arrayLength?r+"[]":r+"["+this._arrayLength+"]"},t._MATCHER=RegExp("^(.+)\\[([0-9]*)\\]$"),t}(d.AbstractSetDataType);t.ArrayDataType=i},94007:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(91253),c=a(13820),d=a(71607),o=a(45494),i=a(9530),f=function(e){function t(a,r){var n=e.call(this,a,r,t._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!t.matchType(a.type))throw new Error("Tried to instantiate Bool with bad input: "+a);return n}return r(t,e),t.matchType=function(e){return e===n.SolidityTypes.Bool},t.prototype.encodeValue=function(e){var t=e?"0x1":"0x0";return c.setLengthLeft(c.toBuffer(t),i.constants.EVM_WORD_WIDTH_IN_BYTES)},t.prototype.decodeValue=function(e){var t=e.popWord(),a=c.bufferToHex(t),r="0x"===a?new d.BigNumber(0):new d.BigNumber(a,i.constants.HEX_BASE);if(!r.isEqualTo(0)&&!r.isEqualTo(1))throw new Error("Failed to decode boolean. Expected 0x0 or 0x1, got "+a);return!r.isEqualTo(0)},t.prototype.getDefaultValue=function(){return t._DEFAULT_VALUE},t.prototype.getSignatureType=function(){return n.SolidityTypes.Bool},t._SIZE_KNOWN_AT_COMPILE_TIME=!0,t._DEFAULT_VALUE=!1,t}(o.AbstractBlobDataType);t.BoolDataType=f},82410:function(e,t,a){"use strict";var r=a(26382).Buffer,n=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var c=a(91253),d=a(13820),o=a(53536),i=a(45494),f=a(9530),s=function(e){function t(a,r){var n=e.call(this,a,r,t._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!t.matchType(a.type))throw new Error("Tried to instantiate Dynamic Bytes with bad input: "+a);return n}return n(t,e),t.matchType=function(e){return e===c.SolidityTypes.Bytes},t._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.")}},t.prototype.encodeValue=function(e){var a=d.toBuffer(e),n=Math.ceil(a.byteLength/f.constants.EVM_WORD_WIDTH_IN_BYTES)*f.constants.EVM_WORD_WIDTH_IN_BYTES,c=d.toBuffer(a.byteLength),o=d.setLengthLeft(c,f.constants.EVM_WORD_WIDTH_IN_BYTES);t._sanityCheckValue(e);var i=d.setLengthRight(a,n);return r.concat([o,i])},t.prototype.decodeValue=function(e){var a=e.popWord(),r=d.bufferToHex(a),n=parseInt(r,f.constants.HEX_BASE),c=Math.ceil(n/f.constants.EVM_WORD_WIDTH_IN_BYTES),o=e.popWords(c).slice(0,n),i=d.bufferToHex(o);return t._sanityCheckValue(i),i},t.prototype.getDefaultValue=function(){return t._DEFAULT_VALUE},t.prototype.getSignatureType=function(){return c.SolidityTypes.Bytes},t._SIZE_KNOWN_AT_COMPILE_TIME=!1,t._DEFAULT_VALUE="0x",t}(i.AbstractBlobDataType);t.DynamicBytesDataType=s},47762:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(91253),c=a(71607),d=a(45494),o=a(9530),i=a(94813),f=function(e){function t(a,r){var n=e.call(this,a,r,t._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!t.matchType(a.type))throw new Error("Tried to instantiate Int with bad input: "+a);return n._width=t._decodeWidthFromType(a.type),n._minValue=new c.BigNumber(2).exponentiatedBy(n._width-1).times(-1),n._maxValue=new c.BigNumber(2).exponentiatedBy(n._width-1).minus(1),n}return r(t,e),t.matchType=function(e){return t._MATCHER.test(e)},t._decodeWidthFromType=function(e){var a=t._MATCHER.exec(e);return null!==a&&2===a.length&&void 0!==a[1]?parseInt(a[1],o.constants.DEC_BASE):t._DEFAULT_WIDTH},t.prototype.encodeValue=function(e){return i.safeEncodeNumericValue(e,this._minValue,this._maxValue)},t.prototype.decodeValue=function(e){var t=e.popWord(),a=i.safeDecodeNumericValue(t,this._minValue,this._maxValue);return this._width===o.constants.NUMBER_OF_BYTES_IN_INT8?a.toNumber():a},t.prototype.getDefaultValue=function(){var e=t._DEFAULT_VALUE;return this._width===o.constants.NUMBER_OF_BYTES_IN_INT8?e.toNumber():e},t.prototype.getSignatureType=function(){return""+n.SolidityTypes.Int+this._width},t._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}$"),t._SIZE_KNOWN_AT_COMPILE_TIME=!0,t._MAX_WIDTH=256,t._DEFAULT_WIDTH=t._MAX_WIDTH,t._DEFAULT_VALUE=new c.BigNumber(0),t}(d.AbstractBlobDataType);t.IntDataType=f},84066:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(13820),c=a(53536),d=a(1209),o=a(9530),i=a(11897),f=function(e){function t(t,a){var r=this,n={type:"method",name:t.name,components:t.inputs};(r=e.call(this,n,a)||this)._methodSignature=r._computeSignature(),r._methodSelector=r._computeSelector();var c={type:"tuple",name:t.name,components:t.outputs};return r._returnDataType=new i.TupleDataType(c,r.getFactory()),r}return r(t,e),t.prototype.encode=function(t,a){return e.prototype.encode.call(this,t,a,this._methodSelector)},t.prototype.decode=function(t,a){return e.prototype.decode.call(this,t,a,this._methodSelector)},t.prototype.strictDecode=function(t,a){var r=e.prototype.decode.call(this,t,a,this._methodSelector),n=c.isObject(r)?c.values(r):[r];switch(n.length){case 0:return;case 1:return n[0];default:return n}},t.prototype.encodeReturnValues=function(e,t){return this._returnDataType.encode(e,t)},t.prototype.decodeReturnValues=function(e,t){return this._returnDataType.decode(e,t)},t.prototype.strictDecodeReturnValue=function(e,t){var a=this._returnDataType.decode(e,t),r=c.isObject(a)?c.values(a):[a];switch(r.length){case 0:return;case 1:return r[0];default:return r}},t.prototype.getSignatureType=function(){return this._methodSignature},t.prototype.getSelector=function(){return this._methodSelector},t.prototype.getReturnValueDataItem=function(){return this._returnDataType.getDataItem()},t.prototype._computeSignature=function(){var e=this._computeSignatureOfMembers();return""+this.getDataItem().name+e},t.prototype._computeSelector=function(){var e=this._computeSignature();return n.bufferToHex(n.toBuffer(n.sha3(e).slice(o.constants.HEX_SELECTOR_BYTE_OFFSET_IN_CALLDATA,o.constants.HEX_SELECTOR_LENGTH_IN_BYTES)))},t}(d.AbstractSetDataType);t.MethodDataType=f},97074:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t,a,r){var n=t.getDataItem(),c={name:"ptr<"+n.name+">",type:"ptr<"+n.type+">"};return e.call(this,c,r,t,a)||this}return r(t,e),t.prototype.getSignatureType=function(){return this._destination.getSignature(!1)},t.prototype.getSignature=function(e){return this._destination.getSignature(e)},t.prototype.getDefaultValue=function(){return this._destination.getDefaultValue()},t}(a(39404).AbstractPointerDataType);t.PointerDataType=n},94497:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(91253),c=a(13820),d=a(53536),o=a(45494),i=a(9530),f=function(e){function t(a,r){var n=e.call(this,a,r,t._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!t.matchType(a.type))throw new Error("Tried to instantiate Static Bytes with bad input: "+a);return n._width=t._decodeWidthFromType(a.type),n}return r(t,e),t.matchType=function(e){return t._MATCHER.test(e)},t._decodeWidthFromType=function(e){var a=t._MATCHER.exec(e);return null!==a&&3===a.length&&void 0!==a[2]?parseInt(a[2],i.constants.DEC_BASE):t._DEFAULT_WIDTH},t.prototype.getSignatureType=function(){return""+n.SolidityTypes.Bytes+this._width},t.prototype.encodeValue=function(e){this._sanityCheckValue(e);var t=c.toBuffer(e);return c.setLengthRight(t,i.constants.EVM_WORD_WIDTH_IN_BYTES)},t.prototype.decodeValue=function(e){var t=e.popWord().slice(0,this._width),a=c.bufferToHex(t);return this._sanityCheckValue(a),a},t.prototype.getDefaultValue=function(){var e=i.constants.EMPTY_EVM_WORD_BUFFER.slice(0,this._width);return c.bufferToHex(e)},t.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 t=c.toBuffer(e);if(t.byteLength>this._width)throw new Error("Tried to assign "+e+" ("+t.byteLength+" bytes), which exceeds max bytes that can be stored in a "+this.getSignature())},t._SIZE_KNOWN_AT_COMPILE_TIME=!0,t._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))$"),t._DEFAULT_WIDTH=1,t}(o.AbstractBlobDataType);t.StaticBytesDataType=f},32330:function(e,t,a){"use strict";var r=a(26382).Buffer,n=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var c=a(91253),d=a(13820),o=a(45494),i=a(9530),f=function(e){function t(a,r){var n=e.call(this,a,r,t._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!t.matchType(a.type))throw new Error("Tried to instantiate String with bad input: "+a);return n}return n(t,e),t.matchType=function(e){return e===c.SolidityTypes.String},t.prototype.encodeValue=function(e){var t=new r(e),a=t.byteLength,n=Math.ceil(a/i.constants.EVM_WORD_WIDTH_IN_BYTES)*i.constants.EVM_WORD_WIDTH_IN_BYTES,c=d.setLengthRight(t,n),o=d.toBuffer(a),f=d.setLengthLeft(o,i.constants.EVM_WORD_WIDTH_IN_BYTES);return r.concat([f,c])},t.prototype.decodeValue=function(e){var t=e.popWord(),a=d.bufferToHex(t),r=parseInt(a,i.constants.HEX_BASE),n=Math.ceil(r/i.constants.EVM_WORD_WIDTH_IN_BYTES);return e.popWords(n).slice(0,r).toString("UTF-8")},t.prototype.getDefaultValue=function(){return t._DEFAULT_VALUE},t.prototype.getSignatureType=function(){return c.SolidityTypes.String},t._SIZE_KNOWN_AT_COMPILE_TIME=!1,t._DEFAULT_VALUE="",t}(o.AbstractBlobDataType);t.StringDataType=f},11897:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(91253),c=a(53536),d=function(e){function t(a,r){var n=e.call(this,a,r)||this;if(!t.matchType(a.type))throw new Error("Tried to instantiate Tuple with bad input: "+a);return n}return r(t,e),t.matchType=function(e){return e===n.SolidityTypes.Tuple},t.prototype.getSignatureType=function(){return this._computeSignatureOfMembers(!1)},t.prototype.getSignature=function(e){if(c.isEmpty(this.getDataItem().name)||!e)return this.getSignatureType();var t=this.getDataItem().name,a=t.lastIndexOf(".");return(void 0!==a&&a>0?t.substr(a+1):t)+" "+this._computeSignatureOfMembers(e)},t}(a(1209).AbstractSetDataType);t.TupleDataType=d},41111:function(e,t,a){"use strict";var r=this&&this.__extends||function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},e(t,a)};return function(t,a){function r(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(r.prototype=a.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var n=a(91253),c=a(71607),d=a(45494),o=a(9530),i=a(94813),f=function(e){function t(a,r){var n=e.call(this,a,r,t._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!t.matchType(a.type))throw new Error("Tried to instantiate UInt with bad input: "+a);return n._width=t._decodeWidthFromType(a.type),n._maxValue=new c.BigNumber(2).exponentiatedBy(n._width).minus(1),n}return r(t,e),t.matchType=function(e){return t._MATCHER.test(e)},t._decodeWidthFromType=function(e){var a=t._MATCHER.exec(e);return null!==a&&2===a.length&&void 0!==a[1]?parseInt(a[1],o.constants.DEC_BASE):t._DEFAULT_WIDTH},t.prototype.encodeValue=function(e){return i.safeEncodeNumericValue(e,t._MIN_VALUE,this._maxValue)},t.prototype.decodeValue=function(e){var a=e.popWord(),r=i.safeDecodeNumericValue(a,t._MIN_VALUE,this._maxValue);return this._width===o.constants.NUMBER_OF_BYTES_IN_UINT8?r.toNumber():r},t.prototype.getDefaultValue=function(){var e=t._DEFAULT_VALUE;return this._width===o.constants.NUMBER_OF_BYTES_IN_UINT8?e.toNumber():e},t.prototype.getSignatureType=function(){return""+n.SolidityTypes.Uint+this._width},t._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}$"),t._SIZE_KNOWN_AT_COMPILE_TIME=!0,t._MAX_WIDTH=256,t._DEFAULT_WIDTH=t._MAX_WIDTH,t._MIN_VALUE=new c.BigNumber(0),t._DEFAULT_VALUE=new c.BigNumber(0),t}(d.AbstractBlobDataType);t.UIntDataType=f},5893:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(10428);t.Address=r.Address,t.Array=r.Array,t.Bool=r.Bool,t.DynamicBytes=r.DynamicBytes,t.Int=r.Int,t.Method=r.Method,t.Pointer=r.Pointer,t.StaticBytes=r.StaticBytes,t.String=r.String,t.Tuple=r.Tuple,t.UInt=r.UInt,t.create=r.create,t.createMethod=r.createMethod;var n=a(16074);t.DataType=n.DataType},9530:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(13820);t.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}},94813:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(13820),n=a(53536),c=a(71607),d=a(9530);function o(e,t,a){var r=new c.BigNumber(e,10);if(r.isGreaterThan(a))throw new Error("Tried to assign value of "+r+", which exceeds max value of "+a);if(r.isLessThan(t))throw new Error("Tried to assign value of "+r+", which exceeds min value of "+t);if(r.isNaN())throw new Error("Tried to assign NaN value")}function i(e){var t="0x"+e.toString(d.constants.HEX_BASE),a=r.toBuffer(t);return r.setLengthLeft(a,d.constants.EVM_WORD_WIDTH_IN_BYTES)}function f(e){var t=new c.BigNumber(e,10);if(t.isGreaterThanOrEqualTo(0))return i(t);var a=t.times(-1).toString(d.constants.BIN_BASE),r="1".repeat(d.constants.EVM_WORD_WIDTH_IN_BITS-a.length);return n.each(a,(function(e){r+="1"===e?"0":"1"})),i(new c.BigNumber(r,d.constants.BIN_BASE).plus(1))}function s(e,t){var a=r.bufferToHex(e),o=new c.BigNumber(a,d.constants.HEX_BASE);if(!t.isLessThan(0))return o;var i=o.toString(d.constants.BIN_BASE);if(!(i.length===d.constants.EVM_WORD_WIDTH_IN_BITS&&n.startsWith(i[0],"1")))return o;var f="";return n.each(i,(function(e){f+="1"===e?"0":"1"})),new c.BigNumber(f,d.constants.BIN_BASE).plus(1).times(-1)}t.encodeNumericValue=f,t.safeEncodeNumericValue=function(e,t,a){return o(e,t,a),f(e)},t.decodeNumericValue=s,t.safeDecodeNumericValue=function(e,t,a){var r=s(e,t);return o(r,t,a),r}},94480:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=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}();t.Queue=a},86099:function(e,t,a){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&e[Symbol.iterator],a=0;return t?t.call(e):{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var n=a(53536);function c(e){var t=[];n.each(e.children,(function(e){var a=c(e);t.push(a)}));var a={name:e.name,type:e.value};return n.isEmpty(t)||(a.components=t),a}t.generateDataItemFromSignature=function(e){var t,a;if(n.isEmpty(e))throw new Error("Cannot parse data item from empty signature, ''");var d={name:"",value:"",children:[]};try{for(var o=r(e),i=o.next();!i.done;i=o.next()){var f=i.value;switch(f){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+=f}}}catch(l){t={error:l}}finally{try{i&&!i.done&&(a=o.return)&&a.call(o)}finally{if(t)throw t.error}}return c(d)}},98871:function(e,t,a){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&e[Symbol.iterator],a=0;return t?t.call(e):{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var n=a(91253),c=a(53536),d=a(71607);function o(e){var t,a;if(c.endsWith(e,"[]"))throw new Error("Internal error: array types are not supported");if(!c.startsWith(e,"tuple("))throw new Error("Internal error: expected tuple type but got non-tuple type: "+e);var n=e.substring(6,e.length-1),d=[],o="",i=0;try{for(var f=r(n),s=f.next();!s.done;s=f.next()){var b=s.value;switch(b){case"(":i+=1,o+=b;break;case")":i-=1,o+=b;break;case",":if(0===i){d.push(o),o="";break}o+=b;break;default:o+=b}}}catch(l){t={error:l}}finally{try{s&&!s.done&&(a=f.return)&&a.call(f)}finally{if(t)throw t.error}}return d.push(o),d}t.abiUtils={parseEthersParams:function e(t){var a=[],r=[];return t.forEach((function(t){if(null!=t.components){var n="",c=t.type.indexOf("[");c>=0&&(n=t.type.substring(c));var d=e(t.components);a.push({name:t.name||null,names:d.names}),r.push("tuple("+d.types.join(",")+")"+n)}else a.push(t.name||null),r.push(t.type)})),{names:a,types:r}},isAbiDataEqual:function e(t,a,r,n){if(void 0===r&&void 0===n)return!0;if(void 0===r&&void 0!==n)return!1;if(void 0!==r&&void 0===n)return!1;if(c.endsWith(a,"[]")){if(r.length!==n.length)return!1;for(var i=c.trimEnd(a,"[]"),f=0;f1){var n=a+1,d=""+t.name+n;if(c.findIndex(r,(function(e){return e.name===d}))>=0){var o=t.name;throw new Error("Failed to rename overloaded method '"+o+"' to '"+d+"'. A method with this name already exists.")}t.name=d}}))})),a}}},14853:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(13820),n=a(4631),c=a(53536),d=a(14344),o=/^(0x)?[0-9a-f]{40}$/i,i=/^(0x)?([0-9a-f]{40}|[0-9A-F]{40})$/;t.addressUtils={isChecksumAddress:function(e){for(var t=e.replace("0x",""),a=n.keccak256(t.toLowerCase()),r=0;r<40;r++){if(parseInt(a[r],16)>7&&t[r].toUpperCase()!==t[r]||parseInt(a[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1}return!0},isAddress:function(e){return!!o.test(e)&&(!!i.test(e)||t.addressUtils.isChecksumAddress(e))},padZeros:function(e){return r.addHexPrefix(c.padStart(r.stripHexPrefix(e),40,"0"))},generatePseudoRandomAddress:function(){var e=d.generatePseudoRandom256BitNumber();return"0x"+r.sha3(e.toString()).slice(0,20).toString("hex")}}},37565:function(e,t,a){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&e[Symbol.iterator],a=0;return t?t.call(e):{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var n=a(53536);t.classUtils={bindAll:function(e,a,c){var d,o;void 0===a&&(a=["contructor"]);try{for(var i=r(Object.getOwnPropertyNames(e)),f=i.next();!f.done;f=i.next()){var s=f.value,b=e[s];n.includes(a,s)||(n.isFunction(b)?e[s]=b.bind(c||e):n.isObject(b)&&t.classUtils.bindAll(b,a,e))}}catch(l){d={error:l}}finally{try{f&&!f.done&&(o=i.return)&&o.call(i)}finally{if(d)throw d.error}}return e}}},71607:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(1991);if(t.BigNumber=r.BigNumber,r.BigNumber.config({EXPONENTIAL_AT:1e3,DECIMAL_PLACES:78}),a(80334)){var n=a(86494);r.BigNumber.prototype[n.inspect.custom]=function(){return this.toString()}}},62106:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NULL_BYTES="0x"},86838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteNestedProperty=function(e,t){if(e&&t){for(var a=t.split("."),r=e,n=0;n0;)delete r[a.pop()]}}},35695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorUtils={spawnSwitchErr:function(e,t){return new Error("Unexpected switch value: "+t+" encountered for "+e)}}},41632:function(e,t,a){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,a=1,r=arguments.length;a0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(79483);t.promisify=r.promisify;var n=a(14853);t.addressUtils=n.addressUtils;var c=a(37565);t.classUtils=c.classUtils;var d=a(86838);t.deleteNestedProperty=d.deleteNestedProperty;var o=a(18448);t.intervalUtils=o.intervalUtils;var i=a(12076);t.providerUtils=i.providerUtils;var f=a(71607);t.BigNumber=f.BigNumber;var s=a(78666);t.AbiDecoder=s.AbiDecoder;var b=a(33459);t.logUtils=b.logUtils;var l=a(98871);t.abiUtils=l.abiUtils;var u=a(62106);t.NULL_BYTES=u.NULL_BYTES;var h=a(35695);t.errorUtils=h.errorUtils;var p=a(41632);t.fetchAsync=p.fetchAsync;var x=a(97002);t.signTypedDataUtils=x.signTypedDataUtils,t.AbiEncoder=a(5893);var m=a(14344);t.generatePseudoRandom256BitNumber=m.generatePseudoRandom256BitNumber},18448:function(e,t){"use strict";var a=this&&this.__awaiter||function(e,t,a,r){return new(a||(a=Promise))((function(n,c){function d(e){try{i(r.next(e))}catch(t){c(t)}}function o(e){try{i(r.throw(e))}catch(t){c(t)}}function i(e){e.done?n(e.value):new a((function(t){t(e.value)})).then(d,o)}i((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var a,r,n,c,d={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return c={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function o(c){return function(o){return function(c){if(a)throw new TypeError("Generator is already executing.");for(;d;)try{if(a=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return d.label++,{value:c[1],done:!1};case 5:d.label++,r=c[1],c=[0];continue;case 7:c=d.ops.pop(),d.trys.pop();continue;default:if(!(n=(n=d.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d},c=this&&this.__spread||function(){for(var e=[],t=0;t0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d},c=this&&this.__spread||function(){for(var e=[],t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(53536);t.providerUtils={startProviderEngine:function(e){if(void 0===e.start)throw new Error("Invalid Web3ProviderEngine");e._ready.go(),e._running=!0},standardizeOrThrow:function(e){if(void 0===e)throw new Error("supportedProvider cannot be 'undefined'");var t={isStandardizedProvider:!0,isMetaMask:e.isMetaMask,isParity:e.isParity,stop:e.stop,enable:e.enable,sendAsync:r.noop.bind(r)};if(e.isStandardizedProvider)return e;if(e.isEIP1193)return t.sendAsync=function(t,a){var r=t.method,n=t.params;e.send(r,n).then((function(e){a(null,e)})).catch((function(e){a(e)}))},t;if(void 0!==e.sendAsync)return t.sendAsync=e.sendAsync.bind(e),t;if(void 0!==e.send)return r.includes(e.send.toString(),"function (payload, callback)")?(t.sendAsync=e.send.bind(e),t):(t.sendAsync=function(t,a){var r=t.method,n=t.params;e.send(r,n).then((function(e){a(null,e)})).catch((function(e){a(e)}))},t);throw new Error("Unsupported provider found. Please make sure it conforms to one of the supported providers. See 'Provider' type in 'ethereum-types' package.")}}},14344:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(71607);t.generatePseudoRandom256BitNumber=function(){var e=r.BigNumber.random(78),t=new r.BigNumber(10).pow(77);return e.times(t).integerValue()}},97002:function(e,t,a){"use strict";var r=a(26382).Buffer,n=this&&this.__values||function(e){var t="function"===typeof Symbol&&e[Symbol.iterator],a=0;return t?t.call(e):{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var c=a(13820),d=a(66801),o=a(71607);t.signTypedDataUtils={generateTypedDataHash:function(e){return c.sha3(r.concat([r.from("1901","hex"),t.signTypedDataUtils._structHash("EIP712Domain",e.domain,e.types),t.signTypedDataUtils._structHash(e.primaryType,e.message,e.types)]))},_findDependencies:function(e,a,r){var c,d,o,i;if(void 0===r&&(r=[]),r.includes(e)||void 0===a[e])return r;r.push(e);try{for(var f=n(a[e]),s=f.next();!s.done;s=f.next()){var b=s.value;try{for(var l=n(t.signTypedDataUtils._findDependencies(b.type,a,r)),u=l.next();!u.done;u=l.next()){var h=u.value;r.includes(h)||r.push(h)}}catch(p){o={error:p}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}}}catch(x){c={error:x}}finally{try{s&&!s.done&&(d=f.return)&&d.call(f)}finally{if(c)throw c.error}}return r},_encodeType:function(e,a){var r,c,d=t.signTypedDataUtils._findDependencies(e,a);d=d.filter((function(t){return t!==e})),d=[e].concat(d.sort());var o="";try{for(var i=n(d),f=i.next();!f.done;f=i.next()){var s=f.value;o+=s+"("+a[s].map((function(e){var t=e.name;return e.type+" "+t})).join(",")+")"}}catch(b){r={error:b}}finally{try{f&&!f.done&&(c=i.return)&&c.call(i)}finally{if(r)throw r.error}}return o},_encodeData:function(e,a,r){var o,i,f=["bytes32"],s=[t.signTypedDataUtils._typeHash(e,r)];try{for(var b=n(r[e]),l=b.next();!l.done;l=b.next()){var u=l.value,h=a[u.name];if("string"===u.type||"bytes"===u.type){var p=c.sha3(h);f.push("bytes32"),s.push(p)}else if(void 0!==r[u.type]){f.push("bytes32");p=c.sha3(t.signTypedDataUtils._encodeData(u.type,h,r));s.push(p)}else{if(u.type.lastIndexOf("]")===u.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");f.push(u.type);var x=t.signTypedDataUtils._normalizeValue(u.type,h);s.push(x)}}}catch(m){o={error:m}}finally{try{l&&!l.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}return d.utils.defaultAbiCoder.encode(f,s)},_normalizeValue:function(e,t){return"uint256"===e&&o.BigNumber.isBigNumber(t)?t.toString():t},_typeHash:function(e,a){return c.sha3(t.signTypedDataUtils._encodeType(e,a))},_structHash:function(e,a,r){return c.sha3(t.signTypedDataUtils._encodeData(e,a,r))}}},7350:(e,t,a)=>{"use strict";e=a.nmd(e);const r=a(90053),n=(e,t)=>function(){const a=e.apply(r,arguments);return"\x1b[".concat(a+t,"m")},c=(e,t)=>function(){const a=e.apply(r,arguments);return"\x1b[".concat(38+t,";5;").concat(a,"m")},d=(e,t)=>function(){const a=e.apply(r,arguments);return"\x1b[".concat(38+t,";2;").concat(a[0],";").concat(a[1],";").concat(a[2],"m")};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={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]}};t.color.grey=t.color.gray;for(const r of Object.keys(t)){const a=t[r];for(const r of Object.keys(a)){const n=a[r];t[r]={open:"\x1b[".concat(n[0],"m"),close:"\x1b[".concat(n[1],"m")},a[r]=t[r],e.set(n[0],n[1])}Object.defineProperty(t,r,{value:a,enumerable:!1}),Object.defineProperty(t,"codes",{value:e,enumerable:!1})}const a=e=>e,o=(e,t,a)=>[e,t,a];t.color.close="\x1b[39m",t.bgColor.close="\x1b[49m",t.color.ansi={ansi:n(a,0)},t.color.ansi256={ansi256:c(a,0)},t.color.ansi16m={rgb:d(o,0)},t.bgColor.ansi={ansi:n(a,10)},t.bgColor.ansi256={ansi256:c(a,10)},t.bgColor.ansi16m={rgb:d(o,10)};for(let i of Object.keys(r)){if("object"!==typeof r[i])continue;const e=r[i];"ansi16"===i&&(i="ansi"),"ansi16"in e&&(t.color.ansi[i]=n(e.ansi16,0),t.bgColor.ansi[i]=n(e.ansi16,10)),"ansi256"in e&&(t.color.ansi256[i]=c(e.ansi256,0),t.bgColor.ansi256[i]=c(e.ansi256,10)),"rgb"in e&&(t.color.ansi16m[i]=d(e.rgb,0),t.bgColor.ansi16m[i]=d(e.rgb,10))}return t}})},93041:(e,t,a)=>{"use strict";var r=a(62285);const n=a(50139),c=a(7350),d=a(89380).stdout,o=a(89118),i="win32"===r.platform&&!({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WC_PROJECT_ID:"b923303221f8a34de5fcb09f8b528903"}.TERM||"").toLowerCase().startsWith("xterm"),f=["ansi","ansi","ansi256","ansi16m"],s=new Set(["gray"]),b=Object.create(null);function l(e,t){t=t||{};const a=d?d.level:0;e.level=void 0===t.level?a:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function u(e){if(!this||!(this instanceof u)||this.template){const t={};return l(t,e),t.template=function(){const e=[].slice.call(arguments);return m.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,u.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=u,t.template}l(this,e)}i&&(c.blue.open="\x1b[94m");for(const g of Object.keys(c))c[g].closeRe=new RegExp(n(c[g].close),"g"),b[g]={get(){const e=c[g];return p.call(this,this._styles?this._styles.concat(e):[e],this._empty,g)}};b.visible={get(){return p.call(this,this._styles||[],!0,"visible")}},c.color.closeRe=new RegExp(n(c.color.close),"g");for(const g of Object.keys(c.color.ansi))s.has(g)||(b[g]={get(){const e=this.level;return function(){const t={open:c.color[f[e]][g].apply(null,arguments),close:c.color.close,closeRe:c.color.closeRe};return p.call(this,this._styles?this._styles.concat(t):[t],this._empty,g)}}});c.bgColor.closeRe=new RegExp(n(c.bgColor.close),"g");for(const g of Object.keys(c.bgColor.ansi)){if(s.has(g))continue;b["bg"+g[0].toUpperCase()+g.slice(1)]={get(){const e=this.level;return function(){const t={open:c.bgColor[f[e]][g].apply(null,arguments),close:c.bgColor.close,closeRe:c.bgColor.closeRe};return p.call(this,this._styles?this._styles.concat(t):[t],this._empty,g)}}}}const h=Object.defineProperties((()=>{}),b);function p(e,t,a){const r=function(){return x.apply(r,arguments)};r._styles=e,r._empty=t;const n=this;return Object.defineProperty(r,"level",{enumerable:!0,get:()=>n.level,set(e){n.level=e}}),Object.defineProperty(r,"enabled",{enumerable:!0,get:()=>n.enabled,set(e){n.enabled=e}}),r.hasGrey=this.hasGrey||"gray"===a||"grey"===a,r.__proto__=h,r}function x(){const e=arguments,t=e.length;let a=String(arguments[0]);if(0===t)return"";if(t>1)for(let n=1;n{"use strict";const t=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,a=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,c=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1b"],["a","\x07"]]);function d(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):c.get(e)||e}function o(e,t){const a=[],c=t.trim().split(/\s*,\s*/g);let o;for(const i of c)if(isNaN(i)){if(!(o=i.match(r)))throw new Error("Invalid Chalk template style argument: ".concat(i," (in style '").concat(e,"')"));a.push(o[2].replace(n,((e,t,a)=>t?d(t):a)))}else a.push(Number(i));return a}function i(e){a.lastIndex=0;const t=[];let r;for(;null!==(r=a.exec(e));){const e=r[1];if(r[2]){const a=o(e,r[2]);t.push([e].concat(a))}else t.push([e])}return t}function f(e,t){const a={};for(const n of t)for(const e of n.styles)a[e[0]]=n.inverse?null:e.slice(1);let r=e;for(const n of Object.keys(a))if(Array.isArray(a[n])){if(!(n in r))throw new Error("Unknown Chalk style: ".concat(n));r=a[n].length>0?r[n].apply(r,a[n]):r[n]}return r}e.exports=(e,a)=>{const r=[],n=[];let c=[];if(a.replace(t,((t,a,o,s,b,l)=>{if(a)c.push(d(a));else if(s){const t=c.join("");c=[],n.push(0===r.length?t:f(e,r)(t)),r.push({inverse:o,styles:i(s)})}else if(b){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");n.push(f(e,r)(c.join(""))),c=[],r.pop()}else c.push(l)})),n.push(c.join("")),r.length>0){const e="Chalk template literal is missing ".concat(r.length," closing bracket").concat(1===r.length?"":"s"," (`}`)");throw new Error(e)}return n.join("")}},13820:(e,t,a)=>{"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},n=a(30994),c=n.keccak224,d=n.keccak384,o=n.keccak256,i=n.keccak512,f=a(51682),s=a(2539),b=a(3225),l=a(6373),u=a(36059),h=a(59966).Buffer;Object.assign(t,a(8647)),t.MAX_INTEGER=new l("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new l("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=h.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=h.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=h.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=l,t.rlp=b,t.secp256k1=f,t.zeros=function(e){return h.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=t.zeros(20);return t.bufferToHex(e)},t.setLengthLeft=t.setLength=function(e,a,r){var n=t.zeros(a);return e=t.toBuffer(e),r?e.length0&&"0"===a.toString();)a=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!h.isBuffer(e))if(Array.isArray(e))e=h.from(e);else if("string"===typeof e)e=t.isHexString(e)?h.from(t.padToEven(t.stripHexPrefix(e)),"hex"):h.from(e);else if("number"===typeof e)e=t.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},t.bufferToInt=function(e){return new l(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new l(e).fromTwos(256)},t.toUnsigned=function(e){return h.from(e.toTwos(256).toArray())},t.keccak=function(e,a){switch(e=t.toBuffer(e),a||(a=256),a){case 224:return c(e);case 256:return o(e);case 384:return d(e);case 512:return i(e);default:throw new Error("Invald algorithm: keccak"+a)}},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),u("sha256").update(e).digest()},t.ripemd160=function(e,a){e=t.toBuffer(e);var r=u("rmd160").update(e).digest();return!0===a?t.setLength(r,32):r},t.rlphash=function(e){return t.keccak(b.encode(e))},t.isValidPrivate=function(e){return f.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?f.publicKeyVerify(h.concat([h.from([4]),e])):!!t&&f.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,a){return e=t.toBuffer(e),a&&64!==e.length&&(e=f.publicKeyConvert(e,!1).slice(1)),s(64===e.length),t.keccak(e).slice(-20)};var p=t.privateToPublic=function(e){return e=t.toBuffer(e),f.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=f.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var a=f.sign(e,t),r={};return r.r=a.signature.slice(0,32),r.s=a.signature.slice(32,64),r.v=a.recovery+27,r},t.hashPersonalMessage=function(e){var a=t.toBuffer("\x19Ethereum Signed Message:\n"+e.length.toString());return t.keccak(h.concat([a,e]))},t.ecrecover=function(e,a,r,n){var c=h.concat([t.setLength(r,32),t.setLength(n,32)],64),d=a-27;if(0!==d&&1!==d)throw new Error("Invalid signature v value");var o=f.recover(e,c,d);return f.publicKeyConvert(o,!1).slice(1)},t.toRpcSig=function(e,a,r){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(h.concat([t.setLengthLeft(a,32),t.setLengthLeft(r,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var a=e[64];return a<27&&(a+=27),{v:a,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(p(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var a=t.keccak(e).toString("hex"),r="0x",n=0;n=8?r+=e[n].toUpperCase():r+=e[n];return r},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,a){return e=t.toBuffer(e),a=(a=new l(a)).isZero()?null:h.from(a.toArray()),t.rlphash([e,a]).slice(-20)},t.isPrecompiled=function(e){var a=t.unpad(e);return 1===a.length&&a[0]>=1&&a[0]<=8},t.addHexPrefix=function(e){return"string"!==typeof e||t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,a,r){var n=new l("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),c=new l("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===a.length&&((27===e||28===e)&&(t=new l(t),a=new l(a),!(t.isZero()||t.gt(c)||a.isZero()||a.gt(c))&&(!1!==r||1!==new l(a).cmp(n))))},t.baToJSON=function(e){if(h.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var a=[],r=0;r=n.length,"The field "+a.name+" must not have more "+a.length+" bytes")):a.allowZero&&0===n.length||!a.length||s(a.length===n.length,"The field "+a.name+" must have byte length of "+a.length),e.raw[r]=n}e._fields.push(a.name),Object.defineProperty(e,a.name,{enumerable:!0,configurable:!0,get:n,set:c}),a.default&&(e[a.name]=a.default),a.alias&&Object.defineProperty(e,a.alias,{enumerable:!1,configurable:!0,set:c,get:n})})),n)if("string"===typeof n&&(n=h.from(t.stripHexPrefix(n),"hex")),h.isBuffer(n)&&(n=b.decode(n)),Array.isArray(n)){if(n.length>e._fields.length)throw new Error("wrong number of fields in data");n.forEach((function(a,r){e[e._fields[r]]=t.toBuffer(a)}))}else{if("object"!==("undefined"===typeof n?"undefined":r(n)))throw new Error("invalid data");var c=Object.keys(n);a.forEach((function(t){-1!==c.indexOf(t.name)&&(e[t.name]=n[t.name]),-1!==c.indexOf(t.alias)&&(e[t.alias]=n[t.alias])}))}}},51682:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=a(59490),c=a(4785),d=a(93278),o=function(e){return 32===e.length&&n.privateKeyVerify(Uint8Array.from(e))};e.exports={privateKeyVerify:o,privateKeyExport:function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var a=c.privateKeyExport(e,t);return d.privateKeyExport(e,a,t)},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(n.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return r.from(c.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,t){return r.from(n.privateKeyTweakAdd(Uint8Array.from(e),t))},privateKeyTweakMul:function(e,t){return r.from(n.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},publicKeyCreate:function(e,t){return r.from(n.publicKeyCreate(Uint8Array.from(e),t))},publicKeyConvert:function(e,t){return r.from(n.publicKeyConvert(Uint8Array.from(e),t))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&n.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,t,a){return r.from(n.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),a))},publicKeyTweakMul:function(e,t,a){return r.from(n.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),a))},publicKeyCombine:function(e,t){var a=[];return e.forEach((function(e){a.push(Uint8Array.from(e))})),r.from(n.publicKeyCombine(a,t))},signatureNormalize:function(e){return r.from(n.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return r.from(n.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return r.from(n.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=d.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return c.signatureImport(t)},sign:function(e,t,a){if(null===a)throw new TypeError("options should be an Object");var c=void 0;if(a){if(c={},null===a.data)throw new TypeError("options.data should be a Buffer");if(a.data){if(32!==a.data.length)throw new RangeError("options.data length is invalid");c.data=new Uint8Array(a.data)}if(null===a.noncefn)throw new TypeError("options.noncefn should be a Function");a.noncefn&&(c.noncefn=function(e,t,n,c,d){var o=null!=n?r.from(n):null,i=null!=c?r.from(c):null,f=r.from("");return a.noncefn&&(f=a.noncefn(r.from(e),r.from(t),o,i,d)),Uint8Array.from(f)})}var d=n.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),c);return{signature:r.from(d.signature),recovery:d.recid}},verify:function(e,t,a){return n.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),a)},recover:function(e,t,a,c){return r.from(n.ecdsaRecover(Uint8Array.from(t),a,Uint8Array.from(e),c))},ecdh:function(e,t){return r.from(n.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},ecdhUnsafe:function(e,t,a){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return r.from(c.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),a))}}},93278:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=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]),c=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]);t.privateKeyExport=function(e,t,a){var d=r.from(a?n:c);return e.copy(d,a?8:9),t.copy(d,a?181:214),d},t.privateKeyImport=function(e){var t=e.length,a=0;if(t2)return null;if(t<(a+=1)+r)return null;var n=e[a+r-1]|(r>1?e[a+r-2]<<8:0);return t<(a+=r)+n||t32||tn)return null;if(2!==e[c++])return null;var o=e[c++];if(128&o){if(c+(d=o-128)>n)return null;for(;d>0&&0===e[c];c+=1,d-=1);for(o=0;d>0;c+=1,d-=1)o=(o<<8)+e[c]}if(o>n-c)return null;var i=c;if(c+=o,2!==e[c++])return null;var f=e[c++];if(128&f){if(c+(d=f-128)>n)return null;for(;d>0&&0===e[c];c+=1,d-=1);for(f=0;d>0;c+=1,d-=1)f=(f<<8)+e[c]}if(f>n-c)return null;var s=c;for(c+=f;o>0&&0===e[i];o-=1,i+=1);if(o>32)return null;var b=e.slice(i,i+o);for(b.copy(t,32-b.length);f>0&&0===e[s];f-=1,s+=1);if(f>32)return null;var l=e.slice(s,s+f);return l.copy(a,32-l.length),{r:t,s:a}}},4785:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=a(6373),c=new(0,a(31079).ec)("secp256k1"),d=c.curve;t.privateKeyExport=function(e,t){var a=new n(e);if(a.ucmp(d.n)>=0)throw new Error("couldn't export to DER format");var r=c.g.mul(a);return o(r.getX(),r.getY(),t)},t.privateKeyModInverse=function(e){var t=new n(e);if(t.ucmp(d.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(d.n).toArrayLike(r,"be",32)},t.signatureImport=function(e){var t=new n(e.r);t.ucmp(d.n)>=0&&(t=new n(0));var a=new n(e.s);return a.ucmp(d.n)>=0&&(a=new n(0)),r.concat([t.toArrayLike(r,"be",32),a.toArrayLike(r,"be",32)])},t.ecdhUnsafe=function(e,t,a){var r=c.keyFromPublic(e),i=new n(t);if(i.ucmp(d.n)>=0||i.isZero())throw new Error("scalar was invalid (zero or overflow)");var f=r.pub.mul(i);return o(f.getX(),f.getY(),a)};var o=function(e,t,a){var n=void 0;return a?((n=r.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(r,"be",32).copy(n,1)):((n=r.alloc(65))[0]=4,e.toArrayLike(r,"be",32).copy(n,1),t.toArrayLike(r,"be",32).copy(n,33)),n}},31079:(e,t,a)=>{"use strict";var r=t;r.version=a(70971).rE,r.utils=a(39417),r.rand=a(88462),r.curve=a(38388),r.curves=a(37630),r.ec=a(45641),r.eddsa=a(3384)},3387:(e,t,a)=>{"use strict";var r=a(6373),n=a(39417),c=n.getNAF,d=n.getJSF,o=n.assert;function i(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.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=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.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;var a=this.n&&this.p.div(this.n);!a||a.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=i,i.prototype.point=function(){throw new Error("Not implemented")},i.prototype.validate=function(){throw new Error("Not implemented")},i.prototype._fixedNafMul=function(e,t){o(e.precomputed);var a=e._getDoubles(),r=c(t,1,this._bitLength),n=(1<=d;s--)i=(i<<1)+r[s];f.push(i)}for(var b=this.jpoint(null,null,null),l=this.jpoint(null,null,null),u=n;u>0;u--){for(d=0;d=0;f--){for(var s=0;f>=0&&0===d[f];f--)s++;if(f>=0&&s++,i=i.dblp(s),f<0)break;var b=d[f];o(0!==b),i="affine"===e.type?b>0?i.mixedAdd(n[b-1>>1]):i.mixedAdd(n[-b-1>>1].neg()):b>0?i.add(n[b-1>>1]):i.add(n[-b-1>>1].neg())}return"affine"===e.type?i.toP():i},i.prototype._wnafMulAdd=function(e,t,a,r,n){var o,i,f,s=this._wnafT1,b=this._wnafT2,l=this._wnafT3,u=0;for(o=0;o=1;o-=2){var p=o-1,x=o;if(1===s[p]&&1===s[x]){var m=[t[p],null,null,t[x]];0===t[p].y.cmp(t[x].y)?(m[1]=t[p].add(t[x]),m[2]=t[p].toJ().mixedAdd(t[x].neg())):0===t[p].y.cmp(t[x].y.redNeg())?(m[1]=t[p].toJ().mixedAdd(t[x]),m[2]=t[p].add(t[x].neg())):(m[1]=t[p].toJ().mixedAdd(t[x]),m[2]=t[p].toJ().mixedAdd(t[x].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=d(a[p],a[x]);for(u=Math.max(v[0].length,u),l[p]=new Array(u),l[x]=new Array(u),i=0;i=0;o--){for(var _=0;o>=0;){var A=!0;for(i=0;i=0&&_++,k=k.dblp(_),o<0)break;for(i=0;i0?f=b[i][E-1>>1]:E<0&&(f=b[i][-E-1>>1].neg()),k="affine"===f.type?k.mixedAdd(f):k.add(f))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var a=[this],r=this,n=0;n{"use strict";var r=a(39417),n=a(6373),c=a(56329),d=a(3387),o=r.assert;function i(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&-1===(0|e.a),this.extended=this.mOneA,d.call(this,"edwards",e),this.a=new n(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}function f(e,t,a,r,c){d.BasePoint.call(this,e,"projective"),null===t&&null===a&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(t,16),this.y=new n(a,16),this.z=r?new n(r,16):this.curve.one,this.t=c&&new n(c,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}c(i,d),e.exports=i,i.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},i.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},i.prototype.jpoint=function(e,t,a,r){return this.point(e,t,a,r)},i.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var a=e.redSqr(),r=this.c2.redSub(this.a.redMul(a)),c=this.one.redSub(this.c2.redMul(this.d).redMul(a)),d=r.redMul(c.redInvm()),o=d.redSqrt();if(0!==o.redSqr().redSub(d).cmp(this.zero))throw new Error("invalid point");var i=o.fromRed().isOdd();return(t&&!i||!t&&i)&&(o=o.redNeg()),this.point(e,o)},i.prototype.pointFromY=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var a=e.redSqr(),r=a.redSub(this.c2),c=a.redMul(this.d).redMul(this.c2).redSub(this.a),d=r.redMul(c.redInvm());if(0===d.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=d.redSqrt();if(0!==o.redSqr().redSub(d).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},i.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),a=e.y.redSqr(),r=t.redMul(this.a).redAdd(a),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(a)));return 0===r.cmp(n)},c(f,d.BasePoint),i.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},i.prototype.point=function(e,t,a,r){return new f(this,e,t,a,r)},f.fromJSON=function(e,t){return new f(e,t[0],t[1],t[2])},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),a=this.z.redSqr();a=a.redIAdd(a);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),c=r.redAdd(t),d=c.redSub(a),o=r.redSub(t),i=n.redMul(d),f=c.redMul(o),s=n.redMul(o),b=d.redMul(c);return this.curve.point(i,f,b,s)},f.prototype._projDbl=function(){var e,t,a,r,n,c,d=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),i=this.y.redSqr();if(this.curve.twisted){var f=(r=this.curve._mulA(o)).redAdd(i);this.zOne?(e=d.redSub(o).redSub(i).redMul(f.redSub(this.curve.two)),t=f.redMul(r.redSub(i)),a=f.redSqr().redSub(f).redSub(f)):(n=this.z.redSqr(),c=f.redSub(n).redISub(n),e=d.redSub(o).redISub(i).redMul(c),t=f.redMul(r.redSub(i)),a=f.redMul(c))}else r=o.redAdd(i),n=this.curve._mulC(this.z).redSqr(),c=r.redSub(n).redSub(n),e=this.curve._mulC(d.redISub(r)).redMul(c),t=this.curve._mulC(r).redMul(o.redISub(i)),a=r.redMul(c);return this.curve.point(e,t,a)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),a=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),c=a.redSub(t),d=n.redSub(r),o=n.redAdd(r),i=a.redAdd(t),f=c.redMul(d),s=o.redMul(i),b=c.redMul(i),l=d.redMul(o);return this.curve.point(f,s,l,b)},f.prototype._projAdd=function(e){var t,a,r=this.z.redMul(e.z),n=r.redSqr(),c=this.x.redMul(e.x),d=this.y.redMul(e.y),o=this.curve.d.redMul(c).redMul(d),i=n.redSub(o),f=n.redAdd(o),s=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(c).redISub(d),b=r.redMul(i).redMul(s);return this.curve.twisted?(t=r.redMul(f).redMul(d.redSub(this.curve._mulA(c))),a=i.redMul(f)):(t=r.redMul(f).redMul(d.redSub(c)),a=this.curve._mulC(i).redMul(f)),this.curve.point(b,t,a)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,a){return this.curve._wnafMulAdd(1,[this,t],[e,a],2,!1)},f.prototype.jmulAdd=function(e,t,a){return this.curve._wnafMulAdd(1,[this,t],[e,a],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var a=e.clone(),r=this.curve.redN.redMul(this.z);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},38388:(e,t,a)=>{"use strict";var r=t;r.base=a(3387),r.short=a(5658),r.mont=a(25424),r.edwards=a(63296)},25424:(e,t,a)=>{"use strict";var r=a(6373),n=a(56329),c=a(3387),d=a(39417);function o(e){c.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,t,a){c.BasePoint.call(this,e,"projective"),null===t&&null===a?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(o,c),e.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,a=t.redSqr(),r=a.redMul(t).redAdd(a.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},n(i,c.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(d.toArray(e,t),1)},o.prototype.point=function(e,t){return new i(this,e,t)},o.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,t){return new i(e,t[0],t[1]||e.one)},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),a=e.redSub(t),r=e.redMul(t),n=a.redMul(t.redAdd(this.curve.a24.redMul(a)));return this.curve.point(r,n)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,t){var a=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),c=e.x.redSub(e.z).redMul(a),d=n.redMul(r),o=t.z.redMul(c.redAdd(d).redSqr()),i=t.x.redMul(c.redISub(d).redSqr());return this.curve.point(o,i)},i.prototype.mul=function(e){for(var t=e.clone(),a=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var c=n.length-1;c>=0;c--)0===n[c]?(a=a.diffAdd(r,this),r=r.dbl()):(r=a.diffAdd(r,this),a=a.dbl());return r},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},5658:(e,t,a)=>{"use strict";var r=a(39417),n=a(6373),c=a(56329),d=a(3387),o=r.assert;function i(e){d.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,a,r){d.BasePoint.call(this,e,"affine"),null===t&&null===a?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(a,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function s(e,t,a,r){d.BasePoint.call(this,e,"jacobian"),null===t&&null===a&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(a,16),this.z=new n(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}c(i,d),e.exports=i,i.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,a;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)a=new n(e.lambda,16);else{var c=this._getEndoRoots(this.n);0===this.g.mul(c[0]).x.cmp(this.g.x.redMul(t))?a=c[0]:(a=c[1],o(0===this.g.mul(a).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:a,basis:e.basis?e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(a)}}},i.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),a=new n(2).toRed(t).redInvm(),r=a.redNeg(),c=new n(3).toRed(t).redNeg().redSqrt().redMul(a);return[r.redAdd(c).fromRed(),r.redSub(c).fromRed()]},i.prototype._getEndoBasis=function(e){for(var t,a,r,c,d,o,i,f,s,b=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,u=this.n.clone(),h=new n(1),p=new n(0),x=new n(0),m=new n(1),g=0;0!==l.cmpn(0);){var v=u.div(l);f=u.sub(v.mul(l)),s=x.sub(v.mul(h));var y=m.sub(v.mul(p));if(!r&&f.cmp(b)<0)t=i.neg(),a=h,r=f.neg(),c=s;else if(r&&2===++g)break;i=f,u=l,l=f,x=h,h=s,m=p,p=y}d=f.neg(),o=s;var w=r.sqr().add(c.sqr());return d.sqr().add(o.sqr()).cmp(w)>=0&&(d=t,o=a),r.negative&&(r=r.neg(),c=c.neg()),d.negative&&(d=d.neg(),o=o.neg()),[{a:r,b:c},{a:d,b:o}]},i.prototype._endoSplit=function(e){var t=this.endo.basis,a=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),c=a.b.neg().mul(e).divRound(this.n),d=n.mul(a.a),o=c.mul(r.a),i=n.mul(a.b),f=c.mul(r.b);return{k1:e.sub(d).sub(o),k2:i.add(f).neg()}},i.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var a=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=a.redSqrt();if(0!==r.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=r.fromRed().isOdd();return(t&&!c||!t&&c)&&(r=r.redNeg()),this.point(e,r)},i.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,a=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===a.redSqr().redISub(n).cmpn(0)},i.prototype._endoWnafMulAdd=function(e,t,a){for(var r=this._endoWnafT1,n=this._endoWnafT2,c=0;c":""},f.prototype.isInfinity=function(){return this.inf},f.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);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var a=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,r)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,a=this.x.redSqr(),r=e.redInvm(),n=a.redAdd(a).redIAdd(a).redIAdd(t).redMul(r),c=n.redSqr().redISub(this.x.redAdd(this.x)),d=n.redMul(this.x.redSub(c)).redISub(this.y);return this.curve.point(c,d)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new n(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)},f.prototype.mulAdd=function(e,t,a){var r=[this,t],n=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},f.prototype.jmulAdd=function(e,t,a){var r=[this,t],n=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},f.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))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var a=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:a.naf&&{wnd:a.naf.wnd,points:a.naf.points.map(r)},doubles:a.doubles&&{step:a.doubles.step,points:a.doubles.points.map(r)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},c(s,d.BasePoint),i.prototype.jpoint=function(e,t,a){return new s(this,e,t,a)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),a=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(a,r)},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 t=e.z.redSqr(),a=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(a),c=this.y.redMul(t.redMul(e.z)),d=e.y.redMul(a.redMul(this.z)),o=r.redSub(n),i=c.redSub(d);if(0===o.cmpn(0))return 0!==i.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),s=f.redMul(o),b=r.redMul(f),l=i.redSqr().redIAdd(s).redISub(b).redISub(b),u=i.redMul(b.redISub(l)).redISub(c.redMul(s)),h=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(l,u,h)},s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),a=this.x,r=e.x.redMul(t),n=this.y,c=e.y.redMul(t).redMul(this.z),d=a.redSub(r),o=n.redSub(c);if(0===d.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var i=d.redSqr(),f=i.redMul(d),s=a.redMul(i),b=o.redSqr().redIAdd(f).redISub(s).redISub(s),l=o.redMul(s.redISub(b)).redISub(n.redMul(f)),u=this.z.redMul(d);return this.curve.jpoint(b,l,u)},s.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var a=this;for(t=0;t=0)return!1;if(a.redIAdd(n),0===this.x.cmp(a))return!0}},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},37630:(e,t,a)=>{"use strict";var r,n=t,c=a(2766),d=a(38388),o=a(39417).assert;function i(e){"short"===e.type?this.curve=new d.short(e):"edwards"===e.type?this.curve=new d.edwards(e):this.curve=new d.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var a=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:a}),a}})}n.PresetCurve=i,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:c.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:c.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:c.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:c.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:c.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:c.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:c.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=a(51945)}catch(s){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:c.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},45641:(e,t,a)=>{"use strict";var r=a(6373),n=a(31172),c=a(39417),d=a(37630),o=a(88462),i=c.assert,f=a(74458),s=a(46031);function b(e){if(!(this instanceof b))return new b(e);"string"===typeof e&&(i(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}e.exports=b,b.prototype.keyPair=function(e){return new f(this,e)},b.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},b.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},b.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),c=this.n.sub(new r(2));;){var d=new r(t.generate(a));if(!(d.cmp(c)>0))return d.iaddn(1),this.keyFromPrivate(d)}},b.prototype._truncateToN=function(e,t){var a=8*e.byteLength()-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},b.prototype.sign=function(e,t,a,c){"object"===typeof a&&(c=a,a=null),c||(c={}),t=this.keyFromPrivate(t,a),e=this._truncateToN(new r(e,16));for(var d=this.n.byteLength(),o=t.getPrivate().toArray("be",d),i=e.toArray("be",d),f=new n({hash:this.hash,entropy:o,nonce:i,pers:c.pers,persEnc:c.persEnc||"utf8"}),b=this.n.sub(new r(1)),l=0;;l++){var u=c.k?c.k(l):new r(f.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(b)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var p=h.getX(),x=p.umod(this.n);if(0!==x.cmpn(0)){var m=u.invm(this.n).mul(x.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(h.getY().isOdd()?1:0)|(0!==p.cmp(x)?2:0);return c.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new s({r:x,s:m,recoveryParam:g})}}}}}},b.prototype.verify=function(e,t,a,n){e=this._truncateToN(new r(e,16)),a=this.keyFromPublic(a,n);var c=(t=new s(t,"hex")).r,d=t.s;if(c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;if(d.cmpn(1)<0||d.cmp(this.n)>=0)return!1;var o,i=d.invm(this.n),f=i.mul(e).umod(this.n),b=i.mul(c).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(f,a.getPublic(),b)).isInfinity()&&o.eqXToP(c):!(o=this.g.mulAdd(f,a.getPublic(),b)).isInfinity()&&0===o.getX().umod(this.n).cmp(c)},b.prototype.recoverPubKey=function(e,t,a,n){i((3&a)===a,"The recovery param is more than two bits"),t=new s(t,n);var c=this.n,d=new r(e),o=t.r,f=t.s,b=1&a,l=a>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");o=l?this.curve.pointFromX(o.add(this.curve.n),b):this.curve.pointFromX(o,b);var u=t.r.invm(c),h=c.sub(d).mul(u).umod(c),p=f.mul(u).umod(c);return this.g.mulAdd(h,o,p)},b.prototype.getKeyRecoveryParam=function(e,t,a,r){if(null!==(t=new s(t,r)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var c;try{c=this.recoverPubKey(e,t,n)}catch(e){continue}if(c.eq(a))return n}throw new Error("Unable to find valid recovery factor")}},74458:(e,t,a)=>{"use strict";var r=a(6373),n=a(39417).assert;function c(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=c,c.fromPublic=function(e,t,a){return t instanceof c?t:new c(e,{pub:t,pubEnc:a})},c.fromPrivate=function(e,t,a){return t instanceof c?t:new c(e,{priv:t,privEnc:a})},c.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"}},c.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},c.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},c.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},c.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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,t)},c.prototype.derive=function(e){return e.validate()||n(e.validate(),"public point not validated"),e.mul(this.priv).getX()},c.prototype.sign=function(e,t,a){return this.ec.sign(e,this,t,a)},c.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},c.prototype.inspect=function(){return""}},46031:(e,t,a)=>{"use strict";var r=a(6373),n=a(39417),c=n.assert;function d(e,t){if(e instanceof d)return e;this._importDER(e,t)||(c(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 i(e,t){var a=e[t.place++];if(!(128&a))return a;var r=15&a;if(0===r||r>4)return!1;for(var n=0,c=0,d=t.place;c>>=0;return!(n<=127)&&(t.place=d,n)}function f(e){for(var t=0,a=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|a);--a;)e.push(t>>>(a<<3)&255);e.push(t)}}e.exports=d,d.prototype._importDER=function(e,t){e=n.toArray(e,t);var a=new o;if(48!==e[a.place++])return!1;var c=i(e,a);if(!1===c)return!1;if(c+a.place!==e.length)return!1;if(2!==e[a.place++])return!1;var d=i(e,a);if(!1===d)return!1;var f=e.slice(a.place,d+a.place);if(a.place+=d,2!==e[a.place++])return!1;var s=i(e,a);if(!1===s)return!1;if(e.length!==s+a.place)return!1;var b=e.slice(a.place,s+a.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===b[0]){if(!(128&b[1]))return!1;b=b.slice(1)}return this.r=new r(f),this.s=new r(b),this.recoveryParam=null,!0},d.prototype.toDER=function(e){var t=this.r.toArray(),a=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&a[0]&&(a=[0].concat(a)),t=f(t),a=f(a);!a[0]&&!(128&a[1]);)a=a.slice(1);var r=[2];s(r,t.length),(r=r.concat(t)).push(2),s(r,a.length);var c=r.concat(a),d=[48];return s(d,c.length),d=d.concat(c),n.encode(d,e)}},3384:(e,t,a)=>{"use strict";var r=a(2766),n=a(37630),c=a(39417),d=c.assert,o=c.parseBytes,i=a(30347),f=a(23542);function s(e){if(d("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof s))return new s(e);e=n[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=s,s.prototype.sign=function(e,t){e=o(e);var a=this.keyFromSecret(t),r=this.hashInt(a.messagePrefix(),e),n=this.g.mul(r),c=this.encodePoint(n),d=this.hashInt(c,a.pubBytes(),e).mul(a.priv()),i=r.add(d).umod(this.curve.n);return this.makeSignature({R:n,S:i,Rencoded:c})},s.prototype.verify=function(e,t,a){e=o(e),t=this.makeSignature(t);var r=this.keyFromPublic(a),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),c=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(c)},s.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var r=a(39417),n=r.assert,c=r.parseBytes,d=r.cachedProperty;function o(e,t){this.eddsa=e,this._secret=c(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=c(t.pub)}o.fromPublic=function(e,t){return t instanceof o?t:new o(e,{pub:t})},o.fromSecret=function(e,t){return t instanceof o?t:new o(e,{secret:t})},o.prototype.secret=function(){return this._secret},d(o,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),d(o,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),d(o,"privBytes",(function(){var e=this.eddsa,t=this.hash(),a=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[a]&=127,r[a]|=64,r})),d(o,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),d(o,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),d(o,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),o.prototype.sign=function(e){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},o.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},o.prototype.getSecret=function(e){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},o.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=o},23542:(e,t,a)=>{"use strict";var r=a(6373),n=a(39417),c=n.assert,d=n.cachedProperty,o=n.parseBytes;function i(e,t){this.eddsa=e,"object"!==typeof t&&(t=o(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),c(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}d(i,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),d(i,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),d(i,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),d(i,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),i.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},i.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},e.exports=i},51945:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},39417:(e,t,a)=>{"use strict";var r=t,n=a(6373),c=a(75482),d=a(49848);r.assert=c,r.toArray=d.toArray,r.zero2=d.zero2,r.toHex=d.toHex,r.encode=d.encode,r.getNAF=function(e,t,a){var r,n=new Array(Math.max(e.bitLength(),a)+1);for(r=0;r(c>>1)-1?(c>>1)-i:i,d.isubn(o)):o=0,n[r]=o,d.iushrn(1)}return n},r.getJSF=function(e,t){var a=[[],[]];e=e.clone(),t=t.clone();for(var r,n=0,c=0;e.cmpn(-n)>0||t.cmpn(-c)>0;){var d,o,i=e.andln(3)+n&3,f=t.andln(3)+c&3;3===i&&(i=-1),3===f&&(f=-1),d=0===(1&i)?0:3!==(r=e.andln(7)+n&7)&&5!==r||2!==f?i:-i,a[0].push(d),o=0===(1&f)?0:3!==(r=t.andln(7)+c&7)&&5!==r||2!==i?f:-f,a[1].push(o),2*n===d+1&&(n=1-n),2*c===o+1&&(c=1-c),e.iushrn(1),t.iushrn(1)}return a},r.cachedProperty=function(e,t,a){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=a.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new n(e,"hex","le")}},2766:(e,t,a)=>{var r=t;r.utils=a(41320),r.common=a(11564),r.sha=a(85147),r.ripemd=a(58818),r.hmac=a(66230),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},11564:(e,t,a)=>{"use strict";var r=a(41320),n=a(75482);function c(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=c,c.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var 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 n=0;n>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,c=8;c{"use strict";var r=a(41320),n=a(75482);function c(e,t,a){if(!(this instanceof c))return new c(e,t,a);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,a))}e.exports=c,c.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var r=a(41320),n=a(11564),c=r.rotl32,d=r.sum32,o=r.sum32_3,i=r.sum32_4,f=n.BlockHash;function s(){if(!(this instanceof s))return new s;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function b(e,t,a,r){return e<=15?t^a^r:e<=31?t&a|~t&r:e<=47?(t|~a)^r:e<=63?t&r|a&~r:t^(a|~r)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function u(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(s,f),t.ripemd160=s,s.blockSize=512,s.outSize=160,s.hmacStrength=192,s.padLength=64,s.prototype._update=function(e,t){for(var a=this.h[0],r=this.h[1],n=this.h[2],f=this.h[3],s=this.h[4],g=a,v=r,y=n,w=f,k=s,I=0;I<80;I++){var _=d(c(i(a,b(I,r,n,f),e[h[I]+t],l(I)),x[I]),s);a=s,s=f,f=c(n,10),n=r,r=_,_=d(c(i(g,b(79-I,v,y,w),e[p[I]+t],u(I)),m[I]),k),g=k,k=w,w=c(y,10),y=v,v=_}_=o(this.h[1],n,w),this.h[1]=o(this.h[2],f,k),this.h[2]=o(this.h[3],s,g),this.h[3]=o(this.h[4],a,v),this.h[4]=o(this.h[0],r,y),this.h[0]=_},s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],x=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},85147:(e,t,a)=>{"use strict";t.sha1=a(45047),t.sha224=a(69196),t.sha256=a(63641),t.sha384=a(19933),t.sha512=a(47676)},45047:(e,t,a)=>{"use strict";var r=a(41320),n=a(11564),c=a(65999),d=r.rotl32,o=r.sum32,i=r.sum32_5,f=c.ft_1,s=n.BlockHash,b=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(l,s),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var a=this.W,r=0;r<16;r++)a[r]=e[t+r];for(;r{"use strict";var r=a(41320),n=a(63641);function c(){if(!(this instanceof c))return new c;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(c,n),e.exports=c,c.blockSize=512,c.outSize=224,c.hmacStrength=192,c.padLength=64,c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},63641:(e,t,a)=>{"use strict";var r=a(41320),n=a(11564),c=a(65999),d=a(75482),o=r.sum32,i=r.sum32_4,f=r.sum32_5,s=c.ch32,b=c.maj32,l=c.s0_256,u=c.s1_256,h=c.g0_256,p=c.g1_256,x=n.BlockHash,m=[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 g(){if(!(this instanceof g))return new g;x.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}r.inherits(g,x),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var a=this.W,r=0;r<16;r++)a[r]=e[t+r];for(;r{"use strict";var r=a(41320),n=a(47676);function c(){if(!(this instanceof c))return new c;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(c,n),e.exports=c,c.blockSize=1024,c.outSize=384,c.hmacStrength=192,c.padLength=128,c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},47676:(e,t,a)=>{"use strict";var r=a(41320),n=a(11564),c=a(75482),d=r.rotr64_hi,o=r.rotr64_lo,i=r.shr64_hi,f=r.shr64_lo,s=r.sum64,b=r.sum64_hi,l=r.sum64_lo,u=r.sum64_4_hi,h=r.sum64_4_lo,p=r.sum64_5_hi,x=r.sum64_5_lo,m=n.BlockHash,g=[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 v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function y(e,t,a,r,n){var c=e&a^~e&n;return c<0&&(c+=4294967296),c}function w(e,t,a,r,n,c){var d=t&r^~t&c;return d<0&&(d+=4294967296),d}function k(e,t,a,r,n){var c=e&a^e&n^a&n;return c<0&&(c+=4294967296),c}function I(e,t,a,r,n,c){var d=t&r^t&c^r&c;return d<0&&(d+=4294967296),d}function _(e,t){var a=d(e,t,28)^d(t,e,2)^d(t,e,7);return a<0&&(a+=4294967296),a}function A(e,t){var a=o(e,t,28)^o(t,e,2)^o(t,e,7);return a<0&&(a+=4294967296),a}function E(e,t){var a=d(e,t,14)^d(e,t,18)^d(t,e,9);return a<0&&(a+=4294967296),a}function S(e,t){var a=o(e,t,14)^o(e,t,18)^o(t,e,9);return a<0&&(a+=4294967296),a}function N(e,t){var a=d(e,t,1)^d(e,t,8)^i(e,t,7);return a<0&&(a+=4294967296),a}function M(e,t){var a=o(e,t,1)^o(e,t,8)^f(e,t,7);return a<0&&(a+=4294967296),a}function H(e,t){var a=d(e,t,19)^d(t,e,29)^i(e,t,6);return a<0&&(a+=4294967296),a}function T(e,t){var a=o(e,t,19)^o(t,e,29)^f(e,t,6);return a<0&&(a+=4294967296),a}r.inherits(v,m),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var a=this.W,r=0;r<32;r++)a[r]=e[t+r];for(;r{"use strict";var r=a(41320).rotr32;function n(e,t,a){return e&t^~e&a}function c(e,t,a){return e&t^e&a^t&a}function d(e,t,a){return e^t^a}t.ft_1=function(e,t,a,r){return 0===e?n(t,a,r):1===e||3===e?d(t,a,r):2===e?c(t,a,r):void 0},t.ch32=n,t.maj32=c,t.p32=d,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},41320:(e,t,a)=>{"use strict";var r=a(75482),n=a(56329);function c(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function d(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function i(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}t.inherits=n,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var a=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),n=0;n>6|192,a[r++]=63&d|128):c(e,n)?(d=65536+((1023&d)<<10)+(1023&e.charCodeAt(++n)),a[r++]=d>>18|240,a[r++]=d>>12&63|128,a[r++]=d>>6&63|128,a[r++]=63&d|128):(a[r++]=d>>12|224,a[r++]=d>>6&63|128,a[r++]=63&d|128)}else for(n=0;n>>0}return d},t.split32=function(e,t){for(var a=new Array(4*e.length),r=0,n=0;r>>24,a[n+1]=c>>>16&255,a[n+2]=c>>>8&255,a[n+3]=255&c):(a[n+3]=c>>>24,a[n+2]=c>>>16&255,a[n+1]=c>>>8&255,a[n]=255&c)}return a},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,a){return e+t+a>>>0},t.sum32_4=function(e,t,a,r){return e+t+a+r>>>0},t.sum32_5=function(e,t,a,r,n){return e+t+a+r+n>>>0},t.sum64=function(e,t,a,r){var n=e[t],c=r+e[t+1]>>>0,d=(c>>0,e[t+1]=c},t.sum64_hi=function(e,t,a,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,a,r){return t+r>>>0},t.sum64_4_hi=function(e,t,a,r,n,c,d,o){var i=0,f=t;return i+=(f=f+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,a,r,n,c,d,o){return t+r+c+o>>>0},t.sum64_5_hi=function(e,t,a,r,n,c,d,o,i,f){var s=0,b=t;return s+=(b=b+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,a,r,n,c,d,o,i,f){return t+r+c+o+f>>>0},t.rotr64_hi=function(e,t,a){return(t<<32-a|e>>>a)>>>0},t.rotr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0},t.shr64_hi=function(e,t,a){return e>>>a},t.shr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0}},66801:(e,t,a)=>{var r;e.exports=function e(t,n,c){function d(i,f){if(!n[i]){if(!t[i]){var s=void 0;if(!f&&s)return r(i,!0);if(o)return o(i,!0);throw(s=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",a(79004)}s=n[i]={exports:{}},t[i][0].call(s.exports,(function(e){return d(t[i][1][e]||e)}),s,s.exports,e,t,n,c)}return n[i].exports}for(var o=void 0,i=0;io[e]||console.log.apply(console,t)}function s(){for(var e=[],t=0;t>4]+i[15&r])}return t.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],p=[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],x=[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],g=[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],v=[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],w=[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],k=[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],A=[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],E=[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 S(e){for(var t=[],a=0;a>2][t%4]=c[t],this._Kd[e-a][t%4]=c[t];for(var d,o=0,i=n;i>16&255]<<24^u[d>>8&255]<<16^u[255&d]<<8^u[d>>24&255]^l[o]<<24,o+=1,8!=n)for(t=1;t>8&255]<<8^u[d>>16&255]<<16^u[d>>24&255]<<24,t=n/2+1;t>2][s=i%4]=c[t],this._Kd[e-f][s]=c[t++],i++}for(var f=1;f>24&255]^_[d>>16&255]^A[d>>8&255]^E[255&d]},N.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,a=[0,0,0,0],r=S(e),n=0;n<4;n++)r[n]^=this._Ke[0][n];for(var c=1;c>24&255]^x[r[(n+1)%4]>>16&255]^m[r[(n+2)%4]>>8&255]^g[255&r[(n+3)%4]]^this._Ke[c][n];r=a.slice()}var o,i=d(16);for(n=0;n<4;n++)o=this._Ke[t][n],i[4*n]=255&(u[r[n]>>24&255]^o>>24),i[4*n+1]=255&(u[r[(n+1)%4]>>16&255]^o>>16),i[4*n+2]=255&(u[r[(n+2)%4]>>8&255]^o>>8),i[4*n+3]=255&(u[255&r[(n+3)%4]]^o);return i},N.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,a=[0,0,0,0],r=S(e),n=0;n<4;n++)r[n]^=this._Kd[0][n];for(var c=1;c>24&255]^y[r[(n+3)%4]>>16&255]^w[r[(n+2)%4]>>8&255]^k[255&r[(n+1)%4]]^this._Kd[c][n];r=a.slice()}var o,i=d(16);for(n=0;n<4;n++)o=this._Kd[t][n],i[4*n]=255&(h[r[n]>>24&255]^o>>24),i[4*n+1]=255&(h[r[(n+3)%4]>>16&255]^o>>16),i[4*n+2]=255&(h[r[(n+2)%4]>>8&255]^o>>8),i[4*n+3]=255&(h[255&r[(n+1)%4]]^o);return i};var M=function(e){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new N(e)};M.prototype.encrypt=function(e){if((e=c(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=d(e.length),a=d(16),r=0;r>=8},R.prototype.setBytes=function(e){if(16!=(e=c(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},R.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,t){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof R||(t=new R(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new N(e)};C.prototype.encrypt=function(e){for(var t=c(e,!0),a=0;a>>26-o&67108863,26<=(o+=24)&&(o-=26,n++);else if("le"===a)for(n=d=0;d>>26-o&67108863,26<=(o+=24)&&(o-=26,n++);return this.strip()},c.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r>>26):c+=8;else for(r=(e.length-t)%2==0?t+1:t;r>>26):c+=8;this.strip()},c.prototype._parseBase=function(e,t,a){this.words=[0];for(var r=0,n=this.length=1;n<=67108863;n*=t)r++;n=n/t|0;for(var c=e.length-a,d=c%--r,o=Math.min(c,c-d)+a,i=0,s=a;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,t,a){a.negative=t.negative^e.negative;var r=e.length+t.length|0,n=(r=(a.length=r)-1|0,(d=(0|e.words[0])*(0|t.words[0]))/67108864|0);a.words[0]=67108863&d;for(var c=1;c>>26,i=67108863&n,f=Math.min(c,t.length-1),s=Math.max(0,c-e.length+1);s<=f;s++)o+=(d=(0|e.words[c-s|0])*(0|t.words[s])+i)/67108864|0,i=67108863&d;a.words[c]=0|i,n=0|o}return 0!==n?a.words[c]=0|n:a.length--,a.strip()}c.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var a=0,n=0,c=0;c>>24-a&16777215)||c!==this.length-1?s[6-o.length]+o+i:o+i;26<=(a+=2)&&(a-=26,c--)}for(0!==n&&(i=n.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative?"-"+i:i}if(e===(0|e)&&2<=e&&e<=36){var f=b[e],u=l[e];for(i="",(h=this.clone()).negative=0;!h.isZero();){var h,p=h.modn(u).toString(e);i=(h=h.idivn(u)).isZero()?p+i:s[f-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative?"-"+i:i}r(!1,"Base should be between 2 and 36")},c.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<=t&&(e+=7,t>>>=7),8<=t&&(e+=4,t>>>=4),2<=t&&(e+=2,t>>>=2),e+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e;return e=0,0==(8191&t)&&(e+=13,t>>>=13),0==(127&t)&&(e+=7,t>>>=7),0==(15&t)&&(e+=4,t>>>=4),0==(3&t)&&(e+=2,t>>>=2),0==(1&t)&&e++,e},c.prototype.bitLength=function(){var e=this.words[this.length-1];return e=this._countBits(e),26*(this.length-1)+e},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){for(var t,a=this.length>e.length?(t=this,e):(t=e,this),r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26);e%=26,this._expand(t),0>26-e),this.strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&0<=e);var a=e/26|0;return e%=26,this._expand(1+a),this.words[a]=t?this.words[a]|1<e.length?(a=this,e):(a=e,this),n=0,c=0;c>>26;for(;0!==n&&c>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ce.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[d]=67108863&t;for(;0!==c&&d>26,this.words[d]=67108863&t;if(0===c&&d>>13,b=8191&(V=0|d[1]),l=V>>>13,u=8191&(K=0|d[2]),h=K>>>13,p=8191&(n=0|d[3]),x=n>>>13,m=8191&(G=0|d[4]),g=G>>>13,v=8191&(Y=0|d[5]),y=Y>>>13,w=8191&(c=0|d[6]),k=c>>>13,I=8191&(J=0|d[7]),_=J>>>13,A=8191&(X=0|d[8]),E=X>>>13,S=8191&(Z=0|d[9]),N=Z>>>13,M=8191&(Q=0|o[0]),H=Q>>>13,T=0|o[1],P=8191&T,R=T>>>13,C=0|o[2],O=8191&C,D=C>>>13,B=8191&($=0|o[3]),L=$>>>13,j=0|o[4],U=8191&j,F=j>>>13,z=0|o[5],q=8191&z,W=z>>>13,V=8191&(r=0|o[6]),K=r>>>13,G=8191&(n=0|o[7]),Y=n>>>13,J=8191&(c=0|o[8]),X=c>>>13,Z=8191&(d=0|o[9]),Q=d>>>13;a.negative=e.negative^t.negative,a.length=19;var $=(0+Math.imul(f,M)|0)+((8191&(C=(C=Math.imul(f,H))+Math.imul(s,M)|0))<<13)|0,ee=((j=Math.imul(s,H))+(C>>>13)|0)+($>>>26)|0;return $&=67108863,T=Math.imul(b,M),C=(C=Math.imul(b,H))+Math.imul(l,M)|0,j=Math.imul(l,H),z=(ee+(T+Math.imul(f,P)|0)|0)+((8191&(C=(C=C+Math.imul(f,R)|0)+Math.imul(s,P)|0))<<13)|0,ee=((j=j+Math.imul(s,R)|0)+(C>>>13)|0)+(z>>>26)|0,z&=67108863,T=Math.imul(u,M),C=(C=Math.imul(u,H))+Math.imul(h,M)|0,j=Math.imul(h,H),T=T+Math.imul(b,P)|0,C=(C=C+Math.imul(b,R)|0)+Math.imul(l,P)|0,j=j+Math.imul(l,R)|0,r=(ee+(T+Math.imul(f,O)|0)|0)+((8191&(C=(C=C+Math.imul(f,D)|0)+Math.imul(s,O)|0))<<13)|0,ee=((j=j+Math.imul(s,D)|0)+(C>>>13)|0)+(r>>>26)|0,r&=67108863,T=Math.imul(p,M),C=(C=Math.imul(p,H))+Math.imul(x,M)|0,j=Math.imul(x,H),T=T+Math.imul(u,P)|0,C=(C=C+Math.imul(u,R)|0)+Math.imul(h,P)|0,j=j+Math.imul(h,R)|0,T=T+Math.imul(b,O)|0,C=(C=C+Math.imul(b,D)|0)+Math.imul(l,O)|0,j=j+Math.imul(l,D)|0,n=(ee+(T+Math.imul(f,B)|0)|0)+((8191&(C=(C=C+Math.imul(f,L)|0)+Math.imul(s,B)|0))<<13)|0,ee=((j=j+Math.imul(s,L)|0)+(C>>>13)|0)+(n>>>26)|0,n&=67108863,T=Math.imul(m,M),C=(C=Math.imul(m,H))+Math.imul(g,M)|0,j=Math.imul(g,H),T=T+Math.imul(p,P)|0,C=(C=C+Math.imul(p,R)|0)+Math.imul(x,P)|0,j=j+Math.imul(x,R)|0,T=T+Math.imul(u,O)|0,C=(C=C+Math.imul(u,D)|0)+Math.imul(h,O)|0,j=j+Math.imul(h,D)|0,T=T+Math.imul(b,B)|0,C=(C=C+Math.imul(b,L)|0)+Math.imul(l,B)|0,j=j+Math.imul(l,L)|0,c=(ee+(T+Math.imul(f,U)|0)|0)+((8191&(C=(C=C+Math.imul(f,F)|0)+Math.imul(s,U)|0))<<13)|0,ee=((j=j+Math.imul(s,F)|0)+(C>>>13)|0)+(c>>>26)|0,c&=67108863,T=Math.imul(v,M),C=(C=Math.imul(v,H))+Math.imul(y,M)|0,j=Math.imul(y,H),T=T+Math.imul(m,P)|0,C=(C=C+Math.imul(m,R)|0)+Math.imul(g,P)|0,j=j+Math.imul(g,R)|0,T=T+Math.imul(p,O)|0,C=(C=C+Math.imul(p,D)|0)+Math.imul(x,O)|0,j=j+Math.imul(x,D)|0,T=T+Math.imul(u,B)|0,C=(C=C+Math.imul(u,L)|0)+Math.imul(h,B)|0,j=j+Math.imul(h,L)|0,T=T+Math.imul(b,U)|0,C=(C=C+Math.imul(b,F)|0)+Math.imul(l,U)|0,j=j+Math.imul(l,F)|0,o=(ee+(T+Math.imul(f,q)|0)|0)+((8191&(C=(C=C+Math.imul(f,W)|0)+Math.imul(s,q)|0))<<13)|0,ee=((j=j+Math.imul(s,W)|0)+(C>>>13)|0)+(o>>>26)|0,o&=67108863,T=Math.imul(w,M),C=(C=Math.imul(w,H))+Math.imul(k,M)|0,j=Math.imul(k,H),T=T+Math.imul(v,P)|0,C=(C=C+Math.imul(v,R)|0)+Math.imul(y,P)|0,j=j+Math.imul(y,R)|0,T=T+Math.imul(m,O)|0,C=(C=C+Math.imul(m,D)|0)+Math.imul(g,O)|0,j=j+Math.imul(g,D)|0,T=T+Math.imul(p,B)|0,C=(C=C+Math.imul(p,L)|0)+Math.imul(x,B)|0,j=j+Math.imul(x,L)|0,T=T+Math.imul(u,U)|0,C=(C=C+Math.imul(u,F)|0)+Math.imul(h,U)|0,j=j+Math.imul(h,F)|0,T=T+Math.imul(b,q)|0,C=(C=C+Math.imul(b,W)|0)+Math.imul(l,q)|0,j=j+Math.imul(l,W)|0,d=(ee+(T+Math.imul(f,V)|0)|0)+((8191&(C=(C=C+Math.imul(f,K)|0)+Math.imul(s,V)|0))<<13)|0,ee=((j=j+Math.imul(s,K)|0)+(C>>>13)|0)+(d>>>26)|0,d&=67108863,T=Math.imul(I,M),C=(C=Math.imul(I,H))+Math.imul(_,M)|0,j=Math.imul(_,H),T=T+Math.imul(w,P)|0,C=(C=C+Math.imul(w,R)|0)+Math.imul(k,P)|0,j=j+Math.imul(k,R)|0,T=T+Math.imul(v,O)|0,C=(C=C+Math.imul(v,D)|0)+Math.imul(y,O)|0,j=j+Math.imul(y,D)|0,T=T+Math.imul(m,B)|0,C=(C=C+Math.imul(m,L)|0)+Math.imul(g,B)|0,j=j+Math.imul(g,L)|0,T=T+Math.imul(p,U)|0,C=(C=C+Math.imul(p,F)|0)+Math.imul(x,U)|0,j=j+Math.imul(x,F)|0,T=T+Math.imul(u,q)|0,C=(C=C+Math.imul(u,W)|0)+Math.imul(h,q)|0,j=j+Math.imul(h,W)|0,T=T+Math.imul(b,V)|0,C=(C=C+Math.imul(b,K)|0)+Math.imul(l,V)|0,j=j+Math.imul(l,K)|0,e=(ee+(T+Math.imul(f,G)|0)|0)+((8191&(C=(C=C+Math.imul(f,Y)|0)+Math.imul(s,G)|0))<<13)|0,ee=((j=j+Math.imul(s,Y)|0)+(C>>>13)|0)+(e>>>26)|0,e&=67108863,T=Math.imul(A,M),C=(C=Math.imul(A,H))+Math.imul(E,M)|0,j=Math.imul(E,H),T=T+Math.imul(I,P)|0,C=(C=C+Math.imul(I,R)|0)+Math.imul(_,P)|0,j=j+Math.imul(_,R)|0,T=T+Math.imul(w,O)|0,C=(C=C+Math.imul(w,D)|0)+Math.imul(k,O)|0,j=j+Math.imul(k,D)|0,T=T+Math.imul(v,B)|0,C=(C=C+Math.imul(v,L)|0)+Math.imul(y,B)|0,j=j+Math.imul(y,L)|0,T=T+Math.imul(m,U)|0,C=(C=C+Math.imul(m,F)|0)+Math.imul(g,U)|0,j=j+Math.imul(g,F)|0,T=T+Math.imul(p,q)|0,C=(C=C+Math.imul(p,W)|0)+Math.imul(x,q)|0,j=j+Math.imul(x,W)|0,T=T+Math.imul(u,V)|0,C=(C=C+Math.imul(u,K)|0)+Math.imul(h,V)|0,j=j+Math.imul(h,K)|0,T=T+Math.imul(b,G)|0,C=(C=C+Math.imul(b,Y)|0)+Math.imul(l,G)|0,j=j+Math.imul(l,Y)|0,t=(ee+(T+Math.imul(f,J)|0)|0)+((8191&(C=(C=C+Math.imul(f,X)|0)+Math.imul(s,J)|0))<<13)|0,ee=((j=j+Math.imul(s,X)|0)+(C>>>13)|0)+(t>>>26)|0,t&=67108863,T=Math.imul(S,M),C=(C=Math.imul(S,H))+Math.imul(N,M)|0,j=Math.imul(N,H),T=T+Math.imul(A,P)|0,C=(C=C+Math.imul(A,R)|0)+Math.imul(E,P)|0,j=j+Math.imul(E,R)|0,T=T+Math.imul(I,O)|0,C=(C=C+Math.imul(I,D)|0)+Math.imul(_,O)|0,j=j+Math.imul(_,D)|0,T=T+Math.imul(w,B)|0,C=(C=C+Math.imul(w,L)|0)+Math.imul(k,B)|0,j=j+Math.imul(k,L)|0,T=T+Math.imul(v,U)|0,C=(C=C+Math.imul(v,F)|0)+Math.imul(y,U)|0,j=j+Math.imul(y,F)|0,T=T+Math.imul(m,q)|0,C=(C=C+Math.imul(m,W)|0)+Math.imul(g,q)|0,j=j+Math.imul(g,W)|0,T=T+Math.imul(p,V)|0,C=(C=C+Math.imul(p,K)|0)+Math.imul(x,V)|0,j=j+Math.imul(x,K)|0,T=T+Math.imul(u,G)|0,C=(C=C+Math.imul(u,Y)|0)+Math.imul(h,G)|0,j=j+Math.imul(h,Y)|0,T=T+Math.imul(b,J)|0,C=(C=C+Math.imul(b,X)|0)+Math.imul(l,J)|0,j=j+Math.imul(l,X)|0,f=(ee+(T+Math.imul(f,Z)|0)|0)+((8191&(C=(C=C+Math.imul(f,Q)|0)+Math.imul(s,Z)|0))<<13)|0,ee=((j=j+Math.imul(s,Q)|0)+(C>>>13)|0)+(f>>>26)|0,f&=67108863,T=Math.imul(S,P),C=(C=Math.imul(S,R))+Math.imul(N,P)|0,j=Math.imul(N,R),T=T+Math.imul(A,O)|0,C=(C=C+Math.imul(A,D)|0)+Math.imul(E,O)|0,j=j+Math.imul(E,D)|0,T=T+Math.imul(I,B)|0,C=(C=C+Math.imul(I,L)|0)+Math.imul(_,B)|0,j=j+Math.imul(_,L)|0,T=T+Math.imul(w,U)|0,C=(C=C+Math.imul(w,F)|0)+Math.imul(k,U)|0,j=j+Math.imul(k,F)|0,T=T+Math.imul(v,q)|0,C=(C=C+Math.imul(v,W)|0)+Math.imul(y,q)|0,j=j+Math.imul(y,W)|0,T=T+Math.imul(m,V)|0,C=(C=C+Math.imul(m,K)|0)+Math.imul(g,V)|0,j=j+Math.imul(g,K)|0,T=T+Math.imul(p,G)|0,C=(C=C+Math.imul(p,Y)|0)+Math.imul(x,G)|0,j=j+Math.imul(x,Y)|0,T=T+Math.imul(u,J)|0,C=(C=C+Math.imul(u,X)|0)+Math.imul(h,J)|0,j=j+Math.imul(h,X)|0,b=(ee+(T+Math.imul(b,Z)|0)|0)+((8191&(C=(C=C+Math.imul(b,Q)|0)+Math.imul(l,Z)|0))<<13)|0,ee=((j=j+Math.imul(l,Q)|0)+(C>>>13)|0)+(b>>>26)|0,b&=67108863,T=Math.imul(S,O),C=(C=Math.imul(S,D))+Math.imul(N,O)|0,j=Math.imul(N,D),T=T+Math.imul(A,B)|0,C=(C=C+Math.imul(A,L)|0)+Math.imul(E,B)|0,j=j+Math.imul(E,L)|0,T=T+Math.imul(I,U)|0,C=(C=C+Math.imul(I,F)|0)+Math.imul(_,U)|0,j=j+Math.imul(_,F)|0,T=T+Math.imul(w,q)|0,C=(C=C+Math.imul(w,W)|0)+Math.imul(k,q)|0,j=j+Math.imul(k,W)|0,T=T+Math.imul(v,V)|0,C=(C=C+Math.imul(v,K)|0)+Math.imul(y,V)|0,j=j+Math.imul(y,K)|0,T=T+Math.imul(m,G)|0,C=(C=C+Math.imul(m,Y)|0)+Math.imul(g,G)|0,j=j+Math.imul(g,Y)|0,T=T+Math.imul(p,J)|0,C=(C=C+Math.imul(p,X)|0)+Math.imul(x,J)|0,j=j+Math.imul(x,X)|0,u=(ee+(T+Math.imul(u,Z)|0)|0)+((8191&(C=(C=C+Math.imul(u,Q)|0)+Math.imul(h,Z)|0))<<13)|0,ee=((j=j+Math.imul(h,Q)|0)+(C>>>13)|0)+(u>>>26)|0,u&=67108863,T=Math.imul(S,B),C=(C=Math.imul(S,L))+Math.imul(N,B)|0,j=Math.imul(N,L),T=T+Math.imul(A,U)|0,C=(C=C+Math.imul(A,F)|0)+Math.imul(E,U)|0,j=j+Math.imul(E,F)|0,T=T+Math.imul(I,q)|0,C=(C=C+Math.imul(I,W)|0)+Math.imul(_,q)|0,j=j+Math.imul(_,W)|0,T=T+Math.imul(w,V)|0,C=(C=C+Math.imul(w,K)|0)+Math.imul(k,V)|0,j=j+Math.imul(k,K)|0,T=T+Math.imul(v,G)|0,C=(C=C+Math.imul(v,Y)|0)+Math.imul(y,G)|0,j=j+Math.imul(y,Y)|0,T=T+Math.imul(m,J)|0,C=(C=C+Math.imul(m,X)|0)+Math.imul(g,J)|0,j=j+Math.imul(g,X)|0,p=(ee+(T+Math.imul(p,Z)|0)|0)+((8191&(C=(C=C+Math.imul(p,Q)|0)+Math.imul(x,Z)|0))<<13)|0,ee=((j=j+Math.imul(x,Q)|0)+(C>>>13)|0)+(p>>>26)|0,p&=67108863,T=Math.imul(S,U),C=(C=Math.imul(S,F))+Math.imul(N,U)|0,j=Math.imul(N,F),T=T+Math.imul(A,q)|0,C=(C=C+Math.imul(A,W)|0)+Math.imul(E,q)|0,j=j+Math.imul(E,W)|0,T=T+Math.imul(I,V)|0,C=(C=C+Math.imul(I,K)|0)+Math.imul(_,V)|0,j=j+Math.imul(_,K)|0,T=T+Math.imul(w,G)|0,C=(C=C+Math.imul(w,Y)|0)+Math.imul(k,G)|0,j=j+Math.imul(k,Y)|0,T=T+Math.imul(v,J)|0,C=(C=C+Math.imul(v,X)|0)+Math.imul(y,J)|0,j=j+Math.imul(y,X)|0,m=(ee+(T+Math.imul(m,Z)|0)|0)+((8191&(C=(C=C+Math.imul(m,Q)|0)+Math.imul(g,Z)|0))<<13)|0,ee=((j=j+Math.imul(g,Q)|0)+(C>>>13)|0)+(m>>>26)|0,m&=67108863,T=Math.imul(S,q),C=(C=Math.imul(S,W))+Math.imul(N,q)|0,j=Math.imul(N,W),T=T+Math.imul(A,V)|0,C=(C=C+Math.imul(A,K)|0)+Math.imul(E,V)|0,j=j+Math.imul(E,K)|0,T=T+Math.imul(I,G)|0,C=(C=C+Math.imul(I,Y)|0)+Math.imul(_,G)|0,j=j+Math.imul(_,Y)|0,T=T+Math.imul(w,J)|0,C=(C=C+Math.imul(w,X)|0)+Math.imul(k,J)|0,j=j+Math.imul(k,X)|0,v=(ee+(T+Math.imul(v,Z)|0)|0)+((8191&(C=(C=C+Math.imul(v,Q)|0)+Math.imul(y,Z)|0))<<13)|0,ee=((j=j+Math.imul(y,Q)|0)+(C>>>13)|0)+(v>>>26)|0,v&=67108863,T=Math.imul(S,V),C=(C=Math.imul(S,K))+Math.imul(N,V)|0,j=Math.imul(N,K),T=T+Math.imul(A,G)|0,C=(C=C+Math.imul(A,Y)|0)+Math.imul(E,G)|0,j=j+Math.imul(E,Y)|0,T=T+Math.imul(I,J)|0,C=(C=C+Math.imul(I,X)|0)+Math.imul(_,J)|0,j=j+Math.imul(_,X)|0,w=(ee+(T+Math.imul(w,Z)|0)|0)+((8191&(C=(C=C+Math.imul(w,Q)|0)+Math.imul(k,Z)|0))<<13)|0,ee=((j=j+Math.imul(k,Q)|0)+(C>>>13)|0)+(w>>>26)|0,w&=67108863,T=Math.imul(S,G),C=(C=Math.imul(S,Y))+Math.imul(N,G)|0,j=Math.imul(N,Y),T=T+Math.imul(A,J)|0,C=(C=C+Math.imul(A,X)|0)+Math.imul(E,J)|0,j=j+Math.imul(E,X)|0,I=(ee+(T+Math.imul(I,Z)|0)|0)+((8191&(C=(C=C+Math.imul(I,Q)|0)+Math.imul(_,Z)|0))<<13)|0,ee=((j=j+Math.imul(_,Q)|0)+(C>>>13)|0)+(I>>>26)|0,I&=67108863,T=Math.imul(S,J),C=(C=Math.imul(S,X))+Math.imul(N,J)|0,j=Math.imul(N,X),A=(ee+(T+Math.imul(A,Z)|0)|0)+((8191&(C=(C=C+Math.imul(A,Q)|0)+Math.imul(E,Z)|0))<<13)|0,ee=((j=j+Math.imul(E,Q)|0)+(C>>>13)|0)+(A>>>26)|0,A&=67108863,Z=(ee+Math.imul(S,Z)|0)+((8191&(C=(C=Math.imul(S,Q))+Math.imul(N,Z)|0))<<13)|0,ee=((j=Math.imul(N,Q))+(C>>>13)|0)+(Z>>>26)|0,Z&=67108863,i[0]=$,i[1]=z,i[2]=r,i[3]=n,i[4]=c,i[5]=o,i[6]=d,i[7]=e,i[8]=t,i[9]=f,i[10]=b,i[11]=u,i[12]=p,i[13]=m,i[14]=v,i[15]=w,i[16]=I,i[17]=A,i[18]=Z,0!=ee&&(i[19]=ee,a.length++),a};function p(e,t,a){return(new x).mulp(e,t,a)}function x(e,t){this.x=e,this.y=t}Math.imul||(h=u),c.prototype.mulTo=function(e,t){var a=this.length+e.length;return t=(10===this.length&&10===e.length?h:a<63?u:a<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var r=0,n=0,c=0;c>>26)|0)>>>26,d&=67108863}a.words[c]=o,r=d,d=n}return 0!==r?a.words[c]=r:a.length--,a.strip()}:p)(this,e,t),t},x.prototype.makeRBT=function(e){for(var t=new Array(e),a=c.prototype._countBits(e)-1,r=0;r>=1;return r},x.prototype.permute=function(e,t,a,r,n,c){for(var d=0;d>>=1)a++;return 1<>>=13),c>>>=13;for(d=2*t;d>=26,t+=n/67108864|0,t+=c>>>26,this.words[a]=67108863&c}return 0!==t&&(this.words[a]=t,this.length++),this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new c(1);for(var a=this,r=0;r>>26-t<<26-t;if(0!=t){for(var c=0,d=0;d>>26-t}c&&(this.words[d]=c,this.length++)}if(0!=a){for(d=this.length-1;0<=d;d--)this.words[d+a]=this.words[d];for(d=0;d>>c<d)for(this.length-=d,f=0;f>>c,s=b&o}return i&&0!==s&&(i.words[i.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(e,t,a){return r(0===this.negative),this.iushrn(e,t,a)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&0<=e);var t=e%26;return e=(e-t)/26,!(this.length<=e)&&!!(this.words[e]&1<>>t<>26)-(i/67108864|0),this.words[d+a]=67108863&o}for(;d>26,this.words[d+a]=67108863&o;if(0===c)return this.strip();for(r(-1===c),d=c=0;d>26,this.words[d]=67108863&o;return this.negative=1,this.strip()},c.prototype._wordDiv=function(e,t){var a=this.length-e.length,r=this.clone(),n=e,d=0|n.words[n.length-1];0!=(a=26-this._countBits(d))&&(n=n.ushln(a),r.iushln(a),d=0|n.words[n.length-1]);var o,i=r.length-n.length;if("mod"!==t){(o=new c(null)).length=1+i,o.words=new Array(o.length);for(var f=0;fthis.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,d,o},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1);return e=e.andln(1),(r=a.cmp(r))<0||1===e&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,a=0,n=this.length-1;0<=n;n--)a=(t*a+(0|this.words[n]))%e;return a},c.prototype.idivn=function(e){r(e<=67108863);for(var t=0,a=this.length-1;0<=a;a--){var n=(0|this.words[a])+67108864*t;this.words[a]=n/e|0,t=n%e}return this.strip()},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());for(var t=this,a=e.clone(),n=(t=0!==t.negative?t.umod(e):t.clone(),new c(1)),d=new c(0),o=new c(0),i=new c(1),f=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++f;for(var s=a.clone(),b=t.clone();!t.isZero();){for(var l=0,u=1;0==(t.words[0]&u)&&l<26;++l,u<<=1);if(0>>26,c&=67108863,this.words[n]=c}return 0!==a&&(this.words[n]=a,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this.strip(),e=1e.length)return 1;if(this.lengththis.n;);return 0===(e=t>>22,n=c}0===(e.words[r-10]=n>>>=22)&&10>>=26,e.words[a]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return m[e]=t},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,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.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,t){return this._verify2(e,t),0<=(t=e.add(t)).cmp(this.m)&&t.isub(this.m),t._forceRed(this)},I.prototype.iadd=function(e,t){return this._verify2(e,t),0<=(t=e.iadd(t)).cmp(this.m)&&t.isub(this.m),t},I.prototype.sub=function(e,t){return this._verify2(e,t),(t=e.sub(t)).cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},I.prototype.isub=function(e,t){return this._verify2(e,t),(t=e.isub(t)).cmpn(0)<0&&t.iadd(this.m),t},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},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 t=this.m.andln(3);if(r(t%2==1),3===t)return t=this.m.add(new c(1)).iushrn(2),this.pow(e,t);for(var a=this.m.subn(1),n=0;!a.isZero()&&0===a.andln(1);)n++,a.iushrn(1);r(!a.isZero());for(var d=new c(1).toRed(this),o=d.redNeg(),i=this.m.subn(1).iushrn(1),f=new c(2*(f=this.m.bitLength())*f).toRed(this);0!==this.pow(f,i).cmp(o);)f.redIAdd(o);for(var s=this.pow(f,a),b=this.pow(e,a.addn(1).iushrn(1)),l=this.pow(e,a),u=n;0!==l.cmp(d);){for(var h=l,p=0;0!==h.cmp(d);p++)h=h.redSqr();r(p>s&1;n!==a[0]&&(n=this.sqr(n)),0!=b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(n=this.mul(n,a[d]),d=o=0)):o=0}i=26}return n},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){return(e=e.clone()).red=null,e},c.mont=function(e){return new _(e)},n(_,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,t){return e.isZero()||t.isZero()?(e.words[0]=0,e.length=1,e):(t=(e=e.imul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=e=e.isub(t).iushrn(this.shift),0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this))},_.prototype.mul=function(e,t){return e.isZero()||t.isZero()?new c(0)._forceRed(this):(t=(e=e.mul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=e=e.isub(t).iushrn(this.shift),0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this))},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:11}],10:[function(e,t,r){(function(e){(function(){t.exports=function(t){return t=new Uint8Array(t),(e.crypto||e.msCrypto).getRandomValues(t),t}}).call(this)}).call(this,"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,a){},{}],12:[function(e,t,a){"use strict";a.version=e("../package.json").version,a.utils=e("./elliptic/utils"),a.rand=e("brorand"),a.curve=e("./elliptic/curve"),a.curves=e("./elliptic/curves"),a.ec=e("./elliptic/ec"),a.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,t,a){"use strict";var r=e("bn.js"),n=e("../utils"),c=n.getNAF,d=n.getJSF,o=n.assert;function i(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.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=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.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,!(t=this.n&&this.p.div(this.n))||0>1]):i.mixedAdd(n[-b-1>>1].neg()):0>1]):i.add(n[-b-1>>1].neg())}return"affine"===e.type?i.toP():i},i.prototype._wnafMulAdd=function(e,t,a,r,n){for(var o=this._wnafT1,i=this._wnafT2,f=this._wnafT3,s=0,b=0;b>1]:E<0&&(l=i[A][-E-1>>1].neg()),w="affine"===l.type?w.mixedAdd(l):w.add(l))}}for(b=0;b=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var a=[this],r=this,n=0;n":""},f.prototype.isInfinity=function(){return this.inf},f.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=(t=0!==(t=this.y.redSub(e.y)).cmpn(0)?t.redMul(this.x.redSub(e.x).redInvm()):t).redSqr().redISub(this.x).redISub(e.x);var t=t.redMul(this.x.redSub(e)).redISub(this.y);return this.curve.point(e,t)},f.prototype.dbl=function(){if(this.inf)return this;if(0===(a=this.y.redAdd(this.y)).cmpn(0))return this.curve.point(null,null);var e=this.curve.a,t=this.x.redSqr(),a=a.redInvm();return a=(e=t.redAdd(t).redIAdd(t).redIAdd(e).redMul(a)).redSqr().redISub(this.x.redAdd(this.x)),e=e.redMul(this.x.redSub(a)).redISub(this.y),this.curve.point(a,e)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new n(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)},f.prototype.mulAdd=function(e,t,a){return t=[this,t],a=[e,a],this.curve.endo?this.curve._endoWnafMulAdd(t,a):this.curve._wnafMulAdd(1,t,a,2)},f.prototype.jmulAdd=function(e,t,a){return t=[this,t],a=[e,a],this.curve.endo?this.curve._endoWnafMulAdd(t,a,!0):this.curve._wnafMulAdd(1,t,a,2,!0)},f.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))},f.prototype.neg=function(e){if(this.inf)return this;var t,a=this.curve.point(this.x,this.y.redNeg());return e&&this.precomputed&&(t=this.precomputed,e=function(e){return e.neg()},a.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(e)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(e)}}),a},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},c(s,d.BasePoint),i.prototype.jpoint=function(e,t,a){return new s(this,e,t,a)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=(a=this.z.redInvm()).redSqr(),t=this.x.redMul(e),a=this.y.redMul(e).redMul(a);return this.curve.point(t,a)},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 t=e.z.redSqr(),a=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(a),c=this.y.redMul(t.redMul(e.z)),d=e.y.redMul(a.redMul(this.z));return t=r.redSub(n),a=c.redSub(d),0===t.cmpn(0)?0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(d=(n=t.redSqr()).redMul(t),r=r.redMul(n),n=a.redSqr().redIAdd(d).redISub(r).redISub(r),d=a.redMul(r.redISub(n)).redISub(c.redMul(d)),t=this.z.redMul(e.z).redMul(t),this.curve.jpoint(n,d,t))},s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),a=this.x,r=e.x.redMul(t),n=this.y,c=e.y.redMul(t).redMul(this.z);return e=a.redSub(r),t=n.redSub(c),0===e.cmpn(0)?0!==t.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(c=(r=e.redSqr()).redMul(e),a=a.redMul(r),r=t.redSqr().redIAdd(c).redISub(a).redISub(a),c=t.redMul(a.redISub(r)).redISub(n.redMul(c)),e=this.z.redMul(e),this.curve.jpoint(r,c,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 t=this,a=0;a":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":24,"./base":13,"bn.js":9,inherits:39}],18:[function(e,t,a){"use strict";var r,n=a,c=(a=e("hash.js"),e("./curve")),d=e("./utils").assert;function o(e){"short"===e.type?this.curve=new c.short(e):"edwards"===e.type?this.curve=new c.edwards(e):this.curve=new c.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 i(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var a=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:a}),a}})}n.PresetCurve=o,i("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:a.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"]}),i("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:a.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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),i("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1")}catch(e){r=void 0}i("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:a.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,t,a){"use strict";var r=e("bn.js"),n=e("hmac-drbg"),c=e("../utils"),d=e("../curves"),o=e("brorand"),i=c.assert,f=e("./key"),s=e("./signature");function b(e){if(!(this instanceof b))return new b(e);"string"==typeof e&&(i(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}(t.exports=b).prototype.keyPair=function(e){return new f(this,e)},b.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},b.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},b.prototype.genKeyPair=function(e){for(var t=new n({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()}),a=this.n.byteLength(),c=this.n.sub(new r(2));;){var d=new r(t.generate(a));if(!(0>=1,0<=o.cmp(this.curve.p.umod(this.curve.n))&&a)throw new Error("Unable to find sencond key candinate");return o=a?this.curve.pointFromX(o.add(this.curve.n),e):this.curve.pointFromX(o,e),t=t.r.invm(c),d=c.sub(d).mul(t).umod(c),c=n.mul(t).umod(c),this.g.mulAdd(d,o,c)},b.prototype.getKeyRecoveryParam=function(e,t,a,r){if(null!==(t=new s(t,r)).recoveryParam)return t.recoveryParam;for(var n,c=0;c<4;c++){try{n=this.recoverPubKey(e,t,c)}catch(e){continue}if(n.eq(a))return c}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,t,a){"use strict";var r=e("bn.js"),n=e("../utils").assert;function c(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}(t.exports=c).fromPublic=function(e,t,a){return t instanceof c?t:new c(e,{pub:t,pubEnc:a})},c.fromPrivate=function(e,t,a){return t instanceof c?t:new c(e,{priv:t,privEnc:a})},c.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"}},c.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},c.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},c.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},c.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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,t)},c.prototype.derive=function(e){return e.validate()||n(e.validate(),"public point not validated"),e.mul(this.priv).getX()},c.prototype.sign=function(e,t,a){return this.ec.sign(e,this,t,a)},c.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},c.prototype.inspect=function(){return""}},{"../utils":24,"bn.js":9}],21:[function(e,t,a){"use strict";var r=e("bn.js"),n=e("../utils"),c=n.assert;function d(e,t){if(e instanceof d)return e;this._importDER(e,t)||(c(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 i(e,t){var a=e[t.place++];if(!(128&a))return a;var r=15&a;if(0==r||4>>=0;return!(n<=127)&&(t.place=d,n)}function f(e){for(var t=0,a=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|a);--a;)e.push(t>>>(a<<3)&255);e.push(t)}}(t.exports=d).prototype._importDER=function(e,t){e=n.toArray(e,t);var a=new o;if(48!==e[a.place++])return!1;var c=i(e,a);if(!1===c)return!1;if(c+a.place!==e.length)return!1;if(2!==e[a.place++])return!1;if(!1===(t=i(e,a)))return!1;if(c=e.slice(a.place,t+a.place),a.place+=t,2!==e[a.place++])return!1;if(!1===(t=i(e,a)))return!1;if(e.length!==t+a.place)return!1;if(a=e.slice(a.place,t+a.place),0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new r(c),this.s=new r(a),!(this.recoveryParam=null)},d.prototype.toDER=function(e){var t=this.r.toArray(),a=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&a[0]&&(a=[0].concat(a)),t=f(t),a=f(a);!(a[0]||128&a[1]);)a=a.slice(1);var r=[2];return s(r,t.length),(r=r.concat(t)).push(2),s(r,a.length),t=r.concat(a),s(r=[48],t.length),r=r.concat(t),n.encode(r,e)}},{"../utils":24,"bn.js":9}],22:[function(e,t,a){arguments[4][14][0].apply(a,arguments)},{dup:14}],23:[function(e,t,a){t.exports=void 0},{}],24:[function(e,t,a){"use strict";var r=a,n=e("bn.js");a=e("minimalistic-assert"),e=e("minimalistic-crypto-utils"),r.assert=a,r.toArray=e.toArray,r.zero2=e.zero2,r.toHex=e.toHex,r.encode=e.encode,r.getNAF=function(e,t,a){var r=new Array(Math.max(e.bitLength(),a)+1);r.fill(0);for(var n=1<>1)-1>1)-i:i):o=0,r[d]=o,c.iushrn(1)}return r},r.getJSF=function(e,t){var a=[[],[]];e=e.clone(),t=t.clone();for(var r,n=0,c=0;0=this._delta8){t=(e=this.pending).length%this._delta8,this.pending=e.slice(e.length-t,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-t,this.endian);for(var a=0;a>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,c=8;cthis.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t>>3},a.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},{"../utils":37}],37:[function(e,t,a){"use strict";var r=e("minimalistic-assert");function n(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(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"),a.inherits=e,a.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var a=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r>8,c=255&c;n?a.push(n,c):a.push(c)}else for(r=0;r>>0}return c},a.split32=function(e,t){for(var a=new Array(4*e.length),r=0,n=0;r>>24,a[n+1]=c>>>16&255,a[n+2]=c>>>8&255,a[n+3]=255&c):(a[n+3]=c>>>24,a[n+2]=c>>>16&255,a[n+1]=c>>>8&255,a[n]=255&c)}return a},a.rotr32=function(e,t){return e>>>t|e<<32-t},a.rotl32=function(e,t){return e<>>32-t},a.sum32=function(e,t){return e+t>>>0},a.sum32_3=function(e,t,a){return e+t+a>>>0},a.sum32_4=function(e,t,a,r){return e+t+a+r>>>0},a.sum32_5=function(e,t,a,r,n){return e+t+a+r+n>>>0},a.sum64=function(e,t,a,r){var n=e[t],c=r+e[t+1]>>>0;e[t]=(c>>0,e[t+1]=c},a.sum64_hi=function(e,t,a,r){return(t+r>>>0>>0},a.sum64_lo=function(e,t,a,r){return t+r>>>0},a.sum64_4_hi=function(e,t,a,r,n,c,d,o){var i=0,f=t;return i+=(f=t+r>>>0)>>0)>>0)>>0},a.sum64_4_lo=function(e,t,a,r,n,c,d,o){return t+r+c+o>>>0},a.sum64_5_hi=function(e,t,a,r,n,c,d,o,i,f){var s=0,b=t;return s+=(b=t+r>>>0)>>0)>>0)>>0)>>0},a.sum64_5_lo=function(e,t,a,r,n,c,d,o,i,f){return t+r+c+o+f>>>0},a.rotr64_hi=function(e,t,a){return(t<<32-a|e>>>a)>>>0},a.rotr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0},a.shr64_hi=function(e,t,a){return e>>>a},a.shr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0}},{inherits:39,"minimalistic-assert":41}],38:[function(e,t,a){"use strict";var r=e("hash.js"),n=e("minimalistic-crypto-utils"),c=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 t=n.toArray(e.entropy,e.entropyEnc||"hex"),a=n.toArray(e.nonce,e.nonceEnc||"hex");e=n.toArray(e.pers,e.persEnc||"hex"),c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,a,e)}(t.exports=d).prototype._init=function(e,t,a){a=e.concat(t).concat(a),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(a||[])),this._reseed=1},d.prototype.generate=function(e,t,a,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=a,a=t,t=null),a&&(a=n.toArray(a,r||"hex"),this._update(a));for(var c=[];c.length>5,this.byteCount=this.blockCount<<2,this.outputBlocks=a>>5,this.extraBytes=(31&a)>>3;for(var r=0;r<50;++r)this.s[r]=0}w.prototype.update=function(e){for(var t,a,r="string"!=typeof e,n=(e=r&&e.constructor===ArrayBuffer?new Uint8Array(e):e).length,c=this.blocks,o=this.byteCount,i=this.blockCount,f=0,s=this.s;f>2]|=e[f]<>2]|=a<>2]|=(192|a>>6)<>2]|=(224|a>>12)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[a],t=1;t>4&15]+c[15&e]+c[e>>12&15]+c[e>>8&15]+c[e>>20&15]+c[e>>16&15]+c[e>>28&15]+c[e>>24&15];o%t==0&&(k(a),d=0)}return n&&(e=a[d],0>4&15]+c[15&e]),1>12&15]+c[e>>8&15]),2>20&15]+c[e>>16&15])),i},w.prototype.arrayBuffer=function(){this.finalize();for(var e=this.blockCount,t=this.s,a=this.outputBlocks,r=this.extraBytes,n=0,c=0,d=this.outputBits>>3,o=r?new ArrayBuffer(a+1<<2):new ArrayBuffer(d),i=new Uint32Array(o);c>8&255,i[e+2]=t>>16&255,i[e+3]=t>>24&255;o%a==0&&k(r)}return c&&(e=o<<2,t=r[d],0>8&255),2>16&255)),i};var k=function(e){for(var t,a,r,n,c,d,i,f,s,b,l,u,h,p,x,m,g,v,y,w,k,I,_,A,E,S,N,M,H,T,P,R,C,O,D,B,L,j,U,F,z,q,W,V,K,G,Y,J,X,Z,Q=0;Q<48;Q+=2)N=e[0]^e[10]^e[20]^e[30]^e[40],M=e[1]^e[11]^e[21]^e[31]^e[41],F=e[2]^e[12]^e[22]^e[32]^e[42],U=e[3]^e[13]^e[23]^e[33]^e[43],R=e[4]^e[14]^e[24]^e[34]^e[44],P=e[5]^e[15]^e[25]^e[35]^e[45],G=e[6]^e[16]^e[26]^e[36]^e[46],K=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],b=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(U<<1|F>>>31),e[0]^=s=h^(F<<1|U>>>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=M^(P<<1|R>>>31),e[2]^=s=N^(R<<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=U^(K<<1|G>>>31),e[4]^=s=F^(G<<1|K>>>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^(p<<1|h>>>31),e[6]^=s=R^(h<<1|p>>>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=K^(M<<1|N>>>31),e[8]^=s=G^(N<<1|M>>>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,t=e[0],a=e[1],C=e[11]<<4|e[10]>>>28,O=e[10]<<4|e[11]>>>28,x=e[20]<<3|e[21]>>>29,m=e[21]<<3|e[20]>>>29,Y=e[31]<<9|e[30]>>>23,J=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,T=e[41]<<18|e[40]>>>14,k=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,r=e[13]<<12|e[12]>>>20,n=e[12]<<12|e[13]>>>20,D=e[22]<<10|e[23]>>>22,B=e[23]<<10|e[22]>>>22,g=e[33]<<13|e[32]>>>19,v=e[32]<<13|e[33]>>>19,X=e[42]<<2|e[43]>>>30,Z=e[43]<<2|e[42]>>>30,z=e[5]<<30|e[4]>>>2,q=e[4]<<30|e[5]>>>2,_=e[14]<<6|e[15]>>>26,A=e[15]<<6|e[14]>>>26,c=e[25]<<11|e[24]>>>21,d=e[24]<<11|e[25]>>>21,L=e[34]<<15|e[35]>>>17,j=e[35]<<15|e[34]>>>17,y=e[45]<<29|e[44]>>>3,w=e[44]<<29|e[45]>>>3,l=e[6]<<28|e[7]>>>4,u=e[7]<<28|e[6]>>>4,W=e[17]<<23|e[16]>>>9,V=e[16]<<23|e[17]>>>9,E=e[26]<<25|e[27]>>>7,S=e[27]<<25|e[26]>>>7,i=e[36]<<21|e[37]>>>11,f=e[37]<<21|e[36]>>>11,U=e[47]<<24|e[46]>>>8,F=e[46]<<24|e[47]>>>8,P=e[8]<<27|e[9]>>>5,R=e[9]<<27|e[8]>>>5,h=e[18]<<20|e[19]>>>12,p=e[19]<<20|e[18]>>>12,K=e[29]<<7|e[28]>>>25,G=e[28]<<7|e[29]>>>25,N=e[38]<<8|e[39]>>>24,M=e[39]<<8|e[38]>>>24,s=e[48]<<14|e[49]>>>18,b=e[49]<<14|e[48]>>>18,e[0]=t^~r&c,e[1]=a^~n&d,e[10]=l^~h&x,e[11]=u^~p&m,e[20]=k^~_&E,e[21]=I^~A&S,e[30]=P^~C&D,e[31]=R^~O&B,e[40]=z^~W&K,e[41]=q^~V&G,e[2]=r^~c&i,e[3]=n^~d&f,e[12]=h^~x&g,e[13]=p^~m&v,e[22]=_^~E&N,e[23]=A^~S&M,e[32]=C^~D&L,e[33]=O^~B&j,e[42]=W^~K&Y,e[43]=V^~G&J,e[4]=c^~i&s,e[5]=d^~f&b,e[14]=x^~g&y,e[15]=m^~v&w,e[24]=E^~N&H,e[25]=S^~M&T,e[34]=D^~L&U,e[35]=B^~j&F,e[44]=K^~Y&X,e[45]=G^~J&Z,e[6]=i^~s&t,e[7]=f^~b&a,e[16]=g^~y&l,e[17]=v^~w&u,e[26]=N^~H&k,e[27]=M^~T&I,e[36]=L^~U&P,e[37]=j^~F&R,e[46]=Y^~X&z,e[47]=J^~Z&q,e[8]=s^~t&r,e[9]=b^~a&n,e[18]=y^~l&h,e[19]=w^~u&p,e[28]=H^~k&_,e[29]=T^~I&A,e[38]=U^~P&C,e[39]=F^~R&O,e[48]=X^~z&W,e[49]=Z^~q&V,e[0]^=o[Q],e[1]^=o[Q+1]};if(n)t.exports=h;else for(x=0;x>8,c=255&c;n?a.push(n,c):a.push(c)}return a},a.zero2=r,a.toHex=n,a.encode=function(e,t){return"hex"===t?n(e):e}},{}],43:[function(e,t,a){t.exports={browser:!0}},{}],44:[function(e,t,a){(function(e){(function(){"use strict";function r(e){var t=[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],a=1779033703,r=3144134277,n=1013904242,c=2773480762,d=1359893119,o=2600822924,i=528734635,f=1541459225,s=new Array(64);function b(e){for(var b=0,l=e.length;64<=l;){for(var u,h,p,x,m=a,g=r,v=n,y=c,w=d,k=o,I=i,_=f,A=0;A<16;A++)s[A]=(255&e[h=b+4*A])<<24|(255&e[h+1])<<16|(255&e[h+2])<<8|255&e[h+3];for(A=16;A<64;A++)p=((u=s[A-2])>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,u=s[A-15],s[A]=(p+s[A-7]|0)+((x=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3)+s[A-16]|0)|0;for(A=0;A<64;A++)p=(((w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7))+(w&k^~w&I)|0)+(_+(t[A]+s[A]|0)|0)|0,x=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&g^m&v^g&v)|0,_=I,I=k,k=w,w=y+p|0,y=v,v=g,g=m,m=p+x|0;a=a+m|0,r=r+g|0,n=n+v|0,c=c+y|0,d=d+w|0,o=o+k|0,i=i+I|0,f=f+_|0,b+=64,l-=64}}b(e);var l,u=e.length%64,h=e.length/536870912|0,p=e.length<<3,x=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(p>>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),b(m),[a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>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,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255]}function n(e,t,a){e=e.length<=64?e:r(e);for(var n=64+t.length+4,c=new Array(n),d=new Array(64),o=[],i=0;i<64;i++)c[i]=54;for(i=0;i>>32-t}function o(e,t,a,r){for(var n=0;n>8&255),p.push(x[e]>>16&255),p.push(x[e]>>24&255);var s=n(t,p,l);return h(null,1,s)}R(C)};C()}var l,u;l=this,u=2147483647,void 0!==a?t.exports=b:l&&(l.scrypt&&(l._scrypt=l.scrypt),l.scrypt=b)}).call(this)}).call(this,e("timers").setImmediate)},{timers:46}],45:[function(e,t,r){(function(e,t,a){(function(){!function(t,a){"use strict";var r,n,c,d,o,i,f,s;function b(e){return n[r]=l.apply(a,e),r++}function l(e){var t=[].slice.call(arguments,1);return function(){"function"==typeof e?e.apply(a,t):new Function(""+e)()}}function u(e){if(c)setTimeout(l(u,e),0);else{var t=n[e];if(t){c=!0;try{t()}finally{h(e),c=!1}}}}function h(e){delete n[e]}function p(){function e(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&u(+e.data.slice(a.length))}var a="setImmediate$"+Math.random()+"$";t.addEventListener?t.addEventListener("message",e,!1):t.attachEvent("onmessage",e),o=function(){var e=b(arguments);return t.postMessage(a+e,"*"),e}}t.setImmediate||(r=1,c=!(n={}),d=t.document,s=(s=Object.getPrototypeOf&&Object.getPrototypeOf(t))&&s.setTimeout?s:t,"[object process]"==={}.toString.call(t.process)?o=function(){var t=b(arguments);return e.nextTick(l(u,t)),t}:function(){if(t.postMessage&&!t.importScripts){var e=!0,a=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=a,e}}()?p():o=t.MessageChannel?((f=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(){var e=b(arguments);return f.port2.postMessage(e),e}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,function(){var e=b(arguments),t=d.createElement("script");return t.onreadystatechange=function(){u(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t),e}):function(){var e=b(arguments);return setTimeout(l(u,e),0),e},s.setImmediate=o,s.clearImmediate=h)}("undefined"==typeof self?void 0===t?this:t:self)}).call(this)}).call(this,e("_process"),"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").clearImmediate)},{_process:43,timers:46}],46:[function(e,t,r){(function(e){(function(){t.exports={setImmediate:e.setImmediate}}).call(this)}).call(this,"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(e,t,r){(function(e){(function(){var a,r,n;e.crypto&&crypto.getRandomValues&&(a=new Uint8Array(16),r=function(){return crypto.getRandomValues(a),a}),r||(n=new Array(16),r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}),t.exports=r}).call(this)}).call(this,"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(e,t,a){for(var r=e("./rng"),n=[],c={},d=0;d<256;d++)n[d]=(d+256).toString(16).substr(1),c[n[d]]=d;function o(e,t){return t=t||0,n[e[t++]]+n[e[t++]]+n[e[t++]]+n[e[t++]]+"-"+n[e[t++]]+n[e[t++]]+"-"+n[e[t++]]+n[e[t++]]+"-"+n[e[t++]]+n[e[t++]]+"-"+n[e[t++]]+n[e[t++]]+n[e[t++]]+n[e[t++]]+n[e[t++]]+n[e[t++]]}var i=[1|(e=r())[0],e[1],e[2],e[3],e[4],e[5]],f=16383&(e[6]<<8|e[7]),s=0,b=0;function l(e,t,a){var n=t&&a||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var c=(e=e||{}).random||(e.rng||r)();if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,t)for(var d=0;d<16;d++)t[n+d]=c[d];return t||o(c)}(e=l).v1=function(e,t,a){var r=t&&a||0,n=t||[],c=void 0!==(e=e||{}).clockseq?e.clockseq:f,d=void 0!==e.msecs?e.msecs:(new Date).getTime(),l=void 0!==e.nsecs?e.nsecs:b+1;if((a=d-s+(l-b)/1e4)<0&&void 0===e.clockseq&&(c=c+1&16383),1e4<=(l=(a<0||s>>24&255,n[r++]=l>>>16&255,n[r++]=l>>>8&255,n[r++]=255&l,d=d/4294967296*1e4&268435455,n[r++]=d>>>8&255,n[r++]=255&d,n[r++]=d>>>24&15|16,n[r++]=d>>>16&255,n[r++]=c>>>8|128,n[r++]=255&c;for(var u=e.node||i,h=0;h<6;h++)n[r+h]=u[h];return t||o(n)},e.v4=l,e.parse=function(e,t,a){var r=t&&a||0,n=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,(function(e){n<16&&(t[r+n++]=c[e])}));n<16;)t[r+n++]=0;return t},e.unparse=o,t.exports=e},{"./rng":47}],49:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});try{t.exports.XMLHttpRequest=XMLHttpRequest}catch(e){console.log("Warning: XMLHttpRequest is not defined"),t.exports.XMLHttpRequest=null}},{}],50:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("../utils/properties");function n(){r.setType(this,"Provider")}n.isProvider=function(e){return r.isType(e,"Provider")},e=n,a.Provider=e},{"../utils/properties":74}],51:[function(e,t,a){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},function(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var d=e("../utils/address"),o=e("../utils/bignumber"),i=e("../utils/bytes"),f=e("../constants"),s=e("../utils/hash"),b=e("../utils/networks"),l=e("../utils/properties"),u=e("../utils/rlp"),h=e("../utils/transaction"),p=e("../utils/utf8"),x=e("../utils/web"),m=c(e("../errors")),g=e("./abstract-provider");function v(e,t){var a,r={};for(a in e)try{var n=e[a](t[a]);void 0!==n&&(r[a]=n)}catch(e){throw e.checkKey=a,e.checkValue=t[a],e}return r}function y(e,t){return function(a){return null==a?t:e(a)}}function w(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");var a=[];return t.forEach((function(t){a.push(e(t))})),a}}function k(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),32===i.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(!i.isHexString(e))throw new Error("invalid uint256");for(;e.length<66;)e="0x0"+e.substring(2);return e}function A(e){if(null==e)return"latest";if("earliest"===e)return"0x0";if("latest"===e||"pending"===e)return e;if("number"==typeof e)return i.hexStripZeros(i.hexlify(e));if(i.isHexString(e))return i.hexStripZeros(e);throw new Error("invalid blockTag")}var E={hash:k,blockHash:y(k,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:i.hexlify,r:y(_),s:y(_),v:y(I),creates:y(d.getAddress,null),raw:y(i.hexlify)};function S(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&&(a=[i.stripZeros(i.hexlify(e.nonce)),i.stripZeros(i.hexlify(e.gasPrice)),i.stripZeros(i.hexlify(e.gasLimit)),e.to||"0x",i.stripZeros(i.hexlify(e.value||"0x")),i.hexlify(e.data||"0x"),i.stripZeros(i.hexlify(e.v||"0x")),i.stripZeros(i.hexlify(e.r)),i.stripZeros(i.hexlify(e.s))],e.raw=u.encode(a));var t=v(E,e),a=e.networkId;return null!=e.chainId&&null==a&&null==t.v&&(a=e.chainId),"number"!=typeof(a=i.isHexString(a)?o.bigNumberify(a).toNumber():a)&&null!=t.v&&((a=(t.v-35)/2)<0&&(a=0),a=parseInt(a)),t.networkId=a="number"!=typeof a?0:a,null==t.chainId&&null!=a&&(t.chainId=a),t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}var N={hash:k,parentHash:k,number:I,timestamp:I,nonce:y(i.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:i.hexlify,transactions:y(w(k))},M=l.shallowCopy(N);function H(e,t){return null!=e.author&&null==e.miner&&(e.miner=e.author),v(t?M:N,e)}M.transactions=y(w(S));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(i.hexlify)};function P(e){return v(T,e)}var R={transactionLogIndex:y(I),transactionIndex:I,blockNumber:I,transactionHash:k,address:d.getAddress,topics:w(k),data:i.hexlify,logIndex:I,blockHash:k},C={to:y(d.getAddress,null),from:y(d.getAddress,null),contractAddress:y(d.getAddress,null),transactionIndex:I,root:y(k),gasUsed:o.bigNumberify,logsBloom:y(i.hexlify),blockHash:k,transactionHash:k,logs:w((function(e){return v(R,e)})),blockNumber:I,confirmations:y(I,null),cumulativeGasUsed:o.bigNumberify,status:y(I)};function O(e){return Array.isArray(e)?e.forEach((function(e){O(e)})):null!=e&&k(e),e}var D,B,L,j={fromBlock:y(A,void 0),toBlock:y(A,void 0),address:y(d.getAddress,void 0),topics:y(O,void 0)},U={blockHash:y(k,void 0),address:y(d.getAddress,void 0),topics:y(O,void 0)},F={blockNumber:y(I),blockHash:y(k),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=i.hexlify,B="0x",function(e){return e?D(e):B}),topics:w(k),transactionHash:k,logIndex:I};function z(e){return v(F,e)}function q(e){return e.map((function(e){return"string"==typeof e?e:Array.isArray(e)?(e.forEach((function(e){null!==e&&32!==i.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 W(e){if("string"==typeof e){if(20===i.hexDataLength(e))return"address:"+d.getAddress(e);if(e=e.toLowerCase(),32===i.hexDataLength(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter::"+q(e);if(e&&"object"==typeof e)return"filter:"+(e.address||"")+":"+q(e.topics||[])}throw new Error("invalid event - "+e)}function V(){return(new Date).getTime()}function K(e){var t,a=L.call(this)||this;return m.checkNew(a,g.Provider),e instanceof Promise?(l.defineReadOnly(a,"ready",e.then((function(e){return l.defineReadOnly(a,"_network",e),e}))),a.ready.catch((function(e){}))):(t=b.getNetwork(null==e?"homestead":e))?(l.defineReadOnly(a,"_network",t),l.defineReadOnly(a,"ready",Promise.resolve(a._network))):m.throwError("invalid network",m.INVALID_ARGUMENT,{arg:"network",value:e}),a._lastBlockNumber=-2,a._balances={},a._events=[],a._pollingInterval=4e3,a._emitted={block:-2},a._fastQueryDate=0,a}n(K,L=g.Provider),K.prototype._doPoll=function(){var e=this;this.getBlockNumber().then((function(t){if(e.polling&&(e._setFastBlockNumber(t),t!==e._lastBlockNumber)){-2===e._emitted.block&&(e._emitted.block=t-1);for(var a=e._emitted.block+1;a<=t;a++)e.emit("block",a);e._emitted.block!==t&&(e._emitted.block=t,Object.keys(e._emitted).forEach((function(a){var r;"block"===a||"pending"!==(r=e._emitted[a])&&122*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise},K.prototype._setFastBlockNumber=function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))},K.prototype.waitForTransaction=function(e,t){var a=this;return null==t&&(t=1),this.getTransactionReceipt(e).then((function(r){return 0===t||r&&r.confirmations>=t?r:new Promise((function(r){var n=function(c){c.confirmations(t=t.substring(64)).length)return null;var r=p.toUtf8String("0x"+t.substring(0,2*a));return n.resolveName(r).then((function(t){return t!=e?null:r}))}))},K.checkTransactionResponse=S,K.prototype.doPoll=function(){},K.prototype.perform=function(e,t){return m.throwError(e+" not implemented",m.NOT_IMPLEMENTED,{operation:e}),null},K.prototype._startPending=function(){m.warn("WARNING: this provider does not support pending events")},K.prototype._stopPending=function(){},K.prototype._addEventListener=function(e,t,a){this._events.push({tag:W(e),listener:t,once:a}),"pending"===e&&this._startPending(),this.polling=!0},K.prototype.on=function(e,t){return this._addEventListener(e,t,!1),this},K.prototype.once=function(e,t){return this._addEventListener(e,t,!0),this},K.prototype.addEventListener=function(e,t){return this.on(e,t)},K.prototype.emit=function(e){for(var t=this,a=[],r=1;re.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}},S);function S(e,t){return A.call(this,e,"null","",t,!1)||this}var N,M=(n(H,N=w),H.prototype.encode=function(e){try{var t=f.bigNumberify(e);if(this.signed){var a=d.MaxUint256.maskn(8*this.size-1);if(t.gt(a))throw new Error("out-of-bounds");if(a=a.add(d.One).mul(d.NegativeOne),t.lt(a))throw new Error("out-of-bounds")}else if(t.lt(d.Zero)||t.gt(d.MaxUint256.maskn(8*this.size)))throw new Error("out-of-bounds");return t=t.toTwos(8*this.size).maskn(8*this.size),this.signed&&(t=t.fromTwos(8*this.size).toTwos(256)),s.padZeros(s.arrayify(t),32)}catch(t){o.throwError("invalid number value",o.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e})}return null},H.prototype.decode=function(e,t){e.length>1]>>4&&(t[n]=t[n].toUpperCase()),8<=(15&a[n>>1])&&(t[n+1]=t[n+1].toUpperCase());return"0x"+t.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 t="";for(e.split("").forEach((function(e){t+=s[e]}));t.length>=u;){var a=t.substring(0,u);t=parseInt(a,10)%97+t.substring(a.length)}for(var r=String(98-parseInt(t,10)%97);r.length<2;)r="0"+r;return r}function p(e){var t=null;if("string"!=typeof e&&i.throwError("invalid address",i.INVALID_ARGUMENT,{arg:"address",value:e}),e.match(/^(0x)?[0-9a-fA-F]{40}$/))t=f(e="0x"!==e.substring(0,2)?"0x"+e:e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&i.throwError("bad address checksum",i.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)&&i.throwError("bad icap checksum",i.INVALID_ARGUMENT,{arg:"address",value:e}),t=new n.default.BN(e.substring(4),36).toString(16);t.length<40;)t="0"+t;t=f("0x"+t)}else i.throwError("invalid address",i.INVALID_ARGUMENT,{arg:"address",value:e});return t}a.getAddress=p,a.getIcapAddress=function(e){for(var t=new n.default.BN(p(e).substring(2),16).toString(36).toUpperCase();t.length<30;)t="0"+t;return"XE"+h("XE00"+t)+t},a.getContractAddress=function(e){if(!e.from)throw new Error("missing from address");var t=e.nonce;return p("0x"+d.keccak256(o.encode([p(e.from),c.stripZeros(c.hexlify(t))])).substring(26))},a.getCreate2Address=function(e){var t=e.initCodeHash;e.initCode&&(t?d.keccak256(e.initCode)!==t&&i.throwError("initCode/initCodeHash mismatch",i.INVALID_ARGUMENT,{arg:"options",value:e}):t=d.keccak256(e.initCode)),t||i.throwError("missing initCode or initCodeHash",i.INVALID_ARGUMENT,{arg:"options",value:e});var a=p(e.from),r=c.arrayify(e.salt);return 32!==r.length&&i.throwError("invalid salt",i.INVALID_ARGUMENT,{arg:"options",value:e}),p("0x"+d.keccak256(c.concat(["0xff",a,r,t])).substring(26))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./rlp":76,"bn.js":9}],61:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("../utils/bytes");t.exports={decode:function(e){e=atob(e);for(var t=[],a=0;a>=8;for(;0>=8}for(var o=0;e[o]===this._leader&&o>4]+b[15&i])}return"0x"+r.join("")}return n.throwError("invalid hexlify value",null,{arg:"value",value:e}),"never"}function u(e,t){for(s(e)||n.throwError("invalid hex string",n.INVALID_ARGUMENT,{arg:"value",value:e});e.length<2*t+2;)e="0x0"+e.substring(2);return e}function h(e){var t=0,a="0x",r="0x";if((c=e)&&null!=c.r&&null!=c.s){null==e.v&&null==e.recoveryParam&&n.throwError("at least on of recoveryParam or v must be specified",n.INVALID_ARGUMENT,{argument:"signature",value:e}),a=u(e.r,32),r=u(e.s,32),"string"==typeof(t=e.v)&&(t=parseInt(t,16));var c=e.recoveryParam;t=27+(c=null==c&&null!=e.v?1-t%2:c)}else{if(65!==(e=i(e)).length)throw new Error("invalid signature");a=l(e.slice(0,32)),r=l(e.slice(32,64)),27!==(t=e[64])&&28!==t&&(t=27+t%2)}return{r:a,s:r,recoveryParam:t-27,v:t}}a.hexlify=l,a.hexDataLength=function(e){return s(e)&&e.length%2==0?(e.length-2)/2:null},a.hexDataSlice=function(e,t,a){return s(e)||n.throwError("invalid hex data",n.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2!=0&&n.throwError("hex data length must be even",n.INVALID_ARGUMENT,{arg:"value",value:e}),t=2+2*t,null!=a?"0x"+e.substring(t,2+2*a):"0x"+e.substring(t)},a.hexStripZeros=function(e){for(s(e)||n.throwError("invalid hex string",n.INVALID_ARGUMENT,{arg:"value",value:e});3>3)]=e>>24-r&255;var n=(f=b.computeHmac(b.SupportedAlgorithms.sha512,this.chainCode,a)).slice(0,32),c=f.slice(32),d=null,f=null;return this.privateKey?d=v(i.bigNumberify(n).add(this.privateKey).mod(p)):f=new u.KeyPair(o.hexlify(n))._addPoint(this.publicKey),new I(w,d,f,this.fingerprint,v(c),e,this.depth+1,this.mnemonic,t)},I.prototype.derivePath=function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var a=this,r=0;r>3]|=1<<7-d%8),d++}var b=32*a.length/3,l=g(a.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 S(e,t){if((e=o.arrayify(e)).length%4!=0||e.length<16||32>8-r,a.push(e[n]&(1<<8-r)-1),r+=3);var d=o.arrayify(h.sha256(e))[0],i=e.length/4;return d&=g(i),a[a.length-1]<<=i,a[a.length-1]|=d>>8-i,(t=t||c.langEn).join(a.map((function(e){return t.getWord(e)})))}a.HDNode=k,a.fromExtendedKey=function(e){var t=d.Base58.decode(e);82===t.length&&y(t.slice(0,78))===e||n.throwError("invalid extended key",n.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"});var a=t[4],r=o.hexlify(t.slice(5,9)),c=parseInt(o.hexlify(t.slice(9,13)).substring(2),16),i=o.hexlify(t.slice(13,45)),f=t.slice(45,78);switch(o.hexlify(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new k(w,null,o.hexlify(f),r,i,c,a,null,null);case"0x0488ade4":case"0x04358394":if(0!==f[0])break;return new k(w,o.hexlify(f.slice(1)),null,r,i,c,a,null,null)}return n.throwError("invalid extended key",n.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"})},a.fromMnemonic=function(e,t,a){return _(A(e=S(E(e,t),t),a),e)},a.fromSeed=function(e){return _(e,null)},a.mnemonicToSeed=A,a.mnemonicToEntropy=E,a.entropyToMnemonic=S,a.isValidMnemonic=function(e,t){try{return E(e,t),!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,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n,c=r(e("hash.js")),d=e("../utils/bytes"),o=r(e("../errors"));(e=n=a.SupportedAlgorithms||(a.SupportedAlgorithms={})).sha256="sha256",e.sha512="sha512",a.computeHmac=function(e,t,a){return n[e]||o.throwError("unsupported algorithm "+e,o.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),d.arrayify(c.hmac(c[e],d.arrayify(t)).update(d.arrayify(a)).digest())}},{"../errors":5,"../utils/bytes":64,"hash.js":26}],68:[function(e,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n=e("./abi-coder");a.AbiCoder=n.AbiCoder,a.defaultAbiCoder=n.defaultAbiCoder,a.formatSignature=n.formatSignature,a.formatParamType=n.formatParamType,a.parseSignature=n.parseSignature,a.parseParamType=n.parseParamType,n=e("./address"),a.getAddress=n.getAddress,a.getContractAddress=n.getContractAddress,a.getCreate2Address=n.getCreate2Address,a.getIcapAddress=n.getIcapAddress,n=r(e("./base64")),a.base64=n,n=e("./bignumber"),a.BigNumber=n.BigNumber,a.bigNumberify=n.bigNumberify,n=e("./bytes"),a.arrayify=n.arrayify,a.concat=n.concat,a.hexDataSlice=n.hexDataSlice,a.hexDataLength=n.hexDataLength,a.hexlify=n.hexlify,a.hexStripZeros=n.hexStripZeros,a.hexZeroPad=n.hexZeroPad,a.isHexString=n.isHexString,a.joinSignature=n.joinSignature,a.padZeros=n.padZeros,a.splitSignature=n.splitSignature,a.stripZeros=n.stripZeros,n=e("./hash"),a.hashMessage=n.hashMessage,a.id=n.id,a.namehash=n.namehash,n=r(e("./hdnode")),a.HDNode=n,n=e("./interface"),a.Interface=n.Interface,n=e("./json-wallet"),a.getJsonWalletAddress=n.getJsonWalletAddress,n=e("./keccak256"),a.keccak256=n.keccak256,n=e("./sha2"),a.sha256=n.sha256,n=e("./solidity"),a.solidityKeccak256=n.keccak256,a.solidityPack=n.pack,a.soliditySha256=n.sha256,n=e("./random-bytes"),a.randomBytes=n.randomBytes,n=e("./networks"),a.getNetwork=n.getNetwork,n=e("./properties"),a.checkProperties=n.checkProperties,a.deepCopy=n.deepCopy,a.defineReadOnly=n.defineReadOnly,a.resolveProperties=n.resolveProperties,a.shallowCopy=n.shallowCopy,r=r(e("./rlp")),a.RLP=r,r=e("./secp256k1"),a.computeAddress=r.computeAddress,a.computePublicKey=r.computePublicKey,a.recoverAddress=r.recoverAddress,a.recoverPublicKey=r.recoverPublicKey,a.verifyMessage=r.verifyMessage,r=e("./signing-key"),a.SigningKey=r.SigningKey,r=e("./transaction"),a.populateTransaction=r.populateTransaction,r=e("./transaction"),a.parseTransaction=r.parse,a.serializeTransaction=r.serialize,r=e("./utf8"),a.formatBytes32String=r.formatBytes32String,a.parseBytes32String=r.parseBytes32String,a.toUtf8Bytes=r.toUtf8Bytes,a.toUtf8String=r.toUtf8String,r=e("./units"),a.commify=r.commify,a.formatEther=r.formatEther,a.parseEther=r.parseEther,a.formatUnits=r.formatUnits,a.parseUnits=r.parseUnits,r=e("./web"),a.fetchJson=r.fetchJson,a.poll=r.poll,r=e("./hmac"),a.SupportedAlgorithms=r.SupportedAlgorithms,r=e("./utf8"),a.UnicodeNormalizationForm=r.UnicodeNormalizationForm,e=e("./wordlist"),a.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,t,a){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},function(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var d,o=e("./address"),i=e("./abi-coder"),f=e("./bignumber"),s=e("./bytes"),b=e("./hash"),l=e("./keccak256"),u=e("./properties"),h=c(e("../errors")),p=function(e){u.setType(this,"Indexed"),u.defineReadOnly(this,"hash",e)},x=(e=function(e){for(var t in u.setType(this,"Description"),e)u.defineReadOnly(this,t,u.deepCopy(e[t],!0));Object.freeze(this)},n(m,d=e),m.prototype.encode=function(e,t){s.isHexString(e)||h.throwError("invalid contract bytecode",h.INVALID_ARGUMENT,{arg:"bytecode",value:e}),h.checkArgumentCount(t.length,this.inputs.length," in Interface constructor");try{return e+i.defaultAbiCoder.encode(this.inputs,t).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 g,v=(n(y,g=e),y.prototype.encode=function(e){h.checkArgumentCount(e.length,this.inputs.length," in interface function "+this.name);try{return this.sighash+i.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(t){try{return i.defaultAbiCoder.decode(this.outputs,s.arrayify(t))}catch(e){h.throwError("invalid data for function output",h.INVALID_ARGUMENT,{arg:"data",errorArg:e.arg,errorValue:e.value,value:t,reason:e.reason})}},y);function y(){return null!==g&&g.apply(this,arguments)||this}var w,k=(n(I,w=e),I);function I(){return null!==w&&w.apply(this,arguments)||this}var _,A=(n(E,_=e),E.prototype.encodeTopics=function(e){var t=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 a=[];for(this.anonymous||a.push(this.topic),e.forEach((function(e,r){var n=t.inputs[r];n.indexed?null==e?a.push(null):"string"===n.type?a.push(b.id(e)):"bytes"===n.type?a.push(l.keccak256(e)):-1!==n.type.indexOf("[")||"tuple"===n.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"===n.type&&o.getAddress(e),a.push(s.hexZeroPad(s.hexlify(e),32).toLowerCase())):null!=e&&h.throwError("cannot filter non-indexed parameters; must be null",h.INVALID_ARGUMENT,{argument:n.name||r,value:e})}));a.length&&null===a[a.length-1];)a.pop();return a},E.prototype.decode=function(e,t){null==t||this.anonymous||(t=t.slice(1));var a,r=[],n=[],c=[];this.inputs.forEach((function(e,t){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||""}),c.push(!0)):(r.push(e),c.push(!1)):(n.push(e),c.push(!1))})),null!=t&&(a=i.defaultAbiCoder.decode(r,s.concat(t)));var d=i.defaultAbiCoder.decode(n,s.arrayify(e)),o={},f=0,b=0;return this.inputs.forEach((function(e,r){e.indexed?null==t?o[r]=new p(null):c[r]?o[r]=new p(a[b++]):o[r]=a[b++]:o[r]=d[f++],e.name&&(o[e.name]=o[r])})),o.length=this.inputs.length,new k(o)},E);function E(){return null!==_&&_.apply(this,arguments)||this}var S,N=(n(M,S=e),M);function M(){return null!==S&&S.apply(this,arguments)||this}var H,T=(n(P,H=e),P);function P(){return null!==H&&H.apply(this,arguments)||this}function R(e){switch(e.type){case"constructor":var t=new x({inputs:e.inputs,payable:null==e.payable||!!e.payable});this.deployFunction||(this.deployFunction=t);break;case"function":var a=i.formatSignature(e).replace(/tuple/g,""),r=b.id(a).substring(0,10),n=!1;null!=e.constant?n=e.constant:null!=e.stateMutability&&(n="view"==e.stateMutability||"pure"==e.stateMutability),t=new v({inputs:e.inputs,outputs:e.outputs,gas:e.gas,payable:null==e.payable||!!e.payable,type:n?"call":"transaction",name:e.name,signature:a,sighash:r}),e.name&&(null==this.functions[e.name]?u.defineReadOnly(this.functions,e.name,t):h.warn("WARNING: Multiple definitions for "+e.name)),null==this.functions[t.signature]&&u.defineReadOnly(this.functions,t.signature,t);break;case"event":a=i.formatSignature(e).replace(/tuple/g,""),t=new A({name:e.name,signature:a,inputs:e.inputs,topic:b.id(a),anonymous:!!e.anonymous}),e.name&&null==this.events[e.name]&&u.defineReadOnly(this.events,e.name,t),null==this.events[t.signature]&&u.defineReadOnly(this.events,t.signature,t);break;case"receive":case"fallback":break;default:h.warn("WARNING: unsupported ABI type - "+e.type)}}function C(t){if(h.checkNew(this,C),"string"==typeof t){try{t=JSON.parse(t)}catch(e){h.throwError("could not parse ABI JSON",h.INVALID_ARGUMENT,{arg:"abi",errorMessage:e.message,value:t})}if(!Array.isArray(t))return h.throwError("invalid abi",h.INVALID_ARGUMENT,{arg:"abi",value:t}),null}u.defineReadOnly(this,"functions",{}),u.defineReadOnly(this,"events",{});var a=[];t.forEach((function(e){"string"==typeof e&&(e=i.parseSignature(e)),a.push(e)})),u.defineReadOnly(this,"abi",u.deepCopy(a,!0)),a.forEach(R,this),this.deployFunction||R.call(this,{type:"constructor",inputs:[]}),u.setType(this,"Interface")}C.prototype.parseTransaction=function(e){var t,a=e.data.substring(0,10).toLowerCase();for(t in this.functions)if(-1!==t.indexOf("(")){var r=this.functions[t];if(r.sighash===a){var n=i.defaultAbiCoder.decode(r.inputs,"0x"+e.data.substring(10));return new N({args:n,decode:r.decode,name:r.name,signature:r.signature,sighash:r.sighash,value:f.bigNumberify(e.value||"0")})}}return null},C.prototype.parseLog=function(e){for(var t in this.events)if(-1!==t.indexOf("(")&&!(t=this.events[t]).anonymous&&t.topic===e.topics[0])return new T({decode:t.decode,name:t.name,signature:t.signature,topic:t.topic,values:t.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,a.Interface=e},{"../errors":5,"./abi-coder":59,"./address":60,"./bignumber":63,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74}],70:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("./address");function n(e){try{var t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function c(e){try{var t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}a.isCrowdsaleWallet=n,a.isSecretStorageWallet=c,a.getJsonWalletAddress=function(e){if(n(e))try{return r.getAddress(JSON.parse(e).ethaddr)}catch(e){return null}if(c(e))try{return r.getAddress(JSON.parse(e).address)}catch(e){return null}return null}},{"./address":60}],71:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("js-sha3"),n=e("./bytes");a.keccak256=function(e){return"0x"+r.keccak_256(n.arrayify(e))}},{"./bytes":64,"js-sha3":40}],72:[function(e,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n=r(e("../errors"));function c(e){return function(t){var a=[];return t.InfuraProvider&&a.push(new t.InfuraProvider(e)),t.EtherscanProvider&&a.push(new t.EtherscanProvider(e)),0===a.length?null:t.FallbackProvider?new t.FallbackProvider(a):a[0]}}function d(e,t){return function(a){return a.JsonRpcProvider?new a.JsonRpcProvider(e,t):null}}var o={unspecified:{chainId:0,name:"unspecified"},homestead:r={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:c("homestead")},mainnet:r,morden:{chainId:2,name:"morden"},ropsten:e={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:c("ropsten")},testnet:e,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:c("rinkeby")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:c("goerli")},kovan:{chainId:42,name:"kovan",_defaultProvider:c("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")}};a.getNetwork=function(e){if(null==e)return null;if("number"==typeof e){for(var t in o)if((t=o[t]).chainId===e)return{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress||null,_defaultProvider:t._defaultProvider||null};return{chainId:e,name:"unknown"}}if("string"!=typeof e)return(a=o[e.name])?(0!==e.chainId&&e.chainId!==a.chainId&&n.throwError("network chainId mismatch",n.INVALID_ARGUMENT,{arg:"network",value:e}),{name:e.name,chainId:a.chainId,ensAddress:e.ensAddress||a.ensAddress||null,_defaultProvider:e._defaultProvider||a._defaultProvider||null}):("number"!=typeof e.chainId&&n.throwError("invalid network chainId",n.INVALID_ARGUMENT,{arg:"network",value:e}),e);var a=o[e];return null==a?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}},{"../errors":5}],73:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("../utils/bytes"),n=e("./hmac");a.pbkdf2=function(e,t,a,c,d){var o;e=r.arrayify(e),t=r.arrayify(t);var i,f,s=1,b=new Uint8Array(c),l=new Uint8Array(t.length+4);l.set(t);for(var u=1;u<=s;u++){l[t.length]=u>>24&255,l[t.length+1]=u>>16&255,l[t.length+2]=u>>8&255,l[t.length+3]=255&u;var h=n.computeHmac(d,e,l);o||(o=h.length,f=new Uint8Array(o),i=c-((s=Math.ceil(c/o))-1)*o),f.set(h);for(var p=1;p>=8;return t}function c(e,t,a){for(var r=0,n=0;ne.length)throw new Error("too short");if(t+1+a+(n=c(e,t+1,a))>e.length)throw new Error("to short");return d(e,t,t+1+a,a+n)}if(192<=e[t]){if(t+1+(n=e[t]-192)>e.length)throw new Error("invalid rlp data");return d(e,t,t+1,n)}if(184<=e[t]){var a;if(t+1+(a=e[t]-183)>e.length)throw new Error("invalid rlp data");if(t+1+a+(n=c(e,t+1,a))>e.length)throw new Error("invalid rlp data");return{consumed:1+a+n,result:r.hexlify(e.slice(t+1+a,t+1+a+n))}}if(128<=e[t]){var n;if(t+1+(n=e[t]-128)>e.length)throw new Error("invalid rlp data");return{consumed:1+n,result:r.hexlify(e.slice(t+1,t+1+n))}}return{consumed:1,result:r.hexlify(e[t])}}a.encode=function(e){return r.hexlify(function e(t){if(Array.isArray(t)){var a=[];return t.forEach((function(t){a=a.concat(e(t))})),a.length<=55?(a.unshift(192+a.length),a):((c=n(a.length)).unshift(247+c.length),c.concat(a))}var c;return 1===(t=Array.prototype.slice.call(r.arrayify(t))).length&&t[0]<=127?t:t.length<=55?(t.unshift(128+t.length),t):((c=n(t.length)).unshift(183+c.length),c.concat(t))}(e))},a.decode=function(e){var t=r.arrayify(e);if((e=o(t,0)).consumed!==t.length)throw new Error("invalid rlp data");return e.result}},{"./bytes":64}],77:[function(e,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n=e("elliptic"),c=e("./address"),d=e("./bytes"),o=e("./hash"),i=e("./keccak256"),f=e("./properties"),s=r(e("../errors")),b=null;function l(){return b=b||new n.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 t=l().keyFromPrivate(d.arrayify(this.privateKey));return e=l().keyFromPublic(d.arrayify(p(e))),d.hexZeroPad("0x"+t.derive(e.getPublic()).toString(16),32)},h.prototype._addPoint=function(e){var t=l().keyFromPublic(d.arrayify(this.publicKey));return e=l().keyFromPublic(d.arrayify(e)),"0x"+t.pub.add(e.pub).encodeCompressed("hex")},h);function h(e){e=l().keyFromPrivate(d.arrayify(e)),f.defineReadOnly(this,"privateKey",d.hexlify(e.priv.toArray("be",32))),f.defineReadOnly(this,"publicKey","0x"+e.getPublic(!1,"hex")),f.defineReadOnly(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),f.defineReadOnly(this,"publicKeyBytes",e.getPublic().encode(null,!0))}function p(e,t){return 32!==(e=d.arrayify(e)).length?33===e.length?t?d.hexlify(e):"0x"+l().keyFromPublic(e).getPublic(!1,"hex"):65===e.length?t?"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),t?e.compressedPublicKey:e.publicKey)}function x(e){return e="0x"+p(e).slice(4),c.getAddress("0x"+i.keccak256(e).substring(26))}function m(e,t){var a=d.splitSignature(t);return t={r:d.arrayify(a.r),s:d.arrayify(a.s)},"0x"+l().recoverPubKey(d.arrayify(e),t,a.recoveryParam).encode("hex",!1)}function g(e,t){return x(m(d.arrayify(e),t))}a.KeyPair=u,a.computePublicKey=p,a.computeAddress=x,a.recoverPublicKey=m,a.recoverAddress=g,a.verifyMessage=function(e,t){return g(o.hashMessage(e),t)}},{"../errors":5,"./address":60,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74,elliptic:12}],78:[function(e,t,a){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var c=r(e("aes-js")),d=r(e("scrypt-js")),o=r(e("uuid")),i=e("./signing-key"),f=n(e("./hdnode")),s=e("./address"),b=e("./bytes"),l=e("./pbkdf2"),u=e("./keccak256"),h=e("./utf8"),p=e("./random-bytes");function x(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),b.arrayify(e)}function m(e,t){for(e=String(e);e.lengtht.maxLength&&c.throwError("invalid length for "+t.name,c.INVALID_ARGUMENT,{arg:"transaction"+t.name,value:r}),a.push(f.hexlify(r))})),null!=e.chainId&&0!==e.chainId&&(a.push(f.hexlify(e.chainId)),a.push("0x"),a.push("0x"));var r=l.encode(a);return t?(t=27+(r=f.splitSignature(t)).recoveryParam,9===a.length&&(a.pop(),a.pop(),a.pop(),t+=2*e.chainId+8),a.push(f.hexlify(t)),a.push(f.stripZeros(f.arrayify(r.r))),a.push(f.stripZeros(f.arrayify(r.s))),l.encode(a)):r},a.parse=function(e){9!==(r=l.decode(e)).length&&6!==r.length&&c.throwError("invalid raw transaction",c.INVALID_ARGUMENT,{arg:"rawTransactin",value:e});var t={nonce:h(r[0]).toNumber(),gasPrice:h(r[1]),gasLimit:h(r[2]),to:"0x"===(a=r[3])?null:o.getAddress(a),value:h(r[4]),data:r[5],chainId:0};if(6===r.length)return t;try{t.v=i.bigNumberify(r[6]).toNumber()}catch(e){return c.info(e),t}if(t.r=f.hexZeroPad(r[7],32),t.s=f.hexZeroPad(r[8],32),i.bigNumberify(t.r).isZero()&&i.bigNumberify(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);var a=t.v-27,r=r.slice(0,6);0!==t.chainId&&(r.push(f.hexlify(t.chainId)),r.push("0x"),r.push("0x"),a-=2*t.chainId+8),r=s.keccak256(l.encode(r));try{t.from=d.recoverAddress(r,{r:f.hexlify(t.r),s:f.hexlify(t.s),recoveryParam:a})}catch(e){c.info(e)}t.hash=s.keccak256(e)}return t},a.populateTransaction=function(e,t,a){u.Provider.isProvider(t)||c.throwError("missing provider",c.INVALID_ARGUMENT,{argument:"provider",value:t}),b.checkProperties(e,x);var r=b.shallowCopy(e);return null!=r.to&&(r.to=t.resolveName(r.to)),null==r.gasPrice&&(r.gasPrice=t.getGasPrice()),null==r.nonce&&(r.nonce=t.getTransactionCount(a)),null==r.gasLimit&&((e=b.shallowCopy(r)).from=a,r.gasLimit=t.estimateGas(e)),null==r.chainId&&(r.chainId=t.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,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n,c=e("../constants"),d=r(e("../errors")),o=e("./bignumber"),i={};function f(e){return{decimals:e.length-1,tenPower:o.bigNumberify(e)}}function s(e){var t=i[String(e).toLowerCase()];if(!t&&"number"==typeof e&&parseInt(String(e))==e&&0<=e&&e<=256){for(var a="1",r=0;ra.decimals&&d.throwError("underflow occurred",d.NUMERIC_FAULT,{operation:"division",fault:"underflow"});n.length>6|192),a.push(63&o|128);else if(55296==(64512&o)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");a.push((o=65536+((1023&o)<<10)+(1023&i))>>18|240),a.push(o>>12&63|128),a.push(o>>6&63|128),a.push(63&o|128)}else a.push(o>>12|224),a.push(o>>6&63|128),a.push(63&o|128)}return d.arrayify(a)}function i(e,t){e=d.arrayify(e);for(var a="",r=0;r>7!=0){var c=null,o=null;if(192==(224&n))c=1,o=127;else if(224==(240&n))c=2,o=2047;else{if(240!=(248&n)){if(t)continue;if(128==(192&n))throw new Error("invalid utf8 byte sequence; unexpected continuation byte");throw new Error("invalid utf8 byte sequence; invalid prefix")}c=3,o=65535}if(r+c>e.length){if(!t)throw new Error("invalid utf8 byte sequence; too short");for(;r>6==2;r++);}else{for(var i=n&(1<<8-c-1)-1,f=0;f>10&1023),56320+(1023&i)));else if(!t)throw new Error("invalid utf8 byte sequence; invalid continuation byte")}}else a+=String.fromCharCode(n)}return a}(e=r=a.UnicodeNormalizationForm||(a.UnicodeNormalizationForm={})).current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD",a.toUtf8Bytes=o,a.toUtf8String=i,a.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,n.HashZero]).slice(0,32))},a.parseBytes32String=function(e){var t=d.arrayify(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var a=31;0===t[a-1];)a--;return i(t.slice(0,a))}},{"../constants":3,"../errors":5,"./bytes":64}],86:[function(e,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n=e("xmlhttprequest"),c=e("./base64"),d=e("./properties"),o=e("./utf8"),i=r(e("../errors"));a.fetchJson=function(e,t,a){var r,d={},f=null,s=12e4;if("string"==typeof e)f=e;else if("object"==typeof e){if(null==e.url&&i.throwError("missing URL",i.MISSING_ARGUMENT,{arg:"url"}),f=e.url,"number"==typeof e.timeout&&0t.ceiling&&(e=t.ceiling),o&&(i--,e=o,o=null),setTimeout(n,e)),null}),(function(e){d()&&r(e)}))}()}))}},{"../errors":5,"./base64":61,"./properties":74,"./utf8":85,xmlhttprequest:49}],87:[function(e,t,r){(function(t){(function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=e("../utils/hash"),a=e("../utils/properties");r.check=function(e){for(var a=[],r=0;r<2048;r++){var n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";a.push(n)}return t.id(a.join("\n")+"\n")};var n=(c.prototype.split=function(e){return e.toLowerCase().split(/ +/g)},c.prototype.join=function(e){return e.join(" ")},c);function c(e){a.defineReadOnly(this,"locale",e)}r.Wordlist=n,r.register=function(e,t){t=t||e.locale}}).call(this)}).call(this,"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/hash":65,"../utils/properties":74}],88:[function(e,t,a){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},function(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var d,o=e("./utils/bytes"),i=e("./utils/hash"),f=e("./utils/hdnode"),s=e("./utils/json-wallet"),b=e("./utils/keccak256"),l=e("./utils/properties"),u=e("./utils/random-bytes"),h=c(e("./utils/secret-storage")),p=e("./utils/signing-key"),x=e("./utils/transaction"),m=e("./abstract-signer"),g=e("./providers/abstract-provider"),v=c(e("./errors"));function y(e,t){var a=d.call(this)||this;return v.checkNew(a,y),p.SigningKey.isSigningKey(e)?l.defineReadOnly(a,"signingKey",e):l.defineReadOnly(a,"signingKey",new p.SigningKey(e)),l.defineReadOnly(a,"provider",t),a}n(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 g.Provider.isProvider(e)||v.throwError("invalid provider",v.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 t=this;return l.resolveProperties(e).then((function(e){var a=x.serialize(e);return a=t.signingKey.signDigest(b.keccak256(a)),x.serialize(e,a)}))},y.prototype.signMessage=function(e){return Promise.resolve(o.joinSignature(this.signingKey.signDigest(i.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 t=this;if(!this.provider)throw new Error("missing provider");return null==e.nonce&&((e=l.shallowCopy(e)).nonce=this.getTransactionCount("pending")),x.populateTransaction(e,this.provider,this.address).then((function(e){return t.sign(e).then((function(e){return t.provider.sendTransaction(e)}))}))},y.prototype.encrypt=function(e,t,a){if("function"!=typeof t||a||(a=t,t={}),a&&"function"!=typeof a)throw new Error("invalid callback");return t=t||{},this.mnemonic&&((t=l.shallowCopy(t)).mnemonic=this.mnemonic,t.path=this.path),h.encrypt(this.privateKey,e,t,a)},y.createRandom=function(e){var t=u.randomBytes(16);return(e=e||{}).extraEntropy&&(t=o.arrayify(b.keccak256(o.concat([t,e.extraEntropy])).substring(0,34))),t=f.entropyToMnemonic(t,e.locale),y.fromMnemonic(t,e.path,e.locale)},y.fromEncryptedJson=function(e,t,a){if(s.isCrowdsaleWallet(e))try{a&&a(0);var r=h.decryptCrowdsale(e,t);return a&&a(1),Promise.resolve(new y(r))}catch(e){return Promise.reject(e)}else if(s.isSecretStorageWallet(e))return h.decrypt(e,t,a).then((function(e){return new y(e)}));return Promise.reject("invalid wallet JSON")},y.fromMnemonic=function(e,t,a){return t=t||f.defaultPath,new y(f.fromMnemonic(e,a).derivePath(t))},n=y,a.Wallet=n},{"./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,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),e=e("../wordlists/lang-en").langEn,a.en=e},{"../wordlists/lang-en":90}],90:[function(e,t,a){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},function(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(a,"__esModule",{value:!0});var c,d=e("../utils/wordlist"),o="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",i=null;function f(e){if(null==i&&(i=o.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==d.check(e)))throw i=null,new Error("BIP39 Wordlist for en (English) FAILED")}function s(){return c.call(this,"en")||this}n=new(n(s,c=d.Wordlist),s.prototype.getWord=function(e){return f(this),i[e]},s.prototype.getWordIndex=function(e){return f(this),i.indexOf(e)},s),a.langEn=n,d.register(n)},{"../utils/wordlist":87}]},{},[7])(7)},4631:(e,t,a)=>{var r,n=a(62285);!function(){"use strict";var c="input is invalid type",d="object"===typeof window,o=d?window:{};o.JS_SHA3_NO_WINDOW&&(d=!1);var i=!d&&"object"===typeof self;!o.JS_SHA3_NO_NODE_JS&&"object"===typeof n&&n.versions&&n.versions.node?o=a.g:i&&(o=self);var f=!o.JS_SHA3_NO_COMMON_JS&&e.exports,s=a.amdO,b=!o.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,l="0123456789abcdef".split(""),u=[4,1024,262144,67108864],h=[0,8,16,24],p=[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],x=[224,256,384,512],m=[128,256],g=["hex","buffer","arrayBuffer","array","digest"],v={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,t,a){return function(r){return new O(e,t,e).update(r)[a]()}},w=function(e,t,a){return function(r,n){return new O(e,t,n).update(r)[a]()}},k=function(e,t,a){return function(t,r,n,c){return S["cshake"+e].update(t,r,n,c)[a]()}},I=function(e,t,a){return function(t,r,n,c){return S["kmac"+e].update(t,r,n,c)[a]()}},_=function(e,t,a,r){for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=a>>5,this.extraBytes=(31&a)>>3;for(var r=0;r<50;++r)this.s[r]=0}function D(e,t,a){O.call(this,e,t,a)}O.prototype.update=function(e){if(!this.finalized){var t,a=typeof e;if("string"!==a){if("object"!==a)throw c;if(null===e)throw c;if(b&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!b||!ArrayBuffer.isView(e)))throw c;t=!0}for(var r,n,d=this.blocks,o=this.byteCount,i=e.length,f=this.blockCount,s=0,l=this.s;s>2]|=e[s]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(d[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=o){for(this.start=r-o,this.block=d[f],r=0;r>=8);a>0;)n.unshift(a),a=255&(e>>=8),++r;return t?n.push(r):n.unshift(r),this.update(n),n.length},O.prototype.encodeString=function(e){var t,a=typeof e;if("string"!==a){if("object"!==a)throw c;if(null===e)throw c;if(b&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!b||!ArrayBuffer.isView(e)))throw c;t=!0}var r=0,n=e.length;if(t)r=n;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},O.prototype.bytepad=function(e,t){for(var a=this.encode(t),r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[a],t=1;t>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%t===0&&(B(a),c=0)}return n&&(e=a[c],o+=l[e>>4&15]+l[15&e],n>1&&(o+=l[e>>12&15]+l[e>>8&15]),n>2&&(o+=l[e>>20&15]+l[e>>16&15])),o},O.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,a=this.s,r=this.outputBlocks,n=this.extraBytes,c=0,d=0,o=this.outputBits>>3;e=n?new ArrayBuffer(r+1<<2):new ArrayBuffer(o);for(var i=new Uint32Array(e);d>8&255,i[e+2]=t>>16&255,i[e+3]=t>>24&255;o%a===0&&B(r)}return c&&(e=o<<2,t=r[d],i[e]=255&t,c>1&&(i[e+1]=t>>8&255),c>2&&(i[e+2]=t>>16&255)),i},D.prototype=new O,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var B=function(e){var t,a,r,n,c,d,o,i,f,s,b,l,u,h,x,m,g,v,y,w,k,I,_,A,E,S,N,M,H,T,P,R,C,O,D,B,L,j,U,F,z,q,W,V,K,G,Y,J,X,Z,Q,$,ee,te,ae,re,ne,ce,de,oe,ie,fe,se;for(r=0;r<48;r+=2)n=e[0]^e[10]^e[20]^e[30]^e[40],c=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],i=e[4]^e[14]^e[24]^e[34]^e[44],f=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],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(d<<1|o>>>31),a=(u=e[9]^e[19]^e[29]^e[39]^e[49])^(o<<1|d>>>31),e[0]^=t,e[1]^=a,e[10]^=t,e[11]^=a,e[20]^=t,e[21]^=a,e[30]^=t,e[31]^=a,e[40]^=t,e[41]^=a,t=n^(i<<1|f>>>31),a=c^(f<<1|i>>>31),e[2]^=t,e[3]^=a,e[12]^=t,e[13]^=a,e[22]^=t,e[23]^=a,e[32]^=t,e[33]^=a,e[42]^=t,e[43]^=a,t=d^(s<<1|b>>>31),a=o^(b<<1|s>>>31),e[4]^=t,e[5]^=a,e[14]^=t,e[15]^=a,e[24]^=t,e[25]^=a,e[34]^=t,e[35]^=a,e[44]^=t,e[45]^=a,t=i^(l<<1|u>>>31),a=f^(u<<1|l>>>31),e[6]^=t,e[7]^=a,e[16]^=t,e[17]^=a,e[26]^=t,e[27]^=a,e[36]^=t,e[37]^=a,e[46]^=t,e[47]^=a,t=s^(n<<1|c>>>31),a=b^(c<<1|n>>>31),e[8]^=t,e[9]^=a,e[18]^=t,e[19]^=a,e[28]^=t,e[29]^=a,e[38]^=t,e[39]^=a,e[48]^=t,e[49]^=a,h=e[0],x=e[1],G=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,M=e[20]<<3|e[21]>>>29,H=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,ie=e[30]<<9|e[31]>>>23,q=e[40]<<18|e[41]>>>14,W=e[41]<<18|e[40]>>>14,O=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,fe=e[42]<<2|e[43]>>>30,se=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ae=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,y=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ne=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,S=e[18]<<20|e[19]>>>12,N=e[19]<<20|e[18]>>>12,ce=e[29]<<7|e[28]>>>25,de=e[28]<<7|e[29]>>>25,F=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,I=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=h^~m&v,e[1]=x^~g&y,e[10]=A^~S&M,e[11]=E^~N&H,e[20]=O^~B&j,e[21]=D^~L&U,e[30]=V^~G&J,e[31]=K^~Y&X,e[40]=te^~re&ce,e[41]=ae^~ne&de,e[2]=m^~v&w,e[3]=g^~y&k,e[12]=S^~M&T,e[13]=N^~H&P,e[22]=B^~j&F,e[23]=L^~U&z,e[32]=G^~J&Z,e[33]=Y^~X&Q,e[42]=re^~ce&oe,e[43]=ne^~de&ie,e[4]=v^~w&I,e[5]=y^~k&_,e[14]=M^~T&R,e[15]=H^~P&C,e[24]=j^~F&q,e[25]=U^~z&W,e[34]=J^~Z&$,e[35]=X^~Q&ee,e[44]=ce^~oe&fe,e[45]=de^~ie&se,e[6]=w^~I&h,e[7]=k^~_&x,e[16]=T^~R&A,e[17]=P^~C&E,e[26]=F^~q&O,e[27]=z^~W&D,e[36]=Z^~$&V,e[37]=Q^~ee&K,e[46]=oe^~fe&te,e[47]=ie^~se&ae,e[8]=I^~h&m,e[9]=_^~x&g,e[18]=R^~A&S,e[19]=C^~E&N,e[28]=q^~O&B,e[29]=W^~D&L,e[38]=$^~V&G,e[39]=ee^~K&Y,e[48]=fe^~te&re,e[49]=se^~ae&ne,e[0]^=p[r],e[1]^=p[r+1]};if(f)e.exports=S;else{for(M=0;M{"use strict";e.exports={stdout:!1,stderr:!1}},36277:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(40950);t.Web3Wrapper=r.Web3Wrapper;var n=a(21024);t.marshaller=n.marshaller;var c=a(98295);t.AbiDecoder=c.AbiDecoder;var d=a(91253);t.BlockParamLiteral=d.BlockParamLiteral,t.OpCode=d.OpCode;var o=a(86684);t.Web3WrapperErrors=o.Web3WrapperErrors,t.NodeType=o.NodeType},21024:function(e,t,a){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,a=1,r=arguments.length;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.TransactionMiningTimeout="TRANSACTION_MINING_TIMEOUT"}(t.Web3WrapperErrors||(t.Web3WrapperErrors={})),function(e){e.Geth="GETH",e.Ganache="GANACHE"}(t.NodeType||(t.NodeType={}))},15728:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(98295),n=a(53536);t.utils={convertHexToNumber:function(e){return new r.BigNumber(e).toNumber()},convertHexToNumberOrNull:function(e){return null===e?null:t.utils.convertHexToNumber(e)},convertAmountToBigNumber:function(e){var t=e||0;if(r.BigNumber.isBigNumber(t))return t;if(n.isString(t)&&(0===t.indexOf("0x")||0===t.indexOf("-0x")))return new r.BigNumber(t.replace("0x",""),16);return new r.BigNumber(t.toString(10),10)},encodeAmountAsHexString:function(e){var a=t.utils.convertAmountToBigNumber(e),r=a.toString(16);return a.isLessThan(0)?"-0x"+r.substr(1):"0x"+r},numberToHex:function(e){if(!isFinite(e)&&!t.utils.isHexStrict(e))throw new Error("Given input "+e+" is not a number.");var a=new r.BigNumber(e),n=a.toString(16);return a.lt(0)?"-0x"+n.substr(1):"0x"+n},isHexStrict:function(e){return(n.isString(e)||n.isNumber(e))&&/^(-)?0x[0-9a-f]*$/i.test(n.isNumber(e)?e.toString():e)}}},40950:function(e,t,a){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,a=1,r=arguments.length;a0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]{"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},n=a(30994),c=n.keccak224,d=n.keccak384,o=n.keccak256,i=n.keccak512,f=a(57764),s=a(2539),b=a(3225),l=a(6373),u=a(36059),h=a(59966).Buffer;Object.assign(t,a(8647)),t.MAX_INTEGER=new l("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new l("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=h.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=h.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=h.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=l,t.rlp=b,t.secp256k1=f,t.zeros=function(e){return h.allocUnsafe(e).fill(0)},t.zeroAddress=function(){var e=t.zeros(20);return t.bufferToHex(e)},t.setLengthLeft=t.setLength=function(e,a,r){var n=t.zeros(a);return e=t.toBuffer(e),r?e.length0&&"0"===a.toString();)a=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!h.isBuffer(e))if(Array.isArray(e))e=h.from(e);else if("string"===typeof e)e=t.isHexString(e)?h.from(t.padToEven(t.stripHexPrefix(e)),"hex"):h.from(e);else if("number"===typeof e)e=t.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},t.bufferToInt=function(e){return new l(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new l(e).fromTwos(256)},t.toUnsigned=function(e){return h.from(e.toTwos(256).toArray())},t.keccak=function(e,a){switch(e=t.toBuffer(e),a||(a=256),a){case 224:return c(e);case 256:return o(e);case 384:return d(e);case 512:return i(e);default:throw new Error("Invald algorithm: keccak"+a)}},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),u("sha256").update(e).digest()},t.ripemd160=function(e,a){e=t.toBuffer(e);var r=u("rmd160").update(e).digest();return!0===a?t.setLength(r,32):r},t.rlphash=function(e){return t.keccak(b.encode(e))},t.isValidPrivate=function(e){return f.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?f.publicKeyVerify(h.concat([h.from([4]),e])):!!t&&f.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,a){return e=t.toBuffer(e),a&&64!==e.length&&(e=f.publicKeyConvert(e,!1).slice(1)),s(64===e.length),t.keccak(e).slice(-20)};var p=t.privateToPublic=function(e){return e=t.toBuffer(e),f.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=f.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var a=f.sign(e,t),r={};return r.r=a.signature.slice(0,32),r.s=a.signature.slice(32,64),r.v=a.recovery+27,r},t.hashPersonalMessage=function(e){var a=t.toBuffer("\x19Ethereum Signed Message:\n"+e.length.toString());return t.keccak(h.concat([a,e]))},t.ecrecover=function(e,a,r,n){var c=h.concat([t.setLength(r,32),t.setLength(n,32)],64),d=a-27;if(0!==d&&1!==d)throw new Error("Invalid signature v value");var o=f.recover(e,c,d);return f.publicKeyConvert(o,!1).slice(1)},t.toRpcSig=function(e,a,r){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(h.concat([t.setLengthLeft(a,32),t.setLengthLeft(r,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var a=e[64];return a<27&&(a+=27),{v:a,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(p(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var a=t.keccak(e).toString("hex"),r="0x",n=0;n=8?r+=e[n].toUpperCase():r+=e[n];return r},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,a){return e=t.toBuffer(e),a=(a=new l(a)).isZero()?null:h.from(a.toArray()),t.rlphash([e,a]).slice(-20)},t.isPrecompiled=function(e){var a=t.unpad(e);return 1===a.length&&a[0]>=1&&a[0]<=8},t.addHexPrefix=function(e){return"string"!==typeof e||t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,a,r){var n=new l("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),c=new l("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===a.length&&((27===e||28===e)&&(t=new l(t),a=new l(a),!(t.isZero()||t.gt(c)||a.isZero()||a.gt(c))&&(!1!==r||1!==new l(a).cmp(n))))},t.baToJSON=function(e){if(h.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var a=[],r=0;r=n.length,"The field "+a.name+" must not have more "+a.length+" bytes")):a.allowZero&&0===n.length||!a.length||s(a.length===n.length,"The field "+a.name+" must have byte length of "+a.length),e.raw[r]=n}e._fields.push(a.name),Object.defineProperty(e,a.name,{enumerable:!0,configurable:!0,get:n,set:c}),a.default&&(e[a.name]=a.default),a.alias&&Object.defineProperty(e,a.alias,{enumerable:!1,configurable:!0,set:c,get:n})})),n)if("string"===typeof n&&(n=h.from(t.stripHexPrefix(n),"hex")),h.isBuffer(n)&&(n=b.decode(n)),Array.isArray(n)){if(n.length>e._fields.length)throw new Error("wrong number of fields in data");n.forEach((function(a,r){e[e._fields[r]]=t.toBuffer(a)}))}else{if("object"!==("undefined"===typeof n?"undefined":r(n)))throw new Error("invalid data");var c=Object.keys(n);a.forEach((function(t){-1!==c.indexOf(t.name)&&(e[t.name]=n[t.name]),-1!==c.indexOf(t.alias)&&(e[t.alias]=n[t.alias])}))}}},57764:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=a(59490),c=a(38899),d=a(10760),o=function(e){return 32===e.length&&n.privateKeyVerify(Uint8Array.from(e))};e.exports={privateKeyVerify:o,privateKeyExport:function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var a=c.privateKeyExport(e,t);return d.privateKeyExport(e,a,t)},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(n.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return r.from(c.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,t){return r.from(n.privateKeyTweakAdd(Uint8Array.from(e),t))},privateKeyTweakMul:function(e,t){return r.from(n.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t)))},publicKeyCreate:function(e,t){return r.from(n.publicKeyCreate(Uint8Array.from(e),t))},publicKeyConvert:function(e,t){return r.from(n.publicKeyConvert(Uint8Array.from(e),t))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&n.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,t,a){return r.from(n.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(t),a))},publicKeyTweakMul:function(e,t,a){return r.from(n.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(t),a))},publicKeyCombine:function(e,t){var a=[];return e.forEach((function(e){a.push(Uint8Array.from(e))})),r.from(n.publicKeyCombine(a,t))},signatureNormalize:function(e){return r.from(n.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return r.from(n.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return r.from(n.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=d.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return c.signatureImport(t)},sign:function(e,t,a){if(null===a)throw new TypeError("options should be an Object");var c=void 0;if(a){if(c={},null===a.data)throw new TypeError("options.data should be a Buffer");if(a.data){if(32!==a.data.length)throw new RangeError("options.data length is invalid");c.data=new Uint8Array(a.data)}if(null===a.noncefn)throw new TypeError("options.noncefn should be a Function");a.noncefn&&(c.noncefn=function(e,t,n,c,d){var o=null!=n?r.from(n):null,i=null!=c?r.from(c):null,f=r.from("");return a.noncefn&&(f=a.noncefn(r.from(e),r.from(t),o,i,d)),Uint8Array.from(f)})}var d=n.ecdsaSign(Uint8Array.from(e),Uint8Array.from(t),c);return{signature:r.from(d.signature),recovery:d.recid}},verify:function(e,t,a){return n.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),a)},recover:function(e,t,a,c){return r.from(n.ecdsaRecover(Uint8Array.from(t),a,Uint8Array.from(e),c))},ecdh:function(e,t){return r.from(n.ecdh(Uint8Array.from(e),Uint8Array.from(t),{}))},ecdhUnsafe:function(e,t,a){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==t.length)throw new RangeError("private key length is invalid");return r.from(c.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(t),a))}}},10760:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=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]),c=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]);t.privateKeyExport=function(e,t,a){var d=r.from(a?n:c);return e.copy(d,a?8:9),t.copy(d,a?181:214),d},t.privateKeyImport=function(e){var t=e.length,a=0;if(t2)return null;if(t<(a+=1)+r)return null;var n=e[a+r-1]|(r>1?e[a+r-2]<<8:0);return t<(a+=r)+n||t32||tn)return null;if(2!==e[c++])return null;var o=e[c++];if(128&o){if(c+(d=o-128)>n)return null;for(;d>0&&0===e[c];c+=1,d-=1);for(o=0;d>0;c+=1,d-=1)o=(o<<8)+e[c]}if(o>n-c)return null;var i=c;if(c+=o,2!==e[c++])return null;var f=e[c++];if(128&f){if(c+(d=f-128)>n)return null;for(;d>0&&0===e[c];c+=1,d-=1);for(f=0;d>0;c+=1,d-=1)f=(f<<8)+e[c]}if(f>n-c)return null;var s=c;for(c+=f;o>0&&0===e[i];o-=1,i+=1);if(o>32)return null;var b=e.slice(i,i+o);for(b.copy(t,32-b.length);f>0&&0===e[s];f-=1,s+=1);if(f>32)return null;var l=e.slice(s,s+f);return l.copy(a,32-l.length),{r:t,s:a}}},38899:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=a(6373),c=new(0,a(14613).ec)("secp256k1"),d=c.curve;t.privateKeyExport=function(e,t){var a=new n(e);if(a.ucmp(d.n)>=0)throw new Error("couldn't export to DER format");var r=c.g.mul(a);return o(r.getX(),r.getY(),t)},t.privateKeyModInverse=function(e){var t=new n(e);if(t.ucmp(d.n)>=0||t.isZero())throw new Error("private key range is invalid");return t.invm(d.n).toArrayLike(r,"be",32)},t.signatureImport=function(e){var t=new n(e.r);t.ucmp(d.n)>=0&&(t=new n(0));var a=new n(e.s);return a.ucmp(d.n)>=0&&(a=new n(0)),r.concat([t.toArrayLike(r,"be",32),a.toArrayLike(r,"be",32)])},t.ecdhUnsafe=function(e,t,a){var r=c.keyFromPublic(e),i=new n(t);if(i.ucmp(d.n)>=0||i.isZero())throw new Error("scalar was invalid (zero or overflow)");var f=r.pub.mul(i);return o(f.getX(),f.getY(),a)};var o=function(e,t,a){var n=void 0;return a?((n=r.alloc(33))[0]=t.isOdd()?3:2,e.toArrayLike(r,"be",32).copy(n,1)):((n=r.alloc(65))[0]=4,e.toArrayLike(r,"be",32).copy(n,1),t.toArrayLike(r,"be",32).copy(n,33)),n}},14613:(e,t,a)=>{"use strict";var r=t;r.version=a(43951).rE,r.utils=a(94191),r.rand=a(88462),r.curve=a(83418),r.curves=a(62548),r.ec=a(64571),r.eddsa=a(38358)},24153:(e,t,a)=>{"use strict";var r=a(6373),n=a(94191),c=n.getNAF,d=n.getJSF,o=n.assert;function i(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.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=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.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;var a=this.n&&this.p.div(this.n);!a||a.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=i,i.prototype.point=function(){throw new Error("Not implemented")},i.prototype.validate=function(){throw new Error("Not implemented")},i.prototype._fixedNafMul=function(e,t){o(e.precomputed);var a=e._getDoubles(),r=c(t,1,this._bitLength),n=(1<=d;s--)i=(i<<1)+r[s];f.push(i)}for(var b=this.jpoint(null,null,null),l=this.jpoint(null,null,null),u=n;u>0;u--){for(d=0;d=0;f--){for(var s=0;f>=0&&0===d[f];f--)s++;if(f>=0&&s++,i=i.dblp(s),f<0)break;var b=d[f];o(0!==b),i="affine"===e.type?b>0?i.mixedAdd(n[b-1>>1]):i.mixedAdd(n[-b-1>>1].neg()):b>0?i.add(n[b-1>>1]):i.add(n[-b-1>>1].neg())}return"affine"===e.type?i.toP():i},i.prototype._wnafMulAdd=function(e,t,a,r,n){var o,i,f,s=this._wnafT1,b=this._wnafT2,l=this._wnafT3,u=0;for(o=0;o=1;o-=2){var p=o-1,x=o;if(1===s[p]&&1===s[x]){var m=[t[p],null,null,t[x]];0===t[p].y.cmp(t[x].y)?(m[1]=t[p].add(t[x]),m[2]=t[p].toJ().mixedAdd(t[x].neg())):0===t[p].y.cmp(t[x].y.redNeg())?(m[1]=t[p].toJ().mixedAdd(t[x]),m[2]=t[p].add(t[x].neg())):(m[1]=t[p].toJ().mixedAdd(t[x]),m[2]=t[p].toJ().mixedAdd(t[x].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=d(a[p],a[x]);for(u=Math.max(v[0].length,u),l[p]=new Array(u),l[x]=new Array(u),i=0;i=0;o--){for(var _=0;o>=0;){var A=!0;for(i=0;i=0&&_++,k=k.dblp(_),o<0)break;for(i=0;i0?f=b[i][E-1>>1]:E<0&&(f=b[i][-E-1>>1].neg()),k="affine"===f.type?k.mixedAdd(f):k.add(f))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var a=[this],r=this,n=0;n{"use strict";var r=a(94191),n=a(6373),c=a(56329),d=a(24153),o=r.assert;function i(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&-1===(0|e.a),this.extended=this.mOneA,d.call(this,"edwards",e),this.a=new n(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}function f(e,t,a,r,c){d.BasePoint.call(this,e,"projective"),null===t&&null===a&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(t,16),this.y=new n(a,16),this.z=r?new n(r,16):this.curve.one,this.t=c&&new n(c,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}c(i,d),e.exports=i,i.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},i.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},i.prototype.jpoint=function(e,t,a,r){return this.point(e,t,a,r)},i.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var a=e.redSqr(),r=this.c2.redSub(this.a.redMul(a)),c=this.one.redSub(this.c2.redMul(this.d).redMul(a)),d=r.redMul(c.redInvm()),o=d.redSqrt();if(0!==o.redSqr().redSub(d).cmp(this.zero))throw new Error("invalid point");var i=o.fromRed().isOdd();return(t&&!i||!t&&i)&&(o=o.redNeg()),this.point(e,o)},i.prototype.pointFromY=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var a=e.redSqr(),r=a.redSub(this.c2),c=a.redMul(this.d).redMul(this.c2).redSub(this.a),d=r.redMul(c.redInvm());if(0===d.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=d.redSqrt();if(0!==o.redSqr().redSub(d).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},i.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),a=e.y.redSqr(),r=t.redMul(this.a).redAdd(a),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(a)));return 0===r.cmp(n)},c(f,d.BasePoint),i.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},i.prototype.point=function(e,t,a,r){return new f(this,e,t,a,r)},f.fromJSON=function(e,t){return new f(e,t[0],t[1],t[2])},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),a=this.z.redSqr();a=a.redIAdd(a);var r=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),c=r.redAdd(t),d=c.redSub(a),o=r.redSub(t),i=n.redMul(d),f=c.redMul(o),s=n.redMul(o),b=d.redMul(c);return this.curve.point(i,f,b,s)},f.prototype._projDbl=function(){var e,t,a,r,n,c,d=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),i=this.y.redSqr();if(this.curve.twisted){var f=(r=this.curve._mulA(o)).redAdd(i);this.zOne?(e=d.redSub(o).redSub(i).redMul(f.redSub(this.curve.two)),t=f.redMul(r.redSub(i)),a=f.redSqr().redSub(f).redSub(f)):(n=this.z.redSqr(),c=f.redSub(n).redISub(n),e=d.redSub(o).redISub(i).redMul(c),t=f.redMul(r.redSub(i)),a=f.redMul(c))}else r=o.redAdd(i),n=this.curve._mulC(this.z).redSqr(),c=r.redSub(n).redSub(n),e=this.curve._mulC(d.redISub(r)).redMul(c),t=this.curve._mulC(r).redMul(o.redISub(i)),a=r.redMul(c);return this.curve.point(e,t,a)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),a=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),c=a.redSub(t),d=n.redSub(r),o=n.redAdd(r),i=a.redAdd(t),f=c.redMul(d),s=o.redMul(i),b=c.redMul(i),l=d.redMul(o);return this.curve.point(f,s,l,b)},f.prototype._projAdd=function(e){var t,a,r=this.z.redMul(e.z),n=r.redSqr(),c=this.x.redMul(e.x),d=this.y.redMul(e.y),o=this.curve.d.redMul(c).redMul(d),i=n.redSub(o),f=n.redAdd(o),s=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(c).redISub(d),b=r.redMul(i).redMul(s);return this.curve.twisted?(t=r.redMul(f).redMul(d.redSub(this.curve._mulA(c))),a=i.redMul(f)):(t=r.redMul(f).redMul(d.redSub(c)),a=this.curve._mulC(i).redMul(f)),this.curve.point(b,t,a)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,a){return this.curve._wnafMulAdd(1,[this,t],[e,a],2,!1)},f.prototype.jmulAdd=function(e,t,a){return this.curve._wnafMulAdd(1,[this,t],[e,a],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var a=e.clone(),r=this.curve.redN.redMul(this.z);;){if(a.iadd(this.curve.n),a.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},83418:(e,t,a)=>{"use strict";var r=t;r.base=a(24153),r.short=a(15224),r.mont=a(73310),r.edwards=a(422)},73310:(e,t,a)=>{"use strict";var r=a(6373),n=a(56329),c=a(24153),d=a(94191);function o(e){c.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,t,a){c.BasePoint.call(this,e,"projective"),null===t&&null===a?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(o,c),e.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,a=t.redSqr(),r=a.redMul(t).redAdd(a.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},n(i,c.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(d.toArray(e,t),1)},o.prototype.point=function(e,t){return new i(this,e,t)},o.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,t){return new i(e,t[0],t[1]||e.one)},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),a=e.redSub(t),r=e.redMul(t),n=a.redMul(t.redAdd(this.curve.a24.redMul(a)));return this.curve.point(r,n)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,t){var a=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=e.x.redAdd(e.z),c=e.x.redSub(e.z).redMul(a),d=n.redMul(r),o=t.z.redMul(c.redAdd(d).redSqr()),i=t.x.redMul(c.redISub(d).redSqr());return this.curve.point(o,i)},i.prototype.mul=function(e){for(var t=e.clone(),a=this,r=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var c=n.length-1;c>=0;c--)0===n[c]?(a=a.diffAdd(r,this),r=r.dbl()):(r=a.diffAdd(r,this),a=a.dbl());return r},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},15224:(e,t,a)=>{"use strict";var r=a(94191),n=a(6373),c=a(56329),d=a(24153),o=r.assert;function i(e){d.call(this,"short",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,a,r){d.BasePoint.call(this,e,"affine"),null===t&&null===a?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(t,16),this.y=new n(a,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function s(e,t,a,r){d.BasePoint.call(this,e,"jacobian"),null===t&&null===a&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(t,16),this.y=new n(a,16),this.z=new n(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}c(i,d),e.exports=i,i.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,a;if(e.beta)t=new n(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)a=new n(e.lambda,16);else{var c=this._getEndoRoots(this.n);0===this.g.mul(c[0]).x.cmp(this.g.x.redMul(t))?a=c[0]:(a=c[1],o(0===this.g.mul(a).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:a,basis:e.basis?e.basis.map((function(e){return{a:new n(e.a,16),b:new n(e.b,16)}})):this._getEndoBasis(a)}}},i.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:n.mont(e),a=new n(2).toRed(t).redInvm(),r=a.redNeg(),c=new n(3).toRed(t).redNeg().redSqrt().redMul(a);return[r.redAdd(c).fromRed(),r.redSub(c).fromRed()]},i.prototype._getEndoBasis=function(e){for(var t,a,r,c,d,o,i,f,s,b=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,u=this.n.clone(),h=new n(1),p=new n(0),x=new n(0),m=new n(1),g=0;0!==l.cmpn(0);){var v=u.div(l);f=u.sub(v.mul(l)),s=x.sub(v.mul(h));var y=m.sub(v.mul(p));if(!r&&f.cmp(b)<0)t=i.neg(),a=h,r=f.neg(),c=s;else if(r&&2===++g)break;i=f,u=l,l=f,x=h,h=s,m=p,p=y}d=f.neg(),o=s;var w=r.sqr().add(c.sqr());return d.sqr().add(o.sqr()).cmp(w)>=0&&(d=t,o=a),r.negative&&(r=r.neg(),c=c.neg()),d.negative&&(d=d.neg(),o=o.neg()),[{a:r,b:c},{a:d,b:o}]},i.prototype._endoSplit=function(e){var t=this.endo.basis,a=t[0],r=t[1],n=r.b.mul(e).divRound(this.n),c=a.b.neg().mul(e).divRound(this.n),d=n.mul(a.a),o=c.mul(r.a),i=n.mul(a.b),f=c.mul(r.b);return{k1:e.sub(d).sub(o),k2:i.add(f).neg()}},i.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var a=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=a.redSqrt();if(0!==r.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=r.fromRed().isOdd();return(t&&!c||!t&&c)&&(r=r.redNeg()),this.point(e,r)},i.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,a=e.y,r=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===a.redSqr().redISub(n).cmpn(0)},i.prototype._endoWnafMulAdd=function(e,t,a){for(var r=this._endoWnafT1,n=this._endoWnafT2,c=0;c":""},f.prototype.isInfinity=function(){return this.inf},f.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);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var a=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,r)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,a=this.x.redSqr(),r=e.redInvm(),n=a.redAdd(a).redIAdd(a).redIAdd(t).redMul(r),c=n.redSqr().redISub(this.x.redAdd(this.x)),d=n.redMul(this.x.redSub(c)).redISub(this.y);return this.curve.point(c,d)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new n(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)},f.prototype.mulAdd=function(e,t,a){var r=[this,t],n=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},f.prototype.jmulAdd=function(e,t,a){var r=[this,t],n=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},f.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))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var a=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:a.naf&&{wnd:a.naf.wnd,points:a.naf.points.map(r)},doubles:a.doubles&&{step:a.doubles.step,points:a.doubles.points.map(r)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},c(s,d.BasePoint),i.prototype.jpoint=function(e,t,a){return new s(this,e,t,a)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),a=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(a,r)},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 t=e.z.redSqr(),a=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(a),c=this.y.redMul(t.redMul(e.z)),d=e.y.redMul(a.redMul(this.z)),o=r.redSub(n),i=c.redSub(d);if(0===o.cmpn(0))return 0!==i.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),s=f.redMul(o),b=r.redMul(f),l=i.redSqr().redIAdd(s).redISub(b).redISub(b),u=i.redMul(b.redISub(l)).redISub(c.redMul(s)),h=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(l,u,h)},s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),a=this.x,r=e.x.redMul(t),n=this.y,c=e.y.redMul(t).redMul(this.z),d=a.redSub(r),o=n.redSub(c);if(0===d.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var i=d.redSqr(),f=i.redMul(d),s=a.redMul(i),b=o.redSqr().redIAdd(f).redISub(s).redISub(s),l=o.redMul(s.redISub(b)).redISub(n.redMul(f)),u=this.z.redMul(d);return this.curve.jpoint(b,l,u)},s.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var a=this;for(t=0;t=0)return!1;if(a.redIAdd(n),0===this.x.cmp(a))return!0}},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},62548:(e,t,a)=>{"use strict";var r,n=t,c=a(91596),d=a(83418),o=a(94191).assert;function i(e){"short"===e.type?this.curve=new d.short(e):"edwards"===e.type?this.curve=new d.edwards(e):this.curve=new d.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var a=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:a}),a}})}n.PresetCurve=i,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:c.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:c.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:c.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:c.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:c.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:c.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:c.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=a(24775)}catch(s){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:c.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},64571:(e,t,a)=>{"use strict";var r=a(6373),n=a(31172),c=a(94191),d=a(62548),o=a(88462),i=c.assert,f=a(63396),s=a(19093);function b(e){if(!(this instanceof b))return new b(e);"string"===typeof e&&(i(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}e.exports=b,b.prototype.keyPair=function(e){return new f(this,e)},b.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},b.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},b.prototype.genKeyPair=function(e){e||(e={});for(var t=new n({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),c=this.n.sub(new r(2));;){var d=new r(t.generate(a));if(!(d.cmp(c)>0))return d.iaddn(1),this.keyFromPrivate(d)}},b.prototype._truncateToN=function(e,t){var a=8*e.byteLength()-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},b.prototype.sign=function(e,t,a,c){"object"===typeof a&&(c=a,a=null),c||(c={}),t=this.keyFromPrivate(t,a),e=this._truncateToN(new r(e,16));for(var d=this.n.byteLength(),o=t.getPrivate().toArray("be",d),i=e.toArray("be",d),f=new n({hash:this.hash,entropy:o,nonce:i,pers:c.pers,persEnc:c.persEnc||"utf8"}),b=this.n.sub(new r(1)),l=0;;l++){var u=c.k?c.k(l):new r(f.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(b)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var p=h.getX(),x=p.umod(this.n);if(0!==x.cmpn(0)){var m=u.invm(this.n).mul(x.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(h.getY().isOdd()?1:0)|(0!==p.cmp(x)?2:0);return c.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new s({r:x,s:m,recoveryParam:g})}}}}}},b.prototype.verify=function(e,t,a,n){e=this._truncateToN(new r(e,16)),a=this.keyFromPublic(a,n);var c=(t=new s(t,"hex")).r,d=t.s;if(c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;if(d.cmpn(1)<0||d.cmp(this.n)>=0)return!1;var o,i=d.invm(this.n),f=i.mul(e).umod(this.n),b=i.mul(c).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(f,a.getPublic(),b)).isInfinity()&&o.eqXToP(c):!(o=this.g.mulAdd(f,a.getPublic(),b)).isInfinity()&&0===o.getX().umod(this.n).cmp(c)},b.prototype.recoverPubKey=function(e,t,a,n){i((3&a)===a,"The recovery param is more than two bits"),t=new s(t,n);var c=this.n,d=new r(e),o=t.r,f=t.s,b=1&a,l=a>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");o=l?this.curve.pointFromX(o.add(this.curve.n),b):this.curve.pointFromX(o,b);var u=t.r.invm(c),h=c.sub(d).mul(u).umod(c),p=f.mul(u).umod(c);return this.g.mulAdd(h,o,p)},b.prototype.getKeyRecoveryParam=function(e,t,a,r){if(null!==(t=new s(t,r)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var c;try{c=this.recoverPubKey(e,t,n)}catch(e){continue}if(c.eq(a))return n}throw new Error("Unable to find valid recovery factor")}},63396:(e,t,a)=>{"use strict";var r=a(6373),n=a(94191).assert;function c(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=c,c.fromPublic=function(e,t,a){return t instanceof c?t:new c(e,{pub:t,pubEnc:a})},c.fromPrivate=function(e,t,a){return t instanceof c?t:new c(e,{priv:t,privEnc:a})},c.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"}},c.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},c.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},c.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},c.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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,t)},c.prototype.derive=function(e){return e.validate()||n(e.validate(),"public point not validated"),e.mul(this.priv).getX()},c.prototype.sign=function(e,t,a){return this.ec.sign(e,this,t,a)},c.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},c.prototype.inspect=function(){return""}},19093:(e,t,a)=>{"use strict";var r=a(6373),n=a(94191),c=n.assert;function d(e,t){if(e instanceof d)return e;this._importDER(e,t)||(c(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 i(e,t){var a=e[t.place++];if(!(128&a))return a;var r=15&a;if(0===r||r>4)return!1;for(var n=0,c=0,d=t.place;c>>=0;return!(n<=127)&&(t.place=d,n)}function f(e){for(var t=0,a=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|a);--a;)e.push(t>>>(a<<3)&255);e.push(t)}}e.exports=d,d.prototype._importDER=function(e,t){e=n.toArray(e,t);var a=new o;if(48!==e[a.place++])return!1;var c=i(e,a);if(!1===c)return!1;if(c+a.place!==e.length)return!1;if(2!==e[a.place++])return!1;var d=i(e,a);if(!1===d)return!1;var f=e.slice(a.place,d+a.place);if(a.place+=d,2!==e[a.place++])return!1;var s=i(e,a);if(!1===s)return!1;if(e.length!==s+a.place)return!1;var b=e.slice(a.place,s+a.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===b[0]){if(!(128&b[1]))return!1;b=b.slice(1)}return this.r=new r(f),this.s=new r(b),this.recoveryParam=null,!0},d.prototype.toDER=function(e){var t=this.r.toArray(),a=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&a[0]&&(a=[0].concat(a)),t=f(t),a=f(a);!a[0]&&!(128&a[1]);)a=a.slice(1);var r=[2];s(r,t.length),(r=r.concat(t)).push(2),s(r,a.length);var c=r.concat(a),d=[48];return s(d,c.length),d=d.concat(c),n.encode(d,e)}},38358:(e,t,a)=>{"use strict";var r=a(91596),n=a(62548),c=a(94191),d=c.assert,o=c.parseBytes,i=a(74641),f=a(15992);function s(e){if(d("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof s))return new s(e);e=n[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=s,s.prototype.sign=function(e,t){e=o(e);var a=this.keyFromSecret(t),r=this.hashInt(a.messagePrefix(),e),n=this.g.mul(r),c=this.encodePoint(n),d=this.hashInt(c,a.pubBytes(),e).mul(a.priv()),i=r.add(d).umod(this.curve.n);return this.makeSignature({R:n,S:i,Rencoded:c})},s.prototype.verify=function(e,t,a){e=o(e),t=this.makeSignature(t);var r=this.keyFromPublic(a),n=this.hashInt(t.Rencoded(),r.pubBytes(),e),c=this.g.mul(t.S());return t.R().add(r.pub().mul(n)).eq(c)},s.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var r=a(94191),n=r.assert,c=r.parseBytes,d=r.cachedProperty;function o(e,t){this.eddsa=e,this._secret=c(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=c(t.pub)}o.fromPublic=function(e,t){return t instanceof o?t:new o(e,{pub:t})},o.fromSecret=function(e,t){return t instanceof o?t:new o(e,{secret:t})},o.prototype.secret=function(){return this._secret},d(o,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),d(o,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),d(o,"privBytes",(function(){var e=this.eddsa,t=this.hash(),a=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[a]&=127,r[a]|=64,r})),d(o,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),d(o,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),d(o,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),o.prototype.sign=function(e){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},o.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},o.prototype.getSecret=function(e){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},o.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=o},15992:(e,t,a)=>{"use strict";var r=a(6373),n=a(94191),c=n.assert,d=n.cachedProperty,o=n.parseBytes;function i(e,t){this.eddsa=e,"object"!==typeof t&&(t=o(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),c(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}d(i,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),d(i,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),d(i,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),d(i,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),i.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},i.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},e.exports=i},24775:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},94191:(e,t,a)=>{"use strict";var r=t,n=a(6373),c=a(75482),d=a(49848);r.assert=c,r.toArray=d.toArray,r.zero2=d.zero2,r.toHex=d.toHex,r.encode=d.encode,r.getNAF=function(e,t,a){var r,n=new Array(Math.max(e.bitLength(),a)+1);for(r=0;r(c>>1)-1?(c>>1)-i:i,d.isubn(o)):o=0,n[r]=o,d.iushrn(1)}return n},r.getJSF=function(e,t){var a=[[],[]];e=e.clone(),t=t.clone();for(var r,n=0,c=0;e.cmpn(-n)>0||t.cmpn(-c)>0;){var d,o,i=e.andln(3)+n&3,f=t.andln(3)+c&3;3===i&&(i=-1),3===f&&(f=-1),d=0===(1&i)?0:3!==(r=e.andln(7)+n&7)&&5!==r||2!==f?i:-i,a[0].push(d),o=0===(1&f)?0:3!==(r=t.andln(7)+c&7)&&5!==r||2!==i?f:-f,a[1].push(o),2*n===d+1&&(n=1-n),2*c===o+1&&(c=1-c),e.iushrn(1),t.iushrn(1)}return a},r.cachedProperty=function(e,t,a){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=a.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new n(e,"hex","le")}},91596:(e,t,a)=>{var r=t;r.utils=a(15742),r.common=a(79354),r.sha=a(60073),r.ripemd=a(21732),r.hmac=a(45208),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},79354:(e,t,a)=>{"use strict";var r=a(15742),n=a(75482);function c(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=c,c.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var 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 n=0;n>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,c=8;c{"use strict";var r=a(15742),n=a(75482);function c(e,t,a){if(!(this instanceof c))return new c(e,t,a);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,a))}e.exports=c,c.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var r=a(15742),n=a(79354),c=r.rotl32,d=r.sum32,o=r.sum32_3,i=r.sum32_4,f=n.BlockHash;function s(){if(!(this instanceof s))return new s;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function b(e,t,a,r){return e<=15?t^a^r:e<=31?t&a|~t&r:e<=47?(t|~a)^r:e<=63?t&r|a&~r:t^(a|~r)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function u(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(s,f),t.ripemd160=s,s.blockSize=512,s.outSize=160,s.hmacStrength=192,s.padLength=64,s.prototype._update=function(e,t){for(var a=this.h[0],r=this.h[1],n=this.h[2],f=this.h[3],s=this.h[4],g=a,v=r,y=n,w=f,k=s,I=0;I<80;I++){var _=d(c(i(a,b(I,r,n,f),e[h[I]+t],l(I)),x[I]),s);a=s,s=f,f=c(n,10),n=r,r=_,_=d(c(i(g,b(79-I,v,y,w),e[p[I]+t],u(I)),m[I]),k),g=k,k=w,w=c(y,10),y=v,v=_}_=o(this.h[1],n,w),this.h[1]=o(this.h[2],f,k),this.h[2]=o(this.h[3],s,g),this.h[3]=o(this.h[4],a,v),this.h[4]=o(this.h[0],r,y),this.h[0]=_},s.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],x=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},60073:(e,t,a)=>{"use strict";t.sha1=a(56041),t.sha224=a(52230),t.sha256=a(22459),t.sha384=a(61707),t.sha512=a(62874)},56041:(e,t,a)=>{"use strict";var r=a(15742),n=a(79354),c=a(61581),d=r.rotl32,o=r.sum32,i=r.sum32_5,f=c.ft_1,s=n.BlockHash,b=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(l,s),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var a=this.W,r=0;r<16;r++)a[r]=e[t+r];for(;r{"use strict";var r=a(15742),n=a(22459);function c(){if(!(this instanceof c))return new c;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(c,n),e.exports=c,c.blockSize=512,c.outSize=224,c.hmacStrength=192,c.padLength=64,c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},22459:(e,t,a)=>{"use strict";var r=a(15742),n=a(79354),c=a(61581),d=a(75482),o=r.sum32,i=r.sum32_4,f=r.sum32_5,s=c.ch32,b=c.maj32,l=c.s0_256,u=c.s1_256,h=c.g0_256,p=c.g1_256,x=n.BlockHash,m=[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 g(){if(!(this instanceof g))return new g;x.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}r.inherits(g,x),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var a=this.W,r=0;r<16;r++)a[r]=e[t+r];for(;r{"use strict";var r=a(15742),n=a(62874);function c(){if(!(this instanceof c))return new c;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(c,n),e.exports=c,c.blockSize=1024,c.outSize=384,c.hmacStrength=192,c.padLength=128,c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},62874:(e,t,a)=>{"use strict";var r=a(15742),n=a(79354),c=a(75482),d=r.rotr64_hi,o=r.rotr64_lo,i=r.shr64_hi,f=r.shr64_lo,s=r.sum64,b=r.sum64_hi,l=r.sum64_lo,u=r.sum64_4_hi,h=r.sum64_4_lo,p=r.sum64_5_hi,x=r.sum64_5_lo,m=n.BlockHash,g=[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 v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function y(e,t,a,r,n){var c=e&a^~e&n;return c<0&&(c+=4294967296),c}function w(e,t,a,r,n,c){var d=t&r^~t&c;return d<0&&(d+=4294967296),d}function k(e,t,a,r,n){var c=e&a^e&n^a&n;return c<0&&(c+=4294967296),c}function I(e,t,a,r,n,c){var d=t&r^t&c^r&c;return d<0&&(d+=4294967296),d}function _(e,t){var a=d(e,t,28)^d(t,e,2)^d(t,e,7);return a<0&&(a+=4294967296),a}function A(e,t){var a=o(e,t,28)^o(t,e,2)^o(t,e,7);return a<0&&(a+=4294967296),a}function E(e,t){var a=d(e,t,14)^d(e,t,18)^d(t,e,9);return a<0&&(a+=4294967296),a}function S(e,t){var a=o(e,t,14)^o(e,t,18)^o(t,e,9);return a<0&&(a+=4294967296),a}function N(e,t){var a=d(e,t,1)^d(e,t,8)^i(e,t,7);return a<0&&(a+=4294967296),a}function M(e,t){var a=o(e,t,1)^o(e,t,8)^f(e,t,7);return a<0&&(a+=4294967296),a}function H(e,t){var a=d(e,t,19)^d(t,e,29)^i(e,t,6);return a<0&&(a+=4294967296),a}function T(e,t){var a=o(e,t,19)^o(t,e,29)^f(e,t,6);return a<0&&(a+=4294967296),a}r.inherits(v,m),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var a=this.W,r=0;r<32;r++)a[r]=e[t+r];for(;r{"use strict";var r=a(15742).rotr32;function n(e,t,a){return e&t^~e&a}function c(e,t,a){return e&t^e&a^t&a}function d(e,t,a){return e^t^a}t.ft_1=function(e,t,a,r){return 0===e?n(t,a,r):1===e||3===e?d(t,a,r):2===e?c(t,a,r):void 0},t.ch32=n,t.maj32=c,t.p32=d,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},15742:(e,t,a)=>{"use strict";var r=a(75482),n=a(56329);function c(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function d(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function i(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}t.inherits=n,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var a=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),n=0;n>6|192,a[r++]=63&d|128):c(e,n)?(d=65536+((1023&d)<<10)+(1023&e.charCodeAt(++n)),a[r++]=d>>18|240,a[r++]=d>>12&63|128,a[r++]=d>>6&63|128,a[r++]=63&d|128):(a[r++]=d>>12|224,a[r++]=d>>6&63|128,a[r++]=63&d|128)}else for(n=0;n>>0}return d},t.split32=function(e,t){for(var a=new Array(4*e.length),r=0,n=0;r>>24,a[n+1]=c>>>16&255,a[n+2]=c>>>8&255,a[n+3]=255&c):(a[n+3]=c>>>24,a[n+2]=c>>>16&255,a[n+1]=c>>>8&255,a[n]=255&c)}return a},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,a){return e+t+a>>>0},t.sum32_4=function(e,t,a,r){return e+t+a+r>>>0},t.sum32_5=function(e,t,a,r,n){return e+t+a+r+n>>>0},t.sum64=function(e,t,a,r){var n=e[t],c=r+e[t+1]>>>0,d=(c>>0,e[t+1]=c},t.sum64_hi=function(e,t,a,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,a,r){return t+r>>>0},t.sum64_4_hi=function(e,t,a,r,n,c,d,o){var i=0,f=t;return i+=(f=f+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,a,r,n,c,d,o){return t+r+c+o>>>0},t.sum64_5_hi=function(e,t,a,r,n,c,d,o,i,f){var s=0,b=t;return s+=(b=b+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,a,r,n,c,d,o,i,f){return t+r+c+o+f>>>0},t.rotr64_hi=function(e,t,a){return(t<<32-a|e>>>a)>>>0},t.rotr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0},t.shr64_hi=function(e,t,a){return e>>>a},t.shr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0}},21215:function(e,t,a){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}function c(e,t,a){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(a=t,t=10),this._init(e||0,t||10,a||"be"))}var d;"object"===typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{d="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:a(91848).Buffer}catch(N){}function o(e,t){var a=e.charCodeAt(t);return a>=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:void r(!1,"Invalid character in "+e)}function i(e,t,a){var r=o(e,a);return a-1>=t&&(r|=o(e,a-1)<<4),r}function f(e,t,a,n){for(var c=0,d=0,o=Math.min(e.length,a),i=t;i=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&d0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,t,a){if("number"===typeof e)return this._initNumber(e,t,a);if("object"===typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)d=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[c]|=d<>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);else if("le"===a)for(n=0,c=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);return this._strip()},c.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)n=i(e,t,r)<=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;this._strip()},c.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var c=e.length-a,d=c%r,o=Math.min(c,c-d)+a,i=0,s=a;s1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch(N){c.prototype.inspect=b}else c.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];c.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var n=0,c=0,d=0;d>>24-n&16777215,(n+=2)>=26&&(n-=26,d--),a=0!==c||d!==this.length-1?l[6-i.length]+i+a:i+a}for(0!==c&&(a=c.toString(16)+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var f=u[e],s=h[e];a="";var b=this.clone();for(b.negative=0;!b.isZero();){var p=b.modrn(s).toString(e);a=(b=b.idivn(s)).isZero()?p+a:l[f-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}r(!1,"Base should be between 2 and 36")},c.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},c.prototype.toJSON=function(){return this.toString(16,2)},d&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(d,e,t)}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,a){a.negative=t.negative^e.negative;var r=e.length+t.length|0;a.length=r,r=r-1|0;var n=0|e.words[0],c=0|t.words[0],d=n*c,o=67108863&d,i=d/67108864|0;a.words[0]=o;for(var f=1;f>>26,b=67108863&i,l=Math.min(f,t.length-1),u=Math.max(0,f-e.length+1);u<=l;u++){var h=f-u|0;s+=(d=(n=0|e.words[h])*(c=0|t.words[u])+b)/67108864|0,b=67108863&d}a.words[f]=0|b,i=0|s}return 0!==i?a.words[f]=0|i:a.length--,a._strip()}c.prototype.toArrayLike=function(e,t,a){this._strip();var n=this.byteLength(),c=a||Math.max(1,n);r(n<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0");var d=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](d,n),d},c.prototype._toArrayLikeLE=function(e,t){for(var a=0,r=0,n=0,c=0;n>8&255),a>16&255),6===c?(a>24&255),r=0,c=0):(r=d>>>24,c+=2)}if(a=0&&(e[a--]=d>>8&255),a>=0&&(e[a--]=d>>16&255),6===c?(a>=0&&(e[a--]=d>>24&255),r=0,c=0):(r=d>>>24,c+=2)}if(a>=0)for(e[a--]=r;a>=0;)e[a--]=0},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,a=0;return t>=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0===(8191&t)&&(a+=13,t>>>=13),0===(127&t)&&(a+=7,t>>>=7),0===(15&t)&&(a+=4,t>>>=4),0===(3&t)&&(a+=2,t>>>=2),0===(1&t)&&a++,a},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-a),this._strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var a=e/26|0,n=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,r=e):(a=e,r=this);for(var n=0,c=0;c>>26;for(;0!==n&&c>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ce.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,r=e):(a=e,r=this);for(var c=0,d=0;d>26,this.words[d]=67108863&t;for(;0!==c&&d>26,this.words[d]=67108863&t;if(0===c&&d>>13,u=0|d[1],h=8191&u,p=u>>>13,x=0|d[2],m=8191&x,g=x>>>13,v=0|d[3],y=8191&v,w=v>>>13,k=0|d[4],I=8191&k,_=k>>>13,A=0|d[5],E=8191&A,S=A>>>13,N=0|d[6],M=8191&N,H=N>>>13,T=0|d[7],P=8191&T,R=T>>>13,C=0|d[8],O=8191&C,D=C>>>13,B=0|d[9],L=8191&B,j=B>>>13,U=0|o[0],F=8191&U,z=U>>>13,q=0|o[1],W=8191&q,V=q>>>13,K=0|o[2],G=8191&K,Y=K>>>13,J=0|o[3],X=8191&J,Z=J>>>13,Q=0|o[4],$=8191&Q,ee=Q>>>13,te=0|o[5],ae=8191&te,re=te>>>13,ne=0|o[6],ce=8191&ne,de=ne>>>13,oe=0|o[7],ie=8191&oe,fe=oe>>>13,se=0|o[8],be=8191&se,le=se>>>13,ue=0|o[9],he=8191&ue,pe=ue>>>13;a.negative=e.negative^t.negative,a.length=19;var xe=(f+(r=Math.imul(b,F))|0)+((8191&(n=(n=Math.imul(b,z))+Math.imul(l,F)|0))<<13)|0;f=((c=Math.imul(l,z))+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(h,F),n=(n=Math.imul(h,z))+Math.imul(p,F)|0,c=Math.imul(p,z);var me=(f+(r=r+Math.imul(b,W)|0)|0)+((8191&(n=(n=n+Math.imul(b,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((c=c+Math.imul(l,V)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),n=(n=Math.imul(m,z))+Math.imul(g,F)|0,c=Math.imul(g,z),r=r+Math.imul(h,W)|0,n=(n=n+Math.imul(h,V)|0)+Math.imul(p,W)|0,c=c+Math.imul(p,V)|0;var ge=(f+(r=r+Math.imul(b,G)|0)|0)+((8191&(n=(n=n+Math.imul(b,Y)|0)+Math.imul(l,G)|0))<<13)|0;f=((c=c+Math.imul(l,Y)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(w,F)|0,c=Math.imul(w,z),r=r+Math.imul(m,W)|0,n=(n=n+Math.imul(m,V)|0)+Math.imul(g,W)|0,c=c+Math.imul(g,V)|0,r=r+Math.imul(h,G)|0,n=(n=n+Math.imul(h,Y)|0)+Math.imul(p,G)|0,c=c+Math.imul(p,Y)|0;var ve=(f+(r=r+Math.imul(b,X)|0)|0)+((8191&(n=(n=n+Math.imul(b,Z)|0)+Math.imul(l,X)|0))<<13)|0;f=((c=c+Math.imul(l,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(_,F)|0,c=Math.imul(_,z),r=r+Math.imul(y,W)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(w,W)|0,c=c+Math.imul(w,V)|0,r=r+Math.imul(m,G)|0,n=(n=n+Math.imul(m,Y)|0)+Math.imul(g,G)|0,c=c+Math.imul(g,Y)|0,r=r+Math.imul(h,X)|0,n=(n=n+Math.imul(h,Z)|0)+Math.imul(p,X)|0,c=c+Math.imul(p,Z)|0;var ye=(f+(r=r+Math.imul(b,$)|0)|0)+((8191&(n=(n=n+Math.imul(b,ee)|0)+Math.imul(l,$)|0))<<13)|0;f=((c=c+Math.imul(l,ee)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),n=(n=Math.imul(E,z))+Math.imul(S,F)|0,c=Math.imul(S,z),r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(_,W)|0,c=c+Math.imul(_,V)|0,r=r+Math.imul(y,G)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(w,G)|0,c=c+Math.imul(w,Y)|0,r=r+Math.imul(m,X)|0,n=(n=n+Math.imul(m,Z)|0)+Math.imul(g,X)|0,c=c+Math.imul(g,Z)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(p,$)|0,c=c+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(b,ae)|0)|0)+((8191&(n=(n=n+Math.imul(b,re)|0)+Math.imul(l,ae)|0))<<13)|0;f=((c=c+Math.imul(l,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,F),n=(n=Math.imul(M,z))+Math.imul(H,F)|0,c=Math.imul(H,z),r=r+Math.imul(E,W)|0,n=(n=n+Math.imul(E,V)|0)+Math.imul(S,W)|0,c=c+Math.imul(S,V)|0,r=r+Math.imul(I,G)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(_,G)|0,c=c+Math.imul(_,Y)|0,r=r+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(w,X)|0,c=c+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,n=(n=n+Math.imul(m,ee)|0)+Math.imul(g,$)|0,c=c+Math.imul(g,ee)|0,r=r+Math.imul(h,ae)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(p,ae)|0,c=c+Math.imul(p,re)|0;var ke=(f+(r=r+Math.imul(b,ce)|0)|0)+((8191&(n=(n=n+Math.imul(b,de)|0)+Math.imul(l,ce)|0))<<13)|0;f=((c=c+Math.imul(l,de)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(R,F)|0,c=Math.imul(R,z),r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(H,W)|0,c=c+Math.imul(H,V)|0,r=r+Math.imul(E,G)|0,n=(n=n+Math.imul(E,Y)|0)+Math.imul(S,G)|0,c=c+Math.imul(S,Y)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(_,X)|0,c=c+Math.imul(_,Z)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0,r=r+Math.imul(m,ae)|0,n=(n=n+Math.imul(m,re)|0)+Math.imul(g,ae)|0,c=c+Math.imul(g,re)|0,r=r+Math.imul(h,ce)|0,n=(n=n+Math.imul(h,de)|0)+Math.imul(p,ce)|0,c=c+Math.imul(p,de)|0;var Ie=(f+(r=r+Math.imul(b,ie)|0)|0)+((8191&(n=(n=n+Math.imul(b,fe)|0)+Math.imul(l,ie)|0))<<13)|0;f=((c=c+Math.imul(l,fe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(O,F),n=(n=Math.imul(O,z))+Math.imul(D,F)|0,c=Math.imul(D,z),r=r+Math.imul(P,W)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(R,W)|0,c=c+Math.imul(R,V)|0,r=r+Math.imul(M,G)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(H,G)|0,c=c+Math.imul(H,Y)|0,r=r+Math.imul(E,X)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(S,X)|0,c=c+Math.imul(S,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(y,ae)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(w,ae)|0,c=c+Math.imul(w,re)|0,r=r+Math.imul(m,ce)|0,n=(n=n+Math.imul(m,de)|0)+Math.imul(g,ce)|0,c=c+Math.imul(g,de)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,fe)|0)+Math.imul(p,ie)|0,c=c+Math.imul(p,fe)|0;var _e=(f+(r=r+Math.imul(b,be)|0)|0)+((8191&(n=(n=n+Math.imul(b,le)|0)+Math.imul(l,be)|0))<<13)|0;f=((c=c+Math.imul(l,le)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,F),n=(n=Math.imul(L,z))+Math.imul(j,F)|0,c=Math.imul(j,z),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,V)|0)+Math.imul(D,W)|0,c=c+Math.imul(D,V)|0,r=r+Math.imul(P,G)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(R,G)|0,c=c+Math.imul(R,Y)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(H,X)|0,c=c+Math.imul(H,Z)|0,r=r+Math.imul(E,$)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(S,$)|0,c=c+Math.imul(S,ee)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(_,ae)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(y,ce)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(w,ce)|0,c=c+Math.imul(w,de)|0,r=r+Math.imul(m,ie)|0,n=(n=n+Math.imul(m,fe)|0)+Math.imul(g,ie)|0,c=c+Math.imul(g,fe)|0,r=r+Math.imul(h,be)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(p,be)|0,c=c+Math.imul(p,le)|0;var Ae=(f+(r=r+Math.imul(b,he)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(l,he)|0))<<13)|0;f=((c=c+Math.imul(l,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,V))+Math.imul(j,W)|0,c=Math.imul(j,V),r=r+Math.imul(O,G)|0,n=(n=n+Math.imul(O,Y)|0)+Math.imul(D,G)|0,c=c+Math.imul(D,Y)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(R,X)|0,c=c+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(E,ae)|0,n=(n=n+Math.imul(E,re)|0)+Math.imul(S,ae)|0,c=c+Math.imul(S,re)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,de)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,fe)|0)+Math.imul(w,ie)|0,c=c+Math.imul(w,fe)|0,r=r+Math.imul(m,be)|0,n=(n=n+Math.imul(m,le)|0)+Math.imul(g,be)|0,c=c+Math.imul(g,le)|0;var Ee=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;f=((c=c+Math.imul(p,pe)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,G),n=(n=Math.imul(L,Y))+Math.imul(j,G)|0,c=Math.imul(j,Y),r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(D,X)|0,c=c+Math.imul(D,Z)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(R,$)|0,c=c+Math.imul(R,ee)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(H,ae)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(E,ce)|0,n=(n=n+Math.imul(E,de)|0)+Math.imul(S,ce)|0,c=c+Math.imul(S,de)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(y,be)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(w,be)|0,c=c+Math.imul(w,le)|0;var Se=(f+(r=r+Math.imul(m,he)|0)|0)+((8191&(n=(n=n+Math.imul(m,pe)|0)+Math.imul(g,he)|0))<<13)|0;f=((c=c+Math.imul(g,pe)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,Z))+Math.imul(j,X)|0,c=Math.imul(j,Z),r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,r=r+Math.imul(P,ae)|0,n=(n=n+Math.imul(P,re)|0)+Math.imul(R,ae)|0,c=c+Math.imul(R,re)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,de)|0,r=r+Math.imul(E,ie)|0,n=(n=n+Math.imul(E,fe)|0)+Math.imul(S,ie)|0,c=c+Math.imul(S,fe)|0,r=r+Math.imul(I,be)|0,n=(n=n+Math.imul(I,le)|0)+Math.imul(_,be)|0,c=c+Math.imul(_,le)|0;var Ne=(f+(r=r+Math.imul(y,he)|0)|0)+((8191&(n=(n=n+Math.imul(y,pe)|0)+Math.imul(w,he)|0))<<13)|0;f=((c=c+Math.imul(w,pe)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(j,$)|0,c=Math.imul(j,ee),r=r+Math.imul(O,ae)|0,n=(n=n+Math.imul(O,re)|0)+Math.imul(D,ae)|0,c=c+Math.imul(D,re)|0,r=r+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(R,ce)|0,c=c+Math.imul(R,de)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(E,be)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(S,be)|0,c=c+Math.imul(S,le)|0;var Me=(f+(r=r+Math.imul(I,he)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(_,he)|0))<<13)|0;f=((c=c+Math.imul(_,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,re))+Math.imul(j,ae)|0,c=Math.imul(j,re),r=r+Math.imul(O,ce)|0,n=(n=n+Math.imul(O,de)|0)+Math.imul(D,ce)|0,c=c+Math.imul(D,de)|0,r=r+Math.imul(P,ie)|0,n=(n=n+Math.imul(P,fe)|0)+Math.imul(R,ie)|0,c=c+Math.imul(R,fe)|0,r=r+Math.imul(M,be)|0,n=(n=n+Math.imul(M,le)|0)+Math.imul(H,be)|0,c=c+Math.imul(H,le)|0;var He=(f+(r=r+Math.imul(E,he)|0)|0)+((8191&(n=(n=n+Math.imul(E,pe)|0)+Math.imul(S,he)|0))<<13)|0;f=((c=c+Math.imul(S,pe)|0)+(n>>>13)|0)+(He>>>26)|0,He&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,de))+Math.imul(j,ce)|0,c=Math.imul(j,de),r=r+Math.imul(O,ie)|0,n=(n=n+Math.imul(O,fe)|0)+Math.imul(D,ie)|0,c=c+Math.imul(D,fe)|0,r=r+Math.imul(P,be)|0,n=(n=n+Math.imul(P,le)|0)+Math.imul(R,be)|0,c=c+Math.imul(R,le)|0;var Te=(f+(r=r+Math.imul(M,he)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(H,he)|0))<<13)|0;f=((c=c+Math.imul(H,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,fe))+Math.imul(j,ie)|0,c=Math.imul(j,fe),r=r+Math.imul(O,be)|0,n=(n=n+Math.imul(O,le)|0)+Math.imul(D,be)|0,c=c+Math.imul(D,le)|0;var Pe=(f+(r=r+Math.imul(P,he)|0)|0)+((8191&(n=(n=n+Math.imul(P,pe)|0)+Math.imul(R,he)|0))<<13)|0;f=((c=c+Math.imul(R,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,be),n=(n=Math.imul(L,le))+Math.imul(j,be)|0,c=Math.imul(j,le);var Re=(f+(r=r+Math.imul(O,he)|0)|0)+((8191&(n=(n=n+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;f=((c=c+Math.imul(D,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(f+(r=Math.imul(L,he))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(j,he)|0))<<13)|0;return f=((c=Math.imul(j,pe))+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i[0]=xe,i[1]=me,i[2]=ge,i[3]=ve,i[4]=ye,i[5]=we,i[6]=ke,i[7]=Ie,i[8]=_e,i[9]=Ae,i[10]=Ee,i[11]=Se,i[12]=Ne,i[13]=Me,i[14]=He,i[15]=Te,i[16]=Pe,i[17]=Re,i[18]=Ce,0!==f&&(i[19]=f,a.length++),a};function m(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var r=0,n=0,c=0;c>>26)|0)>>>26,d&=67108863}a.words[c]=o,r=d,d=n}return 0!==r?a.words[c]=r:a.length--,a._strip()}function g(e,t,a){return m(e,t,a)}function v(e,t){this.x=e,this.y=t}Math.imul||(x=p),c.prototype.mulTo=function(e,t){var a=this.length+e.length;return 10===this.length&&10===e.length?x(this,e,t):a<63?p(this,e,t):a<1024?m(this,e,t):g(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),a=c.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,a,r,n,c){for(var d=0;d>>=1)n++;return 1<>>=13,a[2*d+1]=8191&c,c>>>=13;for(d=2*t;d>=26,a+=c/67108864|0,a+=d>>>26,this.words[n]=67108863&d}return 0!==a&&(this.words[n]=a,this.length++),t?this.ineg():this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>n&1}return t}(e);if(0===t.length)return new c(1);for(var a=this,r=0;r=0);var t,a=e%26,n=(e-a)/26,c=67108863>>>26-a<<26-a;if(0!==a){var d=0;for(t=0;t>>26-a}d&&(this.words[t]=d,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var c=e%26,d=Math.min((e-c)/26,this.length),o=67108863^67108863>>>c<d)for(this.length-=d,f=0;f=0&&(0!==s||f>=n);f--){var b=0|this.words[f];this.words[f]=s<<26-c|b>>>c,s=b&o}return i&&0!==s&&(i.words[i.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(e,t,a){return r(0===this.negative),this.iushrn(e,t,a)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,a=(e-t)/26,n=1<=0);var t=e%26,a=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},c.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 t=0;t>26)-(i/67108864|0),this.words[n+a]=67108863&c}for(;n>26,this.words[n+a]=67108863&c;if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&c;return this.negative=1,this._strip()},c.prototype._wordDiv=function(e,t){var a=(this.length,e.length),r=this.clone(),n=e,d=0|n.words[n.length-1];0!==(a=26-this._countBits(d))&&(n=n.ushln(a),r.iushln(a),d=0|n.words[n.length-1]);var o,i=r.length-n.length;if("mod"!==t){(o=new c(null)).length=i+1,o.words=new Array(o.length);for(var f=0;f=0;b--){var l=67108864*(0|r.words[n.length+b])+(0|r.words[n.length+b-1]);for(l=Math.min(l/d|0,67108863),r._ishlnsubmul(n,l,b);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,b),r.isZero()||(r.negative^=1);o&&(o.words[b]=l)}return o&&o._strip(),r._strip(),"div"!==t&&0!==a&&r.iushrn(a),{div:o||null,mod:r}},c.prototype.divmod=function(e,t,a){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.iadd(e)),{div:n,mod:d}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.isub(e)),{div:o.div,mod:d}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,d,o},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),c=a.cmp(r);return c<0||1===n&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var a=(1<<26)%e,n=0,c=this.length-1;c>=0;c--)n=(a*n+(0|this.words[c]))%e;return t?-n:n},c.prototype.modn=function(e){return this.modrn(e)},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var a=0,n=this.length-1;n>=0;n--){var c=(0|this.words[n])+67108864*a;this.words[n]=c/e|0,a=c%e}return this._strip(),t?this.ineg():this},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new c(1),d=new c(0),o=new c(0),i=new c(1),f=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++f;for(var s=a.clone(),b=t.clone();!t.isZero();){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||d.isOdd())&&(n.iadd(s),d.isub(b)),n.iushrn(1),d.iushrn(1);for(var h=0,p=1;0===(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(s),i.isub(b)),o.iushrn(1),i.iushrn(1);t.cmp(a)>=0?(t.isub(a),n.isub(o),d.isub(i)):(a.isub(t),o.isub(n),i.isub(d))}return{a:o,b:i,gcd:a.iushln(f)}},c.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,d=new c(1),o=new c(0),i=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var f=0,s=1;0===(t.words[0]&s)&&f<26;++f,s<<=1);if(f>0)for(t.iushrn(f);f-- >0;)d.isOdd()&&d.iadd(i),d.iushrn(1);for(var b=0,l=1;0===(a.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(a.iushrn(b);b-- >0;)o.isOdd()&&o.iadd(i),o.iushrn(1);t.cmp(a)>=0?(t.isub(a),d.isub(o)):(a.isub(t),o.isub(d))}return(n=0===t.cmpn(1)?d:o).cmpn(0)<0&&n.iadd(e),n},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var r=0;t.isEven()&&a.isEven();r++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var n=t.cmp(a);if(n<0){var c=t;t=a,a=c}else if(0===n||0===a.cmpn(1))break;t.isub(a)}return a.iushln(r)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0===(1&this.words[0])},c.prototype.isOdd=function(){return 1===(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,a=(e-t)/26,n=1<>>26,o&=67108863,this.words[d]=o}return 0!==c&&(this.words[d]=c,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this._strip(),this.length>1)t=1;else{a&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;a--){var r=0|this.words[a],n=0|e.words[a];if(r!==n){rn&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new E(e)},c.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)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.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 w(e,t){this.name=e,this.p=new c(t,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function I(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},n(k,w),k.prototype.split=function(e,t){for(var a=4194303,r=Math.min(e.length,9),n=0;n>>22,c=d}c>>>=22,e.words[n-10]=c,0===c&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new I;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return y[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},E.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var a=this.m.add(new c(1)).iushrn(2);return this.pow(e,a)}for(var n=this.m.subn(1),d=0;!n.isZero()&&0===n.andln(1);)d++,n.iushrn(1);r(!n.isZero());var o=new c(1).toRed(this),i=o.redNeg(),f=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new c(2*s*s).toRed(this);0!==this.pow(s,f).cmp(i);)s.redIAdd(i);for(var b=this.pow(s,n),l=this.pow(e,n.addn(1).iushrn(1)),u=this.pow(e,n),h=d;0!==u.cmp(o);){for(var p=u,x=0;0!==p.cmp(o);x++)p=p.redSqr();r(x=0;r--){for(var f=t.words[r],s=i-1;s>=0;s--){var b=f>>s&1;n!==a[0]&&(n=this.sqr(n)),0!==b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(n=this.mul(n,a[d]),o=0,d=0)):o=0}i=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new S(e)},n(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),c=n;return n.cmp(this.m)>=0?c=n.isub(this.m):n.cmpn(0)<0&&(c=n.iadd(this.m)),c._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new c(0)._forceRed(this);var a=e.mul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),d=n;return n.cmp(this.m)>=0?d=n.isub(this.m):n.cmpn(0)<0&&(d=n.iadd(this.m)),d._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},82305:function(e,t,a){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}function c(e,t,a){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(a=t,t=10),this._init(e||0,t||10,a||"be"))}var d;"object"===typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{d="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:a(58954).Buffer}catch(N){}function o(e,t){var a=e.charCodeAt(t);return a>=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:void r(!1,"Invalid character in "+e)}function i(e,t,a){var r=o(e,a);return a-1>=t&&(r|=o(e,a-1)<<4),r}function f(e,t,a,n){for(var c=0,d=0,o=Math.min(e.length,a),i=t;i=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&d0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,t,a){if("number"===typeof e)return this._initNumber(e,t,a);if("object"===typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)d=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[c]|=d<>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);else if("le"===a)for(n=0,c=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);return this._strip()},c.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)n=i(e,t,r)<=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;this._strip()},c.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var c=e.length-a,d=c%r,o=Math.min(c,c-d)+a,i=0,s=a;s1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch(N){c.prototype.inspect=b}else c.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];c.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var n=0,c=0,d=0;d>>24-n&16777215,(n+=2)>=26&&(n-=26,d--),a=0!==c||d!==this.length-1?l[6-i.length]+i+a:i+a}for(0!==c&&(a=c.toString(16)+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var f=u[e],s=h[e];a="";var b=this.clone();for(b.negative=0;!b.isZero();){var p=b.modrn(s).toString(e);a=(b=b.idivn(s)).isZero()?p+a:l[f-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}r(!1,"Base should be between 2 and 36")},c.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},c.prototype.toJSON=function(){return this.toString(16,2)},d&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(d,e,t)}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,a){a.negative=t.negative^e.negative;var r=e.length+t.length|0;a.length=r,r=r-1|0;var n=0|e.words[0],c=0|t.words[0],d=n*c,o=67108863&d,i=d/67108864|0;a.words[0]=o;for(var f=1;f>>26,b=67108863&i,l=Math.min(f,t.length-1),u=Math.max(0,f-e.length+1);u<=l;u++){var h=f-u|0;s+=(d=(n=0|e.words[h])*(c=0|t.words[u])+b)/67108864|0,b=67108863&d}a.words[f]=0|b,i=0|s}return 0!==i?a.words[f]=0|i:a.length--,a._strip()}c.prototype.toArrayLike=function(e,t,a){this._strip();var n=this.byteLength(),c=a||Math.max(1,n);r(n<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0");var d=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](d,n),d},c.prototype._toArrayLikeLE=function(e,t){for(var a=0,r=0,n=0,c=0;n>8&255),a>16&255),6===c?(a>24&255),r=0,c=0):(r=d>>>24,c+=2)}if(a=0&&(e[a--]=d>>8&255),a>=0&&(e[a--]=d>>16&255),6===c?(a>=0&&(e[a--]=d>>24&255),r=0,c=0):(r=d>>>24,c+=2)}if(a>=0)for(e[a--]=r;a>=0;)e[a--]=0},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,a=0;return t>=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0===(8191&t)&&(a+=13,t>>>=13),0===(127&t)&&(a+=7,t>>>=7),0===(15&t)&&(a+=4,t>>>=4),0===(3&t)&&(a+=2,t>>>=2),0===(1&t)&&a++,a},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-a),this._strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var a=e/26|0,n=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,r=e):(a=e,r=this);for(var n=0,c=0;c>>26;for(;0!==n&&c>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ce.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,r=e):(a=e,r=this);for(var c=0,d=0;d>26,this.words[d]=67108863&t;for(;0!==c&&d>26,this.words[d]=67108863&t;if(0===c&&d>>13,u=0|d[1],h=8191&u,p=u>>>13,x=0|d[2],m=8191&x,g=x>>>13,v=0|d[3],y=8191&v,w=v>>>13,k=0|d[4],I=8191&k,_=k>>>13,A=0|d[5],E=8191&A,S=A>>>13,N=0|d[6],M=8191&N,H=N>>>13,T=0|d[7],P=8191&T,R=T>>>13,C=0|d[8],O=8191&C,D=C>>>13,B=0|d[9],L=8191&B,j=B>>>13,U=0|o[0],F=8191&U,z=U>>>13,q=0|o[1],W=8191&q,V=q>>>13,K=0|o[2],G=8191&K,Y=K>>>13,J=0|o[3],X=8191&J,Z=J>>>13,Q=0|o[4],$=8191&Q,ee=Q>>>13,te=0|o[5],ae=8191&te,re=te>>>13,ne=0|o[6],ce=8191&ne,de=ne>>>13,oe=0|o[7],ie=8191&oe,fe=oe>>>13,se=0|o[8],be=8191&se,le=se>>>13,ue=0|o[9],he=8191&ue,pe=ue>>>13;a.negative=e.negative^t.negative,a.length=19;var xe=(f+(r=Math.imul(b,F))|0)+((8191&(n=(n=Math.imul(b,z))+Math.imul(l,F)|0))<<13)|0;f=((c=Math.imul(l,z))+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(h,F),n=(n=Math.imul(h,z))+Math.imul(p,F)|0,c=Math.imul(p,z);var me=(f+(r=r+Math.imul(b,W)|0)|0)+((8191&(n=(n=n+Math.imul(b,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((c=c+Math.imul(l,V)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),n=(n=Math.imul(m,z))+Math.imul(g,F)|0,c=Math.imul(g,z),r=r+Math.imul(h,W)|0,n=(n=n+Math.imul(h,V)|0)+Math.imul(p,W)|0,c=c+Math.imul(p,V)|0;var ge=(f+(r=r+Math.imul(b,G)|0)|0)+((8191&(n=(n=n+Math.imul(b,Y)|0)+Math.imul(l,G)|0))<<13)|0;f=((c=c+Math.imul(l,Y)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(w,F)|0,c=Math.imul(w,z),r=r+Math.imul(m,W)|0,n=(n=n+Math.imul(m,V)|0)+Math.imul(g,W)|0,c=c+Math.imul(g,V)|0,r=r+Math.imul(h,G)|0,n=(n=n+Math.imul(h,Y)|0)+Math.imul(p,G)|0,c=c+Math.imul(p,Y)|0;var ve=(f+(r=r+Math.imul(b,X)|0)|0)+((8191&(n=(n=n+Math.imul(b,Z)|0)+Math.imul(l,X)|0))<<13)|0;f=((c=c+Math.imul(l,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(_,F)|0,c=Math.imul(_,z),r=r+Math.imul(y,W)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(w,W)|0,c=c+Math.imul(w,V)|0,r=r+Math.imul(m,G)|0,n=(n=n+Math.imul(m,Y)|0)+Math.imul(g,G)|0,c=c+Math.imul(g,Y)|0,r=r+Math.imul(h,X)|0,n=(n=n+Math.imul(h,Z)|0)+Math.imul(p,X)|0,c=c+Math.imul(p,Z)|0;var ye=(f+(r=r+Math.imul(b,$)|0)|0)+((8191&(n=(n=n+Math.imul(b,ee)|0)+Math.imul(l,$)|0))<<13)|0;f=((c=c+Math.imul(l,ee)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),n=(n=Math.imul(E,z))+Math.imul(S,F)|0,c=Math.imul(S,z),r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(_,W)|0,c=c+Math.imul(_,V)|0,r=r+Math.imul(y,G)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(w,G)|0,c=c+Math.imul(w,Y)|0,r=r+Math.imul(m,X)|0,n=(n=n+Math.imul(m,Z)|0)+Math.imul(g,X)|0,c=c+Math.imul(g,Z)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(p,$)|0,c=c+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(b,ae)|0)|0)+((8191&(n=(n=n+Math.imul(b,re)|0)+Math.imul(l,ae)|0))<<13)|0;f=((c=c+Math.imul(l,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,F),n=(n=Math.imul(M,z))+Math.imul(H,F)|0,c=Math.imul(H,z),r=r+Math.imul(E,W)|0,n=(n=n+Math.imul(E,V)|0)+Math.imul(S,W)|0,c=c+Math.imul(S,V)|0,r=r+Math.imul(I,G)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(_,G)|0,c=c+Math.imul(_,Y)|0,r=r+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(w,X)|0,c=c+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,n=(n=n+Math.imul(m,ee)|0)+Math.imul(g,$)|0,c=c+Math.imul(g,ee)|0,r=r+Math.imul(h,ae)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(p,ae)|0,c=c+Math.imul(p,re)|0;var ke=(f+(r=r+Math.imul(b,ce)|0)|0)+((8191&(n=(n=n+Math.imul(b,de)|0)+Math.imul(l,ce)|0))<<13)|0;f=((c=c+Math.imul(l,de)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(R,F)|0,c=Math.imul(R,z),r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(H,W)|0,c=c+Math.imul(H,V)|0,r=r+Math.imul(E,G)|0,n=(n=n+Math.imul(E,Y)|0)+Math.imul(S,G)|0,c=c+Math.imul(S,Y)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(_,X)|0,c=c+Math.imul(_,Z)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0,r=r+Math.imul(m,ae)|0,n=(n=n+Math.imul(m,re)|0)+Math.imul(g,ae)|0,c=c+Math.imul(g,re)|0,r=r+Math.imul(h,ce)|0,n=(n=n+Math.imul(h,de)|0)+Math.imul(p,ce)|0,c=c+Math.imul(p,de)|0;var Ie=(f+(r=r+Math.imul(b,ie)|0)|0)+((8191&(n=(n=n+Math.imul(b,fe)|0)+Math.imul(l,ie)|0))<<13)|0;f=((c=c+Math.imul(l,fe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(O,F),n=(n=Math.imul(O,z))+Math.imul(D,F)|0,c=Math.imul(D,z),r=r+Math.imul(P,W)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(R,W)|0,c=c+Math.imul(R,V)|0,r=r+Math.imul(M,G)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(H,G)|0,c=c+Math.imul(H,Y)|0,r=r+Math.imul(E,X)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(S,X)|0,c=c+Math.imul(S,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(y,ae)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(w,ae)|0,c=c+Math.imul(w,re)|0,r=r+Math.imul(m,ce)|0,n=(n=n+Math.imul(m,de)|0)+Math.imul(g,ce)|0,c=c+Math.imul(g,de)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,fe)|0)+Math.imul(p,ie)|0,c=c+Math.imul(p,fe)|0;var _e=(f+(r=r+Math.imul(b,be)|0)|0)+((8191&(n=(n=n+Math.imul(b,le)|0)+Math.imul(l,be)|0))<<13)|0;f=((c=c+Math.imul(l,le)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,F),n=(n=Math.imul(L,z))+Math.imul(j,F)|0,c=Math.imul(j,z),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,V)|0)+Math.imul(D,W)|0,c=c+Math.imul(D,V)|0,r=r+Math.imul(P,G)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(R,G)|0,c=c+Math.imul(R,Y)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(H,X)|0,c=c+Math.imul(H,Z)|0,r=r+Math.imul(E,$)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(S,$)|0,c=c+Math.imul(S,ee)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(_,ae)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(y,ce)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(w,ce)|0,c=c+Math.imul(w,de)|0,r=r+Math.imul(m,ie)|0,n=(n=n+Math.imul(m,fe)|0)+Math.imul(g,ie)|0,c=c+Math.imul(g,fe)|0,r=r+Math.imul(h,be)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(p,be)|0,c=c+Math.imul(p,le)|0;var Ae=(f+(r=r+Math.imul(b,he)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(l,he)|0))<<13)|0;f=((c=c+Math.imul(l,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,V))+Math.imul(j,W)|0,c=Math.imul(j,V),r=r+Math.imul(O,G)|0,n=(n=n+Math.imul(O,Y)|0)+Math.imul(D,G)|0,c=c+Math.imul(D,Y)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(R,X)|0,c=c+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(E,ae)|0,n=(n=n+Math.imul(E,re)|0)+Math.imul(S,ae)|0,c=c+Math.imul(S,re)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,de)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,fe)|0)+Math.imul(w,ie)|0,c=c+Math.imul(w,fe)|0,r=r+Math.imul(m,be)|0,n=(n=n+Math.imul(m,le)|0)+Math.imul(g,be)|0,c=c+Math.imul(g,le)|0;var Ee=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;f=((c=c+Math.imul(p,pe)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,G),n=(n=Math.imul(L,Y))+Math.imul(j,G)|0,c=Math.imul(j,Y),r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(D,X)|0,c=c+Math.imul(D,Z)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(R,$)|0,c=c+Math.imul(R,ee)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(H,ae)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(E,ce)|0,n=(n=n+Math.imul(E,de)|0)+Math.imul(S,ce)|0,c=c+Math.imul(S,de)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(y,be)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(w,be)|0,c=c+Math.imul(w,le)|0;var Se=(f+(r=r+Math.imul(m,he)|0)|0)+((8191&(n=(n=n+Math.imul(m,pe)|0)+Math.imul(g,he)|0))<<13)|0;f=((c=c+Math.imul(g,pe)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,Z))+Math.imul(j,X)|0,c=Math.imul(j,Z),r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,r=r+Math.imul(P,ae)|0,n=(n=n+Math.imul(P,re)|0)+Math.imul(R,ae)|0,c=c+Math.imul(R,re)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,de)|0,r=r+Math.imul(E,ie)|0,n=(n=n+Math.imul(E,fe)|0)+Math.imul(S,ie)|0,c=c+Math.imul(S,fe)|0,r=r+Math.imul(I,be)|0,n=(n=n+Math.imul(I,le)|0)+Math.imul(_,be)|0,c=c+Math.imul(_,le)|0;var Ne=(f+(r=r+Math.imul(y,he)|0)|0)+((8191&(n=(n=n+Math.imul(y,pe)|0)+Math.imul(w,he)|0))<<13)|0;f=((c=c+Math.imul(w,pe)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(j,$)|0,c=Math.imul(j,ee),r=r+Math.imul(O,ae)|0,n=(n=n+Math.imul(O,re)|0)+Math.imul(D,ae)|0,c=c+Math.imul(D,re)|0,r=r+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(R,ce)|0,c=c+Math.imul(R,de)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(E,be)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(S,be)|0,c=c+Math.imul(S,le)|0;var Me=(f+(r=r+Math.imul(I,he)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(_,he)|0))<<13)|0;f=((c=c+Math.imul(_,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,re))+Math.imul(j,ae)|0,c=Math.imul(j,re),r=r+Math.imul(O,ce)|0,n=(n=n+Math.imul(O,de)|0)+Math.imul(D,ce)|0,c=c+Math.imul(D,de)|0,r=r+Math.imul(P,ie)|0,n=(n=n+Math.imul(P,fe)|0)+Math.imul(R,ie)|0,c=c+Math.imul(R,fe)|0,r=r+Math.imul(M,be)|0,n=(n=n+Math.imul(M,le)|0)+Math.imul(H,be)|0,c=c+Math.imul(H,le)|0;var He=(f+(r=r+Math.imul(E,he)|0)|0)+((8191&(n=(n=n+Math.imul(E,pe)|0)+Math.imul(S,he)|0))<<13)|0;f=((c=c+Math.imul(S,pe)|0)+(n>>>13)|0)+(He>>>26)|0,He&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,de))+Math.imul(j,ce)|0,c=Math.imul(j,de),r=r+Math.imul(O,ie)|0,n=(n=n+Math.imul(O,fe)|0)+Math.imul(D,ie)|0,c=c+Math.imul(D,fe)|0,r=r+Math.imul(P,be)|0,n=(n=n+Math.imul(P,le)|0)+Math.imul(R,be)|0,c=c+Math.imul(R,le)|0;var Te=(f+(r=r+Math.imul(M,he)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(H,he)|0))<<13)|0;f=((c=c+Math.imul(H,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,fe))+Math.imul(j,ie)|0,c=Math.imul(j,fe),r=r+Math.imul(O,be)|0,n=(n=n+Math.imul(O,le)|0)+Math.imul(D,be)|0,c=c+Math.imul(D,le)|0;var Pe=(f+(r=r+Math.imul(P,he)|0)|0)+((8191&(n=(n=n+Math.imul(P,pe)|0)+Math.imul(R,he)|0))<<13)|0;f=((c=c+Math.imul(R,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,be),n=(n=Math.imul(L,le))+Math.imul(j,be)|0,c=Math.imul(j,le);var Re=(f+(r=r+Math.imul(O,he)|0)|0)+((8191&(n=(n=n+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;f=((c=c+Math.imul(D,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(f+(r=Math.imul(L,he))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(j,he)|0))<<13)|0;return f=((c=Math.imul(j,pe))+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i[0]=xe,i[1]=me,i[2]=ge,i[3]=ve,i[4]=ye,i[5]=we,i[6]=ke,i[7]=Ie,i[8]=_e,i[9]=Ae,i[10]=Ee,i[11]=Se,i[12]=Ne,i[13]=Me,i[14]=He,i[15]=Te,i[16]=Pe,i[17]=Re,i[18]=Ce,0!==f&&(i[19]=f,a.length++),a};function m(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var r=0,n=0,c=0;c>>26)|0)>>>26,d&=67108863}a.words[c]=o,r=d,d=n}return 0!==r?a.words[c]=r:a.length--,a._strip()}function g(e,t,a){return m(e,t,a)}function v(e,t){this.x=e,this.y=t}Math.imul||(x=p),c.prototype.mulTo=function(e,t){var a=this.length+e.length;return 10===this.length&&10===e.length?x(this,e,t):a<63?p(this,e,t):a<1024?m(this,e,t):g(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),a=c.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,a,r,n,c){for(var d=0;d>>=1)n++;return 1<>>=13,a[2*d+1]=8191&c,c>>>=13;for(d=2*t;d>=26,a+=c/67108864|0,a+=d>>>26,this.words[n]=67108863&d}return 0!==a&&(this.words[n]=a,this.length++),t?this.ineg():this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>n&1}return t}(e);if(0===t.length)return new c(1);for(var a=this,r=0;r=0);var t,a=e%26,n=(e-a)/26,c=67108863>>>26-a<<26-a;if(0!==a){var d=0;for(t=0;t>>26-a}d&&(this.words[t]=d,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var c=e%26,d=Math.min((e-c)/26,this.length),o=67108863^67108863>>>c<d)for(this.length-=d,f=0;f=0&&(0!==s||f>=n);f--){var b=0|this.words[f];this.words[f]=s<<26-c|b>>>c,s=b&o}return i&&0!==s&&(i.words[i.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(e,t,a){return r(0===this.negative),this.iushrn(e,t,a)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,a=(e-t)/26,n=1<=0);var t=e%26,a=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},c.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 t=0;t>26)-(i/67108864|0),this.words[n+a]=67108863&c}for(;n>26,this.words[n+a]=67108863&c;if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&c;return this.negative=1,this._strip()},c.prototype._wordDiv=function(e,t){var a=(this.length,e.length),r=this.clone(),n=e,d=0|n.words[n.length-1];0!==(a=26-this._countBits(d))&&(n=n.ushln(a),r.iushln(a),d=0|n.words[n.length-1]);var o,i=r.length-n.length;if("mod"!==t){(o=new c(null)).length=i+1,o.words=new Array(o.length);for(var f=0;f=0;b--){var l=67108864*(0|r.words[n.length+b])+(0|r.words[n.length+b-1]);for(l=Math.min(l/d|0,67108863),r._ishlnsubmul(n,l,b);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,b),r.isZero()||(r.negative^=1);o&&(o.words[b]=l)}return o&&o._strip(),r._strip(),"div"!==t&&0!==a&&r.iushrn(a),{div:o||null,mod:r}},c.prototype.divmod=function(e,t,a){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.iadd(e)),{div:n,mod:d}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.isub(e)),{div:o.div,mod:d}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,d,o},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),c=a.cmp(r);return c<0||1===n&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var a=(1<<26)%e,n=0,c=this.length-1;c>=0;c--)n=(a*n+(0|this.words[c]))%e;return t?-n:n},c.prototype.modn=function(e){return this.modrn(e)},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var a=0,n=this.length-1;n>=0;n--){var c=(0|this.words[n])+67108864*a;this.words[n]=c/e|0,a=c%e}return this._strip(),t?this.ineg():this},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new c(1),d=new c(0),o=new c(0),i=new c(1),f=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++f;for(var s=a.clone(),b=t.clone();!t.isZero();){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||d.isOdd())&&(n.iadd(s),d.isub(b)),n.iushrn(1),d.iushrn(1);for(var h=0,p=1;0===(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(s),i.isub(b)),o.iushrn(1),i.iushrn(1);t.cmp(a)>=0?(t.isub(a),n.isub(o),d.isub(i)):(a.isub(t),o.isub(n),i.isub(d))}return{a:o,b:i,gcd:a.iushln(f)}},c.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,d=new c(1),o=new c(0),i=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var f=0,s=1;0===(t.words[0]&s)&&f<26;++f,s<<=1);if(f>0)for(t.iushrn(f);f-- >0;)d.isOdd()&&d.iadd(i),d.iushrn(1);for(var b=0,l=1;0===(a.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(a.iushrn(b);b-- >0;)o.isOdd()&&o.iadd(i),o.iushrn(1);t.cmp(a)>=0?(t.isub(a),d.isub(o)):(a.isub(t),o.isub(d))}return(n=0===t.cmpn(1)?d:o).cmpn(0)<0&&n.iadd(e),n},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var r=0;t.isEven()&&a.isEven();r++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var n=t.cmp(a);if(n<0){var c=t;t=a,a=c}else if(0===n||0===a.cmpn(1))break;t.isub(a)}return a.iushln(r)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0===(1&this.words[0])},c.prototype.isOdd=function(){return 1===(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,a=(e-t)/26,n=1<>>26,o&=67108863,this.words[d]=o}return 0!==c&&(this.words[d]=c,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this._strip(),this.length>1)t=1;else{a&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;a--){var r=0|this.words[a],n=0|e.words[a];if(r!==n){rn&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new E(e)},c.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)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.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 w(e,t){this.name=e,this.p=new c(t,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function I(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},n(k,w),k.prototype.split=function(e,t){for(var a=4194303,r=Math.min(e.length,9),n=0;n>>22,c=d}c>>>=22,e.words[n-10]=c,0===c&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new I;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return y[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},E.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var a=this.m.add(new c(1)).iushrn(2);return this.pow(e,a)}for(var n=this.m.subn(1),d=0;!n.isZero()&&0===n.andln(1);)d++,n.iushrn(1);r(!n.isZero());var o=new c(1).toRed(this),i=o.redNeg(),f=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new c(2*s*s).toRed(this);0!==this.pow(s,f).cmp(i);)s.redIAdd(i);for(var b=this.pow(s,n),l=this.pow(e,n.addn(1).iushrn(1)),u=this.pow(e,n),h=d;0!==u.cmp(o);){for(var p=u,x=0;0!==p.cmp(o);x++)p=p.redSqr();r(x=0;r--){for(var f=t.words[r],s=i-1;s>=0;s--){var b=f>>s&1;n!==a[0]&&(n=this.sqr(n)),0!==b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(n=this.mul(n,a[d]),o=0,d=0)):o=0}i=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new S(e)},n(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),c=n;return n.cmp(this.m)>=0?c=n.isub(this.m):n.cmpn(0)<0&&(c=n.iadd(this.m)),c._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new c(0)._forceRed(this);var a=e.mul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),d=n;return n.cmp(this.m)>=0?d=n.isub(this.m):n.cmpn(0)<0&&(d=n.iadd(this.m)),d._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},5649:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a="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={},n={},c=(t.addCustomErrorDeserializer=function(e,t){n[e]=t},t.createCustomErrorClass=function(e){var t=function(t,a){Object.assign(this,a),this.name=e,this.message=t||e,this.stack=(new Error).stack};return t.prototype=new Error,r[e]=t,t});t.deserializeError=function e(t){if("object"===("undefined"===typeof t?"undefined":a(t))&&t){try{var d=JSON.parse(t.message);d.message&&d.name&&(t=d)}catch(l){}var o=void 0;if("string"===typeof t.name){var i=t.name,f=n[i];if(f)o=f(t);else{var s="Error"===i?Error:r[i];s||(console.warn("deserializing an unknown class '"+i+"'"),s=c(i)),o=Object.create(s.prototype);try{for(var b in t)t.hasOwnProperty(b)&&(o[b]=t[b])}catch(l){}}}else o=new Error(t.message);return!o.stack&&Error.captureStackTrace&&Error.captureStackTrace(o,e),o}return new Error(String(t))},t.serializeError=function(e){return e?"object"===("undefined"===typeof e?"undefined":a(e))?d(e,[]):"function"===typeof e?"[Function: "+(e.name||"anonymous")+"]":e:e};function d(e,t){var r={};t.push(e);var n=!0,c=!1,o=void 0;try{for(var i,f=Object.keys(e)[Symbol.iterator]();!(n=(i=f.next()).done);n=!0){var s=i.value,b=e[s];"function"!==typeof b&&(b&&"object"===("undefined"===typeof b?"undefined":a(b))?-1!==t.indexOf(e[s])?r[s]="[Circular]":r[s]=d(e[s],t.slice(0)):r[s]=b)}}catch(l){c=!0,o=l}finally{try{!n&&f.return&&f.return()}finally{if(c)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}},30500:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusCodes=t.DBNotReset=t.DBWrongPassword=t.NoDBPathGiven=t.FirmwareOrAppUpdateRequired=t.LedgerAPI5xx=t.LedgerAPI4xx=t.GenuineCheckFailed=t.PairingFailed=t.SyncError=t.FeeTooHigh=t.FeeRequired=t.FeeNotLoaded=t.CantScanQRCode=t.ETHAddressNonEIP=t.WrongAppForCurrency=t.WrongDeviceForAccount=t.WebsocketConnectionFailed=t.WebsocketConnectionError=t.DeviceShouldStayInApp=t.TransportWebUSBGestureRequired=t.TransportInterfaceNotAvailable=t.TransportOpenUserCancelled=t.UserRefusedOnDevice=t.UserRefusedAllowManager=t.UserRefusedFirmwareUpdate=t.UserRefusedAddress=t.UserRefusedDeviceNameChange=t.UpdateYourApp=t.UnavailableTezosOriginatedAccountSend=t.UnavailableTezosOriginatedAccountReceive=t.RecipientRequired=t.MCUNotGenuineToDashboard=t.UnexpectedBootloader=t.TimeoutTagged=t.RecommendUndelegation=t.RecommendSubAccountsToEmpty=t.PasswordIncorrectError=t.PasswordsDontMatchError=t.GasLessThanEstimate=t.NotSupportedLegacyAddress=t.NotEnoughGas=t.NoAccessToCamera=t.NotEnoughBalanceBecauseDestinationNotCreated=t.NotEnoughSpendableBalance=t.NotEnoughBalanceInParentAccount=t.NotEnoughBalanceToDelegate=t.NotEnoughBalance=t.NoAddressesFound=t.NetworkDown=t.ManagerUninstallBTCDep=t.ManagerNotEnoughSpaceError=t.ManagerFirmwareNotEnoughSpaceError=t.ManagerDeviceLockedError=t.ManagerAppDepUninstallRequired=t.ManagerAppDepInstallRequired=t.ManagerAppRelyOnBTCError=t.ManagerAppAlreadyInstalledError=t.LedgerAPINotAvailable=t.LedgerAPIErrorWithMessage=t.LedgerAPIError=t.UnknownMCU=t.LatestMCUInstalledError=t.InvalidAddressBecauseDestinationIsAlsoSource=t.InvalidAddress=t.InvalidXRPTag=t.HardResetFail=t.FeeEstimationFailed=t.EthAppPleaseEnableContractData=t.EnpointConfigError=t.DisconnectedDeviceDuringOperation=t.DisconnectedDevice=t.DeviceSocketNoBulkStatus=t.DeviceSocketFail=t.DeviceNameInvalid=t.DeviceHalted=t.DeviceInOSUExpected=t.DeviceOnDashboardUnexpected=t.DeviceOnDashboardExpected=t.DeviceNotGenuineError=t.DeviceGenuineSocketEarlyClose=t.DeviceAppVerifyNotSupported=t.CurrencyNotSupported=t.CashAddrNotSupported=t.CantOpenDevice=t.BtcUnmatchedApp=t.BluetoothRequired=t.AmountRequired=t.AccountNotSupported=t.AccountNameRequiredError=t.addCustomErrorDeserializer=t.createCustomErrorClass=t.deserializeError=t.serializeError=void 0,t.TransportError=n,t.getAltStatusMessage=d,t.TransportStatusError=o;var r=a(5649);t.serializeError=r.serializeError,t.deserializeError=r.deserializeError,t.createCustomErrorClass=r.createCustomErrorClass,t.addCustomErrorDeserializer=r.addCustomErrorDeserializer;t.AccountNameRequiredError=(0,r.createCustomErrorClass)("AccountNameRequired"),t.AccountNotSupported=(0,r.createCustomErrorClass)("AccountNotSupported"),t.AmountRequired=(0,r.createCustomErrorClass)("AmountRequired"),t.BluetoothRequired=(0,r.createCustomErrorClass)("BluetoothRequired"),t.BtcUnmatchedApp=(0,r.createCustomErrorClass)("BtcUnmatchedApp"),t.CantOpenDevice=(0,r.createCustomErrorClass)("CantOpenDevice"),t.CashAddrNotSupported=(0,r.createCustomErrorClass)("CashAddrNotSupported"),t.CurrencyNotSupported=(0,r.createCustomErrorClass)("CurrencyNotSupported"),t.DeviceAppVerifyNotSupported=(0,r.createCustomErrorClass)("DeviceAppVerifyNotSupported"),t.DeviceGenuineSocketEarlyClose=(0,r.createCustomErrorClass)("DeviceGenuineSocketEarlyClose"),t.DeviceNotGenuineError=(0,r.createCustomErrorClass)("DeviceNotGenuine"),t.DeviceOnDashboardExpected=(0,r.createCustomErrorClass)("DeviceOnDashboardExpected"),t.DeviceOnDashboardUnexpected=(0,r.createCustomErrorClass)("DeviceOnDashboardUnexpected"),t.DeviceInOSUExpected=(0,r.createCustomErrorClass)("DeviceInOSUExpected"),t.DeviceHalted=(0,r.createCustomErrorClass)("DeviceHalted"),t.DeviceNameInvalid=(0,r.createCustomErrorClass)("DeviceNameInvalid"),t.DeviceSocketFail=(0,r.createCustomErrorClass)("DeviceSocketFail"),t.DeviceSocketNoBulkStatus=(0,r.createCustomErrorClass)("DeviceSocketNoBulkStatus"),t.DisconnectedDevice=(0,r.createCustomErrorClass)("DisconnectedDevice"),t.DisconnectedDeviceDuringOperation=(0,r.createCustomErrorClass)("DisconnectedDeviceDuringOperation"),t.EnpointConfigError=(0,r.createCustomErrorClass)("EnpointConfig"),t.EthAppPleaseEnableContractData=(0,r.createCustomErrorClass)("EthAppPleaseEnableContractData"),t.FeeEstimationFailed=(0,r.createCustomErrorClass)("FeeEstimationFailed"),t.HardResetFail=(0,r.createCustomErrorClass)("HardResetFail"),t.InvalidXRPTag=(0,r.createCustomErrorClass)("InvalidXRPTag"),t.InvalidAddress=(0,r.createCustomErrorClass)("InvalidAddress"),t.InvalidAddressBecauseDestinationIsAlsoSource=(0,r.createCustomErrorClass)("InvalidAddressBecauseDestinationIsAlsoSource"),t.LatestMCUInstalledError=(0,r.createCustomErrorClass)("LatestMCUInstalledError"),t.UnknownMCU=(0,r.createCustomErrorClass)("UnknownMCU"),t.LedgerAPIError=(0,r.createCustomErrorClass)("LedgerAPIError"),t.LedgerAPIErrorWithMessage=(0,r.createCustomErrorClass)("LedgerAPIErrorWithMessage"),t.LedgerAPINotAvailable=(0,r.createCustomErrorClass)("LedgerAPINotAvailable"),t.ManagerAppAlreadyInstalledError=(0,r.createCustomErrorClass)("ManagerAppAlreadyInstalled"),t.ManagerAppRelyOnBTCError=(0,r.createCustomErrorClass)("ManagerAppRelyOnBTC"),t.ManagerAppDepInstallRequired=(0,r.createCustomErrorClass)("ManagerAppDepInstallRequired"),t.ManagerAppDepUninstallRequired=(0,r.createCustomErrorClass)("ManagerAppDepUninstallRequired"),t.ManagerDeviceLockedError=(0,r.createCustomErrorClass)("ManagerDeviceLocked"),t.ManagerFirmwareNotEnoughSpaceError=(0,r.createCustomErrorClass)("ManagerFirmwareNotEnoughSpace"),t.ManagerNotEnoughSpaceError=(0,r.createCustomErrorClass)("ManagerNotEnoughSpace"),t.ManagerUninstallBTCDep=(0,r.createCustomErrorClass)("ManagerUninstallBTCDep"),t.NetworkDown=(0,r.createCustomErrorClass)("NetworkDown"),t.NoAddressesFound=(0,r.createCustomErrorClass)("NoAddressesFound"),t.NotEnoughBalance=(0,r.createCustomErrorClass)("NotEnoughBalance"),t.NotEnoughBalanceToDelegate=(0,r.createCustomErrorClass)("NotEnoughBalanceToDelegate"),t.NotEnoughBalanceInParentAccount=(0,r.createCustomErrorClass)("NotEnoughBalanceInParentAccount"),t.NotEnoughSpendableBalance=(0,r.createCustomErrorClass)("NotEnoughSpendableBalance"),t.NotEnoughBalanceBecauseDestinationNotCreated=(0,r.createCustomErrorClass)("NotEnoughBalanceBecauseDestinationNotCreated"),t.NoAccessToCamera=(0,r.createCustomErrorClass)("NoAccessToCamera"),t.NotEnoughGas=(0,r.createCustomErrorClass)("NotEnoughGas"),t.NotSupportedLegacyAddress=(0,r.createCustomErrorClass)("NotSupportedLegacyAddress"),t.GasLessThanEstimate=(0,r.createCustomErrorClass)("GasLessThanEstimate"),t.PasswordsDontMatchError=(0,r.createCustomErrorClass)("PasswordsDontMatch"),t.PasswordIncorrectError=(0,r.createCustomErrorClass)("PasswordIncorrect"),t.RecommendSubAccountsToEmpty=(0,r.createCustomErrorClass)("RecommendSubAccountsToEmpty"),t.RecommendUndelegation=(0,r.createCustomErrorClass)("RecommendUndelegation"),t.TimeoutTagged=(0,r.createCustomErrorClass)("TimeoutTagged"),t.UnexpectedBootloader=(0,r.createCustomErrorClass)("UnexpectedBootloader"),t.MCUNotGenuineToDashboard=(0,r.createCustomErrorClass)("MCUNotGenuineToDashboard"),t.RecipientRequired=(0,r.createCustomErrorClass)("RecipientRequired"),t.UnavailableTezosOriginatedAccountReceive=(0,r.createCustomErrorClass)("UnavailableTezosOriginatedAccountReceive"),t.UnavailableTezosOriginatedAccountSend=(0,r.createCustomErrorClass)("UnavailableTezosOriginatedAccountSend"),t.UpdateYourApp=(0,r.createCustomErrorClass)("UpdateYourApp"),t.UserRefusedDeviceNameChange=(0,r.createCustomErrorClass)("UserRefusedDeviceNameChange"),t.UserRefusedAddress=(0,r.createCustomErrorClass)("UserRefusedAddress"),t.UserRefusedFirmwareUpdate=(0,r.createCustomErrorClass)("UserRefusedFirmwareUpdate"),t.UserRefusedAllowManager=(0,r.createCustomErrorClass)("UserRefusedAllowManager"),t.UserRefusedOnDevice=(0,r.createCustomErrorClass)("UserRefusedOnDevice"),t.TransportOpenUserCancelled=(0,r.createCustomErrorClass)("TransportOpenUserCancelled"),t.TransportInterfaceNotAvailable=(0,r.createCustomErrorClass)("TransportInterfaceNotAvailable"),t.TransportWebUSBGestureRequired=(0,r.createCustomErrorClass)("TransportWebUSBGestureRequired"),t.DeviceShouldStayInApp=(0,r.createCustomErrorClass)("DeviceShouldStayInApp"),t.WebsocketConnectionError=(0,r.createCustomErrorClass)("WebsocketConnectionError"),t.WebsocketConnectionFailed=(0,r.createCustomErrorClass)("WebsocketConnectionFailed"),t.WrongDeviceForAccount=(0,r.createCustomErrorClass)("WrongDeviceForAccount"),t.WrongAppForCurrency=(0,r.createCustomErrorClass)("WrongAppForCurrency"),t.ETHAddressNonEIP=(0,r.createCustomErrorClass)("ETHAddressNonEIP"),t.CantScanQRCode=(0,r.createCustomErrorClass)("CantScanQRCode"),t.FeeNotLoaded=(0,r.createCustomErrorClass)("FeeNotLoaded"),t.FeeRequired=(0,r.createCustomErrorClass)("FeeRequired"),t.FeeTooHigh=(0,r.createCustomErrorClass)("FeeTooHigh"),t.SyncError=(0,r.createCustomErrorClass)("SyncError"),t.PairingFailed=(0,r.createCustomErrorClass)("PairingFailed"),t.GenuineCheckFailed=(0,r.createCustomErrorClass)("GenuineCheckFailed"),t.LedgerAPI4xx=(0,r.createCustomErrorClass)("LedgerAPI4xx"),t.LedgerAPI5xx=(0,r.createCustomErrorClass)("LedgerAPI5xx"),t.FirmwareOrAppUpdateRequired=(0,r.createCustomErrorClass)("FirmwareOrAppUpdateRequired"),t.NoDBPathGiven=(0,r.createCustomErrorClass)("NoDBPathGiven"),t.DBWrongPassword=(0,r.createCustomErrorClass)("DBWrongPassword"),t.DBNotReset=(0,r.createCustomErrorClass)("DBNotReset");function n(e,t){this.name="TransportError",this.message=e,this.stack=(new Error).stack,this.id=t}n.prototype=new Error,(0,r.addCustomErrorDeserializer)("TransportError",(function(e){return new n(e.message,e.id)}));var c=t.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 t=Object.keys(c).find((function(t){return c[t]===e}))||"UNKNOWN_ERROR",a=d(e)||t,r=e.toString(16);this.message="Ledger device: "+a+" (0x"+r+")",this.stack=(new Error).stack,this.statusCode=e,this.statusText=t}o.prototype=new Error,(0,r.addCustomErrorDeserializer)("TransportStatusError",(function(e){return new o(e.statusCode)}))},69541:(e,t,a)=>{"use strict";var r=a(26382).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"w0w";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.transport=t,t.decorateAppAPIMethods(this,["getAddress","provideERC20TokenInformation","signTransaction","signPersonalMessage","getAppConfiguration"],a)}return n(e,[{key:"getAddress",value:function(e,t,a){var n=(0,c.splitPath)(e),d=new r(1+4*n.length);return d[0]=n.length,n.forEach((function(e,t){d.writeUInt32BE(e,1+4*t)})),this.transport.send(224,2,t?1:0,a?1:0,d).then((function(e){var t={},r=e[0],n=e[1+r];return t.publicKey=e.slice(1,1+r).toString("hex"),t.address="0x"+e.slice(1+r+1,1+r+1+n).toString("ascii"),a&&(t.chainCode=e.slice(1+r+1+n,1+r+1+n+32).toString("hex")),t}))}},{key:"provideERC20TokenInformation",value:function(e){var t=e.data;return this.transport.send(224,10,0,0,t).then((function(){return!0}),(function(e){if(e&&27904===e.statusCode)return!1;throw e}))}},{key:"signTransaction",value:function(e,t){for(var a=this,n=(0,c.splitPath)(e),o=0,i=new r(t,"hex"),f=[],s=void 0,b=function(){var e=0===o?149-4*n.length:150,t=o+e>i.length?i.length-o:e,a=new r(0===o?1+4*n.length+t:t);0===o?(a[0]=n.length,n.forEach((function(e,t){a.writeUInt32BE(e,1+4*t)})),i.copy(a,1+4*n.length,o,o+t)):i.copy(a,0,o,o+t),f.push(a),o+=t};o!==i.length;)b();return(0,c.foreach)(f,(function(e,t){return a.transport.send(224,4,0===t?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 t={};return t.arbitraryDataEnabled=1&e[0],t.version=e[1]+"."+e[2]+"."+e[3],t}))}},{key:"signPersonalMessage",value:function(e,t){for(var a=this,n=(0,c.splitPath)(e),d=0,o=new r(t,"hex"),i=[],f=void 0,s=function(){var e=0===d?149-4*n.length-4:150,t=d+e>o.length?o.length-d:e,a=new r(0===d?1+4*n.length+4+t:t);0===d?(a[0]=n.length,n.forEach((function(e,t){a.writeUInt32BE(e,1+4*t)})),a.writeUInt32BE(o.length,1+4*n.length),o.copy(a,1+4*n.length+4,d,d+t)):o.copy(a,0,d,d+t),i.push(a),d+=t};d!==o.length;)s();return(0,c.foreach)(i,(function(e,t){return a.transport.send(224,8,0===t?0:128,0,e).then((function(e){f=e}))})).then((function(){return{v:f[0],r:f.slice(1,33).toString("hex"),s:f.slice(33,65).toString("hex")}}))}}]),e}();t.default=o},88303:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=function(){var e=void 0,t=void 0,a=new Promise((function(a,r){e=a,t=r}));if(!e||!t)throw"defer() error";return{promise:a,resolve:e,reject:t}},t.splitPath=function(e){var t=[];return e.split("/").forEach((function(e){var a=parseInt(e,10);isNaN(a)||(e.length>1&&"'"===e[e.length-1]&&(a+=2147483648),t.push(a))})),t},t.eachSeries=function(e,t){return e.reduce((function(e,a){return e.then((function(){return t(a)}))}),Promise.resolve())},t.foreach=function(e,t){function a(e,r,n){return e>=r.length?n:t(r[e],e).then((function(t){return n.push(t),a(e+1,r,n)}))}return Promise.resolve().then((function(){return a(0,e,[])}))},t.doIf=function(e,t){return Promise.resolve().then((function(){if(e)return t()}))},t.asyncWhile=function(e,t){return Promise.resolve([]).then((function a(r){return e()?t().then((function(e){return r.push(e),a(r)})):r}))}},50326:(e,t,a)=>{"use strict";var r=a(26382).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var n=x(a(78046)),c=x(a(36926)),d=x(a(97360)),o=x(a(66552)),i=x(a(34089)),f=x(a(96731)),s=x(a(31912)),b=x(a(24620)),l=x(a(96835)),u=a(5722),h=a(79231),p=x(h);function x(e){return e&&e.__esModule?e:{default:e}}function m(e,t,a){var r=new h.TransportError(t,a);return r.originalError=e,r}var g=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")};function v(e,t,a,n){var c=function(e,t){for(var a=r.alloc(e.length),n=0;n "+e.toString("hex")),(0,u.sign)(o,t/1e3).then((function(e){var t,n=e.signatureData;if("string"===typeof n){var c=r.from((t=n).replace(/-/g,"+").replace(/_/g,"/")+"==".substring(0,3*t.length%4),"base64").slice(5);return a&&a("<= "+c.toString("hex")),c}throw e}))}var y=[];var w=function(e){function t(){(0,f.default)(this,t);var e=(0,s.default)(this,(t.__proto__||(0,d.default)(t)).call(this));return y.push(e),e}return(0,l.default)(t,e),(0,b.default)(t,null,[{key:"open",value:function(){var e=(0,i.default)(o.default.mark((function e(a){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new t);case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),(0,b.default)(t,[{key:"exchange",value:function(){var e=(0,i.default)(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v(t,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,c.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(t){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),n.default.resolve()}}]),t}(p.default);w.isSupported=u.isSupported,w.list=function(){return(0,u.isSupported)().then((function(e){return e?[null]:[]}))},w.listen=function(e){var t=!1;return(0,u.isSupported)().then((function(a){t||(a?(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(){t=!0}}},t.default=w},79231:(e,t,a)=>{"use strict";var r=a(26382).Buffer,n=a(54756);Object.defineProperty(t,"__esModule",{value:!0}),t.getAltStatusMessage=t.StatusCodes=t.TransportStatusError=t.TransportError=void 0;var c,d=function(){function e(e,t){for(var a=0;a4&&void 0!==arguments[4]?arguments[4]:r.alloc(0),l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[f.StatusCodes.OK];return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(b.length>=256)){e.next=2;break}throw new f.TransportError("data.length exceed 256 bytes limit. Got: "+b.length,"DataLengthTooBig");case 2:return e.next=4,t.exchange(r.concat([r.from([a,c,d,o]),r.from([b.length]),b]));case 4:if(i=e.sent,s=i.readUInt16BE(i.length-2),l.some((function(e){return e===s}))){e.next=8;break}throw new f.TransportStatusError(s);case 8:return e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,t)})));return function(t,a,r,n){return e.apply(this,arguments)}}(),this.exchangeAtomicImpl=function(){var e=s(n.mark((function e(a){var r,c,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.exchangeBusyPromise){e.next=2;break}throw new f.TransportError("Transport race condition","RaceCondition");case 2:return r=void 0,c=new Promise((function(e){r=e})),t.exchangeBusyPromise=c,e.prev=5,e.next=8,a();case 8:return d=e.sent,e.abrupt("return",d);case 10:return e.prev=10,r&&r(),t.exchangeBusyPromise=null,e.finish(10);case 14:case"end":return e.stop()}}),e,t,[[5,,10,14]])})));return function(t){return e.apply(this,arguments)}}(),this._appAPIlock=null}return d(e,[{key:"on",value:function(e,t){this._events.on(e,t)}},{key:"off",value:function(e,t){this._events.removeListener(e,t)}},{key:"emit",value:function(e){for(var t,a=arguments.length,r=Array(a>1?a-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:3e3,a=arguments[1];return new Promise((function(r,n){var c=!1,d=e.listen({next:function(a){c=!0,d&&d.unsubscribe(),o&&clearTimeout(o),e.open(a.descriptor,t).then(r,n)},error:function(e){o&&clearTimeout(o),n(e)},complete:function(){o&&clearTimeout(o),c||n(new f.TransportError(e.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),o=a?setTimeout((function(){d.unsubscribe(),n(new f.TransportError(e.ErrorMessage_ListenTimeout,"ListenTimeout"))}),a):null}))}}]),e}();b.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",b.ErrorMessage_NoDeviceFound="No Ledger device found",t.default=b},71912:(e,t)=>{"use strict";t.A=void 0;var a={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"};t.A=a},299:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var r=a(58168),n=a(80045),c=a(65043),d=a(43024),o=a(47573),i=a(74822),f=c.forwardRef((function(e,t){var a=e.children,o=e.classes,f=e.className,s=e.color,b=void 0===s?"inherit":s,l=e.component,u=void 0===l?"svg":l,h=e.fontSize,p=void 0===h?"medium":h,x=e.htmlColor,m=e.titleAccess,g=e.viewBox,v=void 0===g?"0 0 24 24":g,y=(0,n.A)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return c.createElement(u,(0,r.A)({className:(0,d.A)(o.root,f,"inherit"!==b&&o["color".concat((0,i.A)(b))],"default"!==p&&"medium"!==p&&o["fontSize".concat((0,i.A)(p))]),focusable:"false",viewBox:v,color:x,"aria-hidden":!m||void 0,role:m?"img":void 0,ref:t},y),a,m?c.createElement("title",null,m):null)}));f.muiName="SvgIcon";const s=(0,o.A)((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"})(f)},82454:(e,t,a)=>{"use strict";a.d(t,{X4:()=>s,a:()=>l,e$:()=>b,eM:()=>o,tL:()=>f});var r=a(38565);function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),a)}function c(e){if(e.type)return e;if("#"===e.charAt(0))return c(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),a=e.match(t);return a&&1===a[0].length&&(a=a.map((function(e){return e+e}))),a?"rgb".concat(4===a.length?"a":"","(").concat(a.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),a=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(a))throw new Error((0,r.A)(3,e));var n=e.substring(t+1,e.length-1).split(",");return{type:a,values:n=n.map((function(e){return parseFloat(e)}))}}function d(e){var t=e.type,a=e.values;return-1!==t.indexOf("rgb")?a=a.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(a[1]="".concat(a[1],"%"),a[2]="".concat(a[2],"%")),"".concat(t,"(").concat(a.join(", "),")")}function o(e,t){var a=i(e),r=i(t);return(Math.max(a,r)+.05)/(Math.min(a,r)+.05)}function i(e){var t="hsl"===(e=c(e)).type?c(function(e){var t=(e=c(e)).values,a=t[0],r=t[1]/100,n=t[2]/100,o=r*Math.min(n,1-n),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+a/30)%12;return n-o*Math.max(Math.min(t-3,9-t,1),-1)},f="rgb",s=[Math.round(255*i(0)),Math.round(255*i(8)),Math.round(255*i(4))];return"hsla"===e.type&&(f+="a",s.push(t[3])),d({type:f,values:s})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return i(e)>.5?b(e,t):l(e,t)}function s(e,t){return e=c(e),t=n(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,d(e)}function b(e,t){if(e=c(e),t=n(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var a=0;a<3;a+=1)e.values[a]*=1-t;return d(e)}function l(e,t){if(e=c(e),t=n(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var a=0;a<3;a+=1)e.values[a]+=(255-e.values[a])*t;return d(e)}},45195:(e,t,a)=>{"use strict";a.d(t,{A:()=>d,H:()=>c});var r=a(58168),n=a(80045),c=["xs","sm","md","lg","xl"];function d(e){var t=e.values,a=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,d=e.unit,o=void 0===d?"px":d,i=e.step,f=void 0===i?5:i,s=(0,n.A)(e,["values","unit","step"]);function b(e){var t="number"===typeof a[e]?a[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function l(e,t){var r=c.indexOf(t);return r===c.length-1?b(e):"@media (min-width:".concat("number"===typeof a[e]?a[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof a[c[r+1]]?a[c[r+1]]:t)-f/100).concat(o,")")}return(0,r.A)({keys:c,values:a,up:b,down:function(e){var t=c.indexOf(e)+1,r=a[c[t]];return t===c.length?b("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-f/100).concat(o,")")},between:l,only:function(e){return l(e,e)},width:function(e){return a[e]}},s)}},71705:(e,t,a)=>{"use strict";a.d(t,{A:()=>C});var r=a(80045),n=a(73806),c=a(45195),d=a(64467),o=a(58168);function i(e,t,a){var r;return(0,o.A)({gutters:function(){var a=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.A)({paddingLeft:t(2),paddingRight:t(2)},a,(0,d.A)({},e.up("sm"),(0,o.A)({paddingLeft:t(3),paddingRight:t(3)},a[e.up("sm")])))},toolbar:(r={minHeight:56},(0,d.A)(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,d.A)(r,e.up("sm"),{minHeight:64}),r)},a)}var f=a(38565);const s={black:"#000",white:"#fff"};const 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"};const 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"};const 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"};const 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"};const p={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"};const x={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"};const 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"};var g=a(82454),v={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 w(e,t,a,r){var n=r.light||r,c=r.dark||1.5*r;e[t]||(e.hasOwnProperty(a)?e[t]=e[a]:"light"===t?e.light=(0,g.a)(e.main,n):"dark"===t&&(e.dark=(0,g.e$)(e.main,c)))}function k(e){return Math.round(1e5*e)/1e5}function I(e){return k(e)}var _={textTransform:"uppercase"},A='"Roboto", "Helvetica", "Arial", sans-serif';function E(e,t){var a="function"===typeof t?t(e):t,c=a.fontFamily,d=void 0===c?A:c,i=a.fontSize,f=void 0===i?14:i,s=a.fontWeightLight,b=void 0===s?300:s,l=a.fontWeightRegular,u=void 0===l?400:l,h=a.fontWeightMedium,p=void 0===h?500:h,x=a.fontWeightBold,m=void 0===x?700:x,g=a.htmlFontSize,v=void 0===g?16:g,y=a.allVariants,w=a.pxToRem,E=(0,r.A)(a,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var S=f/14,N=w||function(e){return"".concat(e/v*S,"rem")},M=function(e,t,a,r,n){return(0,o.A)({fontFamily:d,fontWeight:e,fontSize:N(t),lineHeight:a},d===A?{letterSpacing:"".concat(k(r/t),"em")}:{},n,y)},H={h1:M(b,96,1.167,-1.5),h2:M(b,60,1.2,-.5),h3:M(u,48,1.167,0),h4:M(u,34,1.235,.25),h5:M(u,24,1.334,0),h6:M(p,20,1.6,.15),subtitle1:M(u,16,1.75,.15),subtitle2:M(p,14,1.57,.1),body1:M(u,16,1.5,.15),body2:M(u,14,1.43,.15),button:M(p,14,1.75,.4,_),caption:M(u,12,1.66,.4),overline:M(u,12,2.66,1,_)};return(0,n.A)((0,o.A)({htmlFontSize:v,pxToRem:N,round:I,fontFamily:d,fontSize:f,fontWeightLight:b,fontWeightRegular:u,fontWeightMedium:p,fontWeightBold:m},H),E,{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(",")}const N=["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)];const M={borderRadius:4};var H=a(55995);var T=a(12899),P=a(75321);function R(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,a=void 0===t?{}:t,d=e.mixins,k=void 0===d?{}:d,I=e.palette,_=void 0===I?{}:I,A=e.spacing,S=e.typography,R=void 0===S?{}:S,C=(0,r.A)(e,["breakpoints","mixins","palette","spacing","typography"]),O=function(e){var t=e.primary,a=void 0===t?{light:l[300],main:l[500],dark:l[700]}:t,c=e.secondary,d=void 0===c?{light:u.A200,main:u.A400,dark:u.A700}:c,i=e.error,k=void 0===i?{light:h[300],main:h[500],dark:h[700]}:i,I=e.warning,_=void 0===I?{light:p[300],main:p[500],dark:p[700]}:I,A=e.info,E=void 0===A?{light:x[300],main:x[500],dark:x[700]}:A,S=e.success,N=void 0===S?{light:m[300],main:m[500],dark:m[700]}:S,M=e.type,H=void 0===M?"light":M,T=e.contrastThreshold,P=void 0===T?3:T,R=e.tonalOffset,C=void 0===R?.2:R,O=(0,r.A)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function D(e){return(0,g.eM)(e,y.text.primary)>=P?y.text.primary:v.text.primary}var B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,a=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.A)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error((0,f.A)(4,t));if("string"!==typeof e.main)throw new Error((0,f.A)(5,JSON.stringify(e.main)));return w(e,"light",a,C),w(e,"dark",r,C),e.contrastText||(e.contrastText=D(e.main)),e},L={dark:y,light:v};return(0,n.A)((0,o.A)({common:s,type:H,primary:B(a),secondary:B(d,"A400","A200","A700"),error:B(k),warning:B(_),info:B(E),success:B(N),grey:b,contrastThreshold:P,getContrastText:D,augmentColor:B,tonalOffset:C},L[H]),O)}(_),D=(0,c.A)(a),B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=(0,H.L)({spacing:e}),a=function(){for(var e=arguments.length,a=new Array(e),r=0;r1?j-1:0),F=1;F{"use strict";a.d(t,{A:()=>r});const r=(0,a(71705).A)()},12899:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>o,p0:()=>c});var r=a(80045),n={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},c={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function d(e){return"".concat(Math.round(e),"ms")}const o={easing:n,duration:c,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.duration,o=void 0===a?c.standard:a,i=t.easing,f=void 0===i?n.easeInOut:i,s=t.delay,b=void 0===s?0:s;(0,r.A)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof o?o:d(o)," ").concat(f," ").concat("string"===typeof b?b:d(b))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},47573:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var r=a(58168),n=a(80045),c=a(65043),d=a(80219),o=a.n(d),i=a(35313),f=a(11978),s=a(23052);const b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(a){var d=t.defaultTheme,b=t.withTheme,l=void 0!==b&&b,u=t.name,h=(0,n.A)(t,["defaultTheme","withTheme","name"]);var p=u,x=(0,i.A)(e,(0,r.A)({defaultTheme:d,Component:a,name:u||a.displayName,classNamePrefix:p},h)),m=c.forwardRef((function(e,t){e.classes;var o,i=e.innerRef,b=(0,n.A)(e,["classes","innerRef"]),h=x((0,r.A)({},a.defaultProps,e)),p=b;return("string"===typeof u||l)&&(o=(0,s.A)()||d,u&&(p=(0,f.A)({theme:o,name:u,props:b})),l&&!p.theme&&(p.theme=o)),c.createElement(a,(0,r.A)({ref:i||t,classes:h},p))}));return o()(m,a),m}};var l=a(15921);const u=function(e,t){return b(e,(0,r.A)({defaultTheme:l.A},t))}},75321:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});const r={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},74822:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(38565);function n(e){if("string"!==typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},146:(e,t,a)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),a=0;ar})},91917:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var r=a(58168),n=a(65043),c=a(299);function d(e,t){var a=function(t,a){return n.createElement(c.A,(0,r.A)({ref:a},t),e)};return a.muiName=c.A.muiName,n.memo(n.forwardRef(a))}},27355:(e,t,a)=>{"use strict";function r(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,n=new Array(r),c=0;cr})},99081:(e,t,a)=>{"use strict";a.r(t),a.d(t,{capitalize:()=>r.A,createChainedFunction:()=>n.A,createSvgIcon:()=>c.A,debounce:()=>d.A,deprecatedPropType:()=>o,isMuiElement:()=>i.A,ownerDocument:()=>f.A,ownerWindow:()=>s.A,requirePropFactory:()=>b,setRef:()=>l.A,unstable_useId:()=>m.A,unsupportedProp:()=>u,useControlled:()=>h.A,useEventCallback:()=>p.A,useForkRef:()=>x.A,useIsFocusVisible:()=>g.A});var r=a(74822),n=a(146),c=a(91917),d=a(27355);function o(e,t){return function(){return null}}var i=a(64867),f=a(79892),s=a(57249);function b(e){return function(){return null}}var l=a(29189);function u(e,t,a,r,n){return null}var h=a(51051),p=a(32158),x=a(60768),m=a(42237),g=a(54455)},64867:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(65043);function n(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},79892:(e,t,a)=>{"use strict";function r(e){return e&&e.ownerDocument||document}a.d(t,{A:()=>r})},57249:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(79892);function n(e){return(0,r.A)(e).defaultView||window}},29189:(e,t,a)=>{"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}a.d(t,{A:()=>r})},42237:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(65043);function n(e){var t=r.useState(e),a=t[0],n=t[1],c=e||a;return r.useEffect((function(){null==a&&n("mui-".concat(Math.round(1e5*Math.random())))}),[a]),c}},51051:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(65043);function n(e){var t=e.controlled,a=e.default,n=(e.name,e.state,r.useRef(void 0!==t).current),c=r.useState(a),d=c[0],o=c[1];return[n?t:d,r.useCallback((function(e){n||o(e)}),[])]}},32158:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var r=a(65043),n="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function c(e){var t=r.useRef(e);return n((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},60768:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var r=a(65043),n=a(29189);function c(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(a){(0,n.A)(e,a),(0,n.A)(t,a)}}),[e,t])}},54455:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var r=a(65043),n=a(97950),c=!0,d=!1,o=null,i={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function f(e){e.metaKey||e.altKey||e.ctrlKey||(c=!0)}function s(){c=!1}function b(){"hidden"===this.visibilityState&&d&&(c=!0)}function l(e){var t=e.target;try{return t.matches(":focus-visible")}catch(a){}return c||function(e){var t=e.type,a=e.tagName;return!("INPUT"!==a||!i[t]||e.readOnly)||"TEXTAREA"===a&&!e.readOnly||!!e.isContentEditable}(t)}function u(){d=!0,window.clearTimeout(o),o=window.setTimeout((function(){d=!1}),100)}function h(){return{isFocusVisible:l,onBlurVisible:u,ref:r.useCallback((function(e){var t,a=n.findDOMNode(e);null!=a&&((t=a.ownerDocument).addEventListener("keydown",f,!0),t.addEventListener("mousedown",s,!0),t.addEventListener("pointerdown",s,!0),t.addEventListener("touchstart",s,!0),t.addEventListener("visibilitychange",b,!0))}),[])}}},25638:(e,t)=>{"use strict";var a=60103,r=60106,n=60107,c=60108,d=60114,o=60109,i=60110,f=60112,s=60113,b=60120,l=60115,u=60116,h=60121,p=60122,x=60117,m=60129,g=60131;if("function"===typeof Symbol&&Symbol.for){var v=Symbol.for;a=v("react.element"),r=v("react.portal"),n=v("react.fragment"),c=v("react.strict_mode"),d=v("react.profiler"),o=v("react.provider"),i=v("react.context"),f=v("react.forward_ref"),s=v("react.suspense"),b=v("react.suspense_list"),l=v("react.memo"),u=v("react.lazy"),h=v("react.block"),p=v("react.server.block"),x=v("react.fundamental"),m=v("react.debug_trace_mode"),g=v("react.legacy_hidden")}function y(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case n:case d:case c:case s:case b:return e;default:switch(e=e&&e.$$typeof){case i:case f:case u:case l:case o:return e;default:return t}}case r:return t}}}},34090:(e,t,a)=>{"use strict";a(25638)},61138:(e,t,a)=>{"use strict";t.X4=s;var r=a(54636);function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),a)}function c(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),a=e.match(t);return a&&1===a[0].length&&(a=a.map((function(e){return e+e}))),a?"rgb".concat(4===a.length?"a":"","(").concat(a.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function d(e){var t=(e=o(e)).values,a=t[0],r=t[1]/100,n=t[2]/100,c=r*Math.min(n,1-n),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+a/30)%12;return n-c*Math.max(Math.min(t-3,9-t,1),-1)},f="rgb",s=[Math.round(255*d(0)),Math.round(255*d(8)),Math.round(255*d(4))];return"hsla"===e.type&&(f+="a",s.push(t[3])),i({type:f,values:s})}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(c(e));var t=e.indexOf("("),a=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(a))throw new Error((0,r.formatMuiErrorMessage)(3,e));var n=e.substring(t+1,e.length-1).split(",");return{type:a,values:n=n.map((function(e){return parseFloat(e)}))}}function i(e){var t=e.type,a=e.values;return-1!==t.indexOf("rgb")?a=a.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(a[1]="".concat(a[1],"%"),a[2]="".concat(a[2],"%")),"".concat(t,"(").concat(a.join(", "),")")}function f(e){var t="hsl"===(e=o(e)).type?o(d(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function s(e,t){return e=o(e),t=n(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,i(e)}function b(e,t){if(e=o(e),t=n(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var a=0;a<3;a+=1)e.values[a]*=1-t;return i(e)}function l(e,t){if(e=o(e),t=n(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var a=0;a<3;a+=1)e.values[a]+=(255-e.values[a])*t;return i(e)}},78320:(e,t,a)=>{"use strict";var r=a(24994),n=a(6305);t.A=void 0;var c=n(a(65043)),d=(0,r(a(59846)).default)(c.createElement("path",{d:"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z"}),"ArrowForwardIos");t.A=d},98945:(e,t,a)=>{"use strict";var r=a(24994),n=a(6305);t.A=void 0;var c=n(a(65043)),d=(0,r(a(59846)).default)(c.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");t.A=d},59846:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=a(99081)},659:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});const r="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__"},11978:(e,t,a)=>{"use strict";function r(e){var t=e.theme,a=e.name,r=e.props;if(!t||!t.props||!t.props[a])return r;var n,c=t.props[a];for(n in c)void 0===r[n]&&(r[n]=c[n]);return r}a.d(t,{A:()=>r})},35313:(e,t,a)=>{"use strict";a.d(t,{A:()=>ia});var r=a(80045),n=a(58168),c=a(65043),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};const o="object"===("undefined"===typeof window?"undefined":d(window))&&"object"===("undefined"===typeof document?"undefined":d(document))&&9===document.nodeType;var i=a(92901),f=a(77387),s=a(9417),b=a(98587),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 t={};for(var a in e)t[a]=u(e[a]);return t}function h(e,t,a){void 0===e&&(e="unnamed");var r=a.jss,n=u(t),c=r.plugins.onCreateRule(e,n,a);return c||(e[0],null)}var p=function(e,t){for(var a="",r=0;r<+~=|^:(),"'`\s])/g,w="undefined"!==typeof CSS&&CSS.escape,k=function(e){return w?w(e):e.replace(y,"\\$1")},I=function(){function e(e,t,a){this.type="style",this.isProcessed=!1;var r=a.sheet,n=a.Renderer;this.key=e,this.options=a,this.style=t,r?this.renderer=r.renderer:n&&(this.renderer=new n)}return e.prototype.prop=function(e,t,a){if(void 0===t)return this.style[e];var r=!!a&&a.force;if(!r&&this.style[e]===t)return this;var n=t;a&&!1===a.process||(n=this.options.jss.plugins.onChangeValue(t,e,this));var c=null==n||!1===n,d=e in this.style;if(c&&!d&&!r)return this;var o=c&&d;if(o?delete this.style[e]:this.style[e]=n,this.renderable&&this.renderer)return o?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,n),this;var i=this.options.sheet;return i&&i.attached,this},e}(),_=function(e){function t(t,a,r){var n;n=e.call(this,t,a,r)||this;var c=r.selector,d=r.scoped,o=r.sheet,i=r.generateId;return c?n.selectorText=c:!1!==d&&(n.id=i((0,s.A)((0,s.A)(n)),o),n.selectorText="."+k(n.id)),n}(0,f.A)(t,e);var a=t.prototype;return a.applyTo=function(e){var t=this.renderer;if(t){var a=this.toJSON();for(var r in a)t.setProperty(e,r,a[r])}return this},a.toJSON=function(){var e={};for(var t in this.style){var a=this.style[t];"object"!==typeof a?e[t]=a:Array.isArray(a)&&(e[t]=x(a))}return e},a.toString=function(e){var t=this.options.sheet,a=!!t&&t.options.link?(0,n.A)({},e,{allowEmpty:!0}):e;return v(this.selectorText,this.style,a)},(0,i.A)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,a=this.renderable;if(a&&t)t.setSelector(a,e)||t.replaceRule(a,this)}},get:function(){return this.selectorText}}]),t}(I),A={onCreateRule:function(e,t,a){return"@"===e[0]||a.parent&&"keyframes"===a.parent.type?null:new _(e,t,a)}},E={indent:1,children:!0},S=/@([\w-]+)/,N=function(){function e(e,t,a){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(S);for(var c in this.at=r?r[1]:"unknown",this.query=a.name||"@"+this.at,this.options=a,this.rules=new Q((0,n.A)({},a,{parent:this})),t)this.rules.add(c,t[c]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,a){var r=this.rules.add(e,t,a);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,a){var r=this.rules.replace(e,t,a);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=E);var t=m(e).linebreak;if(null==e.indent&&(e.indent=E.indent),null==e.children&&(e.children=E.children),!1===e.children)return this.query+" {}";var a=this.rules.toString(e);return a?this.query+" {"+t+a+t+"}":""},e}(),M=/@container|@media|@supports\s+/,H={onCreateRule:function(e,t,a){return M.test(e)?new N(e,t,a):null}},T={indent:1,children:!0},P=/@keyframes\s+([\w-]+)/,R=function(){function e(e,t,a){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=a;var c=a.scoped,d=a.sheet,o=a.generateId;for(var i in this.id=!1===c?this.name:k(o(this,d)),this.rules=new Q((0,n.A)({},a,{parent:this})),t)this.rules.add(i,t[i],(0,n.A)({},a,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=T);var t=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 a=this.rules.toString(e);return a&&(a=""+t+a+t),this.at+" "+this.id+" {"+a+"}"},e}(),C=/@keyframes\s+/,O=/\$([\w-]+)/g,D=function(e,t){return"string"===typeof e?e.replace(O,(function(e,a){return a in t?t[a]:e})):e},B=function(e,t,a){var r=e[t],n=D(r,a);n!==r&&(e[t]=n)},L={onCreateRule:function(e,t,a){return"string"===typeof e&&C.test(e)?new R(e,t,a):null},onProcessStyle:function(e,t,a){return"style"===t.type&&a?("animation-name"in e&&B(e,"animation-name",a.keyframes),"animation"in e&&B(e,"animation",a.keyframes),e):e},onChangeValue:function(e,t,a){var r=a.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return D(e,r.keyframes);default:return e}}},j=function(e){function t(){return e.apply(this,arguments)||this}return(0,f.A)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,a=!!t&&t.options.link?(0,n.A)({},e,{allowEmpty:!0}):e;return v(this.key,this.style,a)},t}(I),U={onCreateRule:function(e,t,a){return a.parent&&"keyframes"===a.parent.type?new j(e,t,a):null}},F=function(){function e(e,t,a){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=a}return e.prototype.toString=function(e){var t=m(e).linebreak;if(Array.isArray(this.style)){for(var a="",r=0;r=this.index)t.push(e);else for(var r=0;ra)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,a=t.attached,r=(0,b.A)(t,["attached"]),n=m(r).linebreak,c="",d=0;d-1?r.substr(0,n-1):r;e.style.setProperty(t,c,n>-1?"important":"")}}catch(d){return!1}return!0},se=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(a){}},be=function(e,t){return e.selectorText=t,e.selectorText===t},le=oe((function(){return document.querySelector("head")}));function ue(e){var t=ae.registry;if(t.length>0){var a=function(e,t){for(var a=0;at.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(a&&a.renderer)return{parent:a.renderer.element.parentNode,node:a.renderer.element};if(a=function(e,t){for(var a=e.length-1;a>=0;a--){var r=e[a];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),a&&a.renderer)return{parent:a.renderer.element.parentNode,node:a.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var n=function(e){for(var t=le(),a=0;aa?a:t},me=function(){function e(e){this.getPropertyValue=ie,this.setProperty=fe,this.removeProperty=se,this.setSelector=be,this.hasInsertedRules=!1,this.cssRules=[],e&&ae.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},a=t.media,r=t.meta,n=t.element;this.element=n||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),a&&this.element.setAttribute("media",a),r&&this.element.setAttribute("data-meta",r);var c=he();c&&this.element.setAttribute("nonce",c)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var a=t.insertionPoint,r=ue(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(a&&"number"===typeof a.nodeType){var n=a,c=n.parentNode;c&&c.insertBefore(e,n.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())}},t.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")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var a=0;a-1){var n=Ot[e];if(!Array.isArray(n))return ut.js+vt(n)in t&&ut.css+n;if(!r)return!1;for(var c=0;ct?1:-1:e.length-t.length};return{onProcessStyle:function(t,a){if("style"!==a.type)return t;for(var r={},n=Object.keys(t).sort(e),c=0;c0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,a=void 0!==t&&t,r=e.productionPrefix,n=void 0===r?"jss":r,c=e.seed,d=void 0===c?"":c,o=""===d?"":"".concat(d,"-"),i=0,f=function(){return i+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!a){if(-1!==Ne.indexOf(e.key))return"Mui-".concat(e.key);var c="".concat(o).concat(r,"-").concat(e.key);return t.options.theme[Se.A]&&""===d?"".concat(c,"-").concat(f()):c}return"".concat(o).concat(n).concat(f())}}(),aa={disableGeneration:!1,generateClassName:ta,jss:ea,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},ra=c.createContext(aa);var na=-1e9;var ca=a(73806);const da={};function oa(e,t){var a=e.state,r=e.theme,c=e.stylesOptions,d=e.stylesCreator,o=e.name;if(!c.disableGeneration){var i=Ae.get(c.sheetsManager,d,r);i||(i={refs:0,staticSheet:null,dynamicStyles:null},Ae.set(c.sheetsManager,d,r,i));var f=(0,n.A)({},d.options,c,{theme:r,flip:"boolean"===typeof c.flip?c.flip:"rtl"===r.direction});f.generateId=f.serverGenerateClassName||f.generateClassName;var s=c.sheetsRegistry;if(0===i.refs){var b;c.sheetsCache&&(b=Ae.get(c.sheetsCache,d,r));var l=d.create(r,o);b||((b=c.jss.createStyleSheet(l,(0,n.A)({link:!1},f))).attach(),c.sheetsCache&&Ae.set(c.sheetsCache,d,r,b)),s&&s.add(b),i.staticSheet=b,i.dynamicStyles=ke(l)}if(i.dynamicStyles){var u=c.jss.createStyleSheet(i.dynamicStyles,(0,n.A)({link:!0},f));u.update(t),u.attach(),a.dynamicSheet=u,a.classes=(0,Ie.A)({baseClasses:i.staticSheet.classes,newClasses:u.classes}),s&&s.add(u)}else a.classes=i.staticSheet.classes;i.refs+=1}}function ia(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.name,d=t.classNamePrefix,o=t.Component,i=t.defaultTheme,f=void 0===i?da:i,s=(0,r.A)(t,["name","classNamePrefix","Component","defaultTheme"]),b=function(e){var t="function"===typeof e;return{create:function(a,r){var c;try{c=t?e(a):e}catch(i){throw i}if(!r||!a.overrides||!a.overrides[r])return c;var d=a.overrides[r],o=(0,n.A)({},c);return Object.keys(d).forEach((function(e){o[e]=(0,ca.A)(o[e],d[e])})),o},options:{}}}(e),l=a||d||"makeStyles";b.options={index:na+=1,name:a,meta:l,classNamePrefix:l};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Ee.A)()||f,r=(0,n.A)({},c.useContext(ra),s),d=c.useRef(),i=c.useRef();!function(e,t){var a,r=c.useRef([]),n=c.useMemo((function(){return{}}),t);r.current!==n&&(r.current=n,a=e()),c.useEffect((function(){return function(){a&&a()}}),[n])}((function(){var n={name:a,state:{},stylesCreator:b,stylesOptions:r,theme:t};return oa(n,e),i.current=!1,d.current=n,function(){!function(e){var t=e.state,a=e.theme,r=e.stylesOptions,n=e.stylesCreator;if(!r.disableGeneration){var c=Ae.get(r.sheetsManager,n,a);c.refs-=1;var d=r.sheetsRegistry;0===c.refs&&(Ae.delete(r.sheetsManager,n,a),r.jss.removeStyleSheet(c.staticSheet),d&&d.remove(c.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),d&&d.remove(t.dynamicSheet))}}(n)}}),[t,b]),c.useEffect((function(){i.current&&function(e,t){var a=e.state;a.dynamicSheet&&a.dynamicSheet.update(t)}(d.current,e),i.current=!0}));var l=function(e,t,a){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var n=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,n=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,n=!0),n&&(r.cacheClasses.value=(0,Ie.A)({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:a})),r.cacheClasses.value}(d.current,e.classes,o);return l}}},42652:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(58168);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,a=e.newClasses;e.Component;if(!a)return t;var n=(0,r.A)({},t);return Object.keys(a).forEach((function(e){a[e]&&(n[e]="".concat(t[e]," ").concat(a[e]))})),n}},29184:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});const r=a(65043).createContext(null)},23052:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var r=a(65043),n=a(29184);function c(){return r.useContext(n.A)}},80498:(e,t,a)=>{"use strict";a.d(t,{N:()=>d});var r=a(82284),n={xs:0,sm:600,md:960,lg:1280,xl:1920},c={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(n[e],"px)")}};function d(e,t,a){if(Array.isArray(t)){var n=e.theme.breakpoints||c;return t.reduce((function(e,r,c){return e[n.up(n.keys[c])]=a(t[c]),e}),{})}if("object"===(0,r.A)(t)){var d=e.theme.breakpoints||c;return Object.keys(t).reduce((function(e,r){return e[d.up(r)]=a(t[r]),e}),{})}return a(t)}},85714:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(73806);const n=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},55995:(e,t,a)=>{"use strict";a.d(t,{L:()=>b,A:()=>h});var r=a(5544),n=a(80498),c=a(85714);var d={m:"margin",p:"padding"},o={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},i={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},f=function(e){var t={};return function(a){return void 0===t[a]&&(t[a]=e(a)),t[a]}}((function(e){if(e.length>2){if(!i[e])return[e];e=i[e]}var t=e.split(""),a=(0,r.A)(t,2),n=a[0],c=a[1],f=d[n],s=o[c]||"";return Array.isArray(s)?s.map((function(e){return f+e})):[f+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 t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function l(e,t){return function(a){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t||null==t)return t;var a=e(Math.abs(t));return t>=0?a:"number"===typeof a?-a:"-".concat(a)}(t,a),e}),{})}}function u(e){var t=b(e.theme);return Object.keys(e).map((function(a){if(-1===s.indexOf(a))return null;var r=l(f(a),t),c=e[a];return(0,n.N)(e,c,r)})).reduce(c.A,{})}u.propTypes={},u.filterProps=s;const h=u},73806:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var r=a(58168),n=a(82284);function c(e){return e&&"object"===(0,n.A)(e)&&e.constructor===Object}function d(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},n=a.clone?(0,r.A)({},e):e;return c(e)&&c(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(c(t[r])&&r in e?n[r]=d(e[r],t[r],a):n[r]=t[r])})),n}},38565:(e,t,a)=>{"use strict";function r(e){for(var t="https://mui.com/production-error/?code="+e,a=1;ar})},54636:(e,t,a)=>{"use strict";function r(e,t){return function(){return null}}a.r(t),a.d(t,{HTMLElementType:()=>g,chainPropTypes:()=>r,deepmerge:()=>n.A,elementAcceptingRef:()=>i,elementTypeAcceptingRef:()=>f,exactProp:()=>s,formatMuiErrorMessage:()=>b.A,getDisplayName:()=>m,ponyfillGlobal:()=>v,refType:()=>y});var n=a(73806),c=a(65173),d=a.n(c);var o=(d().element,function(){return null});o.isRequired=(d().element.isRequired,function(){return null});const i=o;const f=(c.elementType,function(){return null});a(64467),a(58168);function s(e){return e}var b=a(38565),l=a(82284),u=a(9926),h=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||function(e){var t="".concat(e).match(h);return t&&t[1]||""}(e)||t}function x(e,t,a){var r=p(t);return e.displayName||(""!==r?"".concat(a,"(").concat(r,")"):a)}function m(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return p(e,"Component");if("object"===(0,l.A)(e))switch(e.$$typeof){case u.ForwardRef:return x(e,e.render,"ForwardRef");case u.Memo:return x(e,e.type,"memo");default:return}}}function g(e,t,a,r,n){return null}const v="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();const y=d().oneOfType([d().func,d().object])},5866:(e,t)=>{"use strict";var a=60103,r=60106,n=60107,c=60108,d=60114,o=60109,i=60110,f=60112,s=60113,b=60120,l=60115,u=60116,h=60121,p=60122,x=60117,m=60129,g=60131;if("function"===typeof Symbol&&Symbol.for){var v=Symbol.for;a=v("react.element"),r=v("react.portal"),n=v("react.fragment"),c=v("react.strict_mode"),d=v("react.profiler"),o=v("react.provider"),i=v("react.context"),f=v("react.forward_ref"),s=v("react.suspense"),b=v("react.suspense_list"),l=v("react.memo"),u=v("react.lazy"),h=v("react.block"),p=v("react.server.block"),x=v("react.fundamental"),m=v("react.debug_trace_mode"),g=v("react.legacy_hidden")}function y(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case n:case d:case c:case s:case b:return e;default:switch(e=e&&e.$$typeof){case i:case f:case u:case l:case o:return e;default:return t}}case r:return t}}}var w=f,k=n,I=u,_=l,A=r,E=d,S=c,N=s;t.ForwardRef=w,t.Memo=_},9926:(e,t,a)=>{"use strict";e.exports=a(5866)},26785:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(17053);function n(e,t,a){return void 0===t&&(t=new Uint8Array(2)),void 0===a&&(a=0),t[a+0]=e>>>8,t[a+1]=e>>>0,t}function c(e,t,a){return void 0===t&&(t=new Uint8Array(2)),void 0===a&&(a=0),t[a+0]=e>>>0,t[a+1]=e>>>8,t}function d(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function o(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function i(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function f(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function s(e,t,a){return void 0===t&&(t=new Uint8Array(4)),void 0===a&&(a=0),t[a+0]=e>>>24,t[a+1]=e>>>16,t[a+2]=e>>>8,t[a+3]=e>>>0,t}function b(e,t,a){return void 0===t&&(t=new Uint8Array(4)),void 0===a&&(a=0),t[a+0]=e>>>0,t[a+1]=e>>>8,t[a+2]=e>>>16,t[a+3]=e>>>24,t}function l(e,t,a){return void 0===t&&(t=new Uint8Array(8)),void 0===a&&(a=0),s(e/4294967296>>>0,t,a),s(e>>>0,t,a+4),t}function u(e,t,a){return void 0===t&&(t=new Uint8Array(8)),void 0===a&&(a=0),b(e>>>0,t,a),b(e/4294967296>>>0,t,a+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=n,t.writeInt16BE=n,t.writeUint16LE=c,t.writeInt16LE=c,t.readInt32BE=d,t.readUint32BE=o,t.readInt32LE=i,t.readUint32LE=f,t.writeUint32BE=s,t.writeInt32BE=s,t.writeUint32LE=b,t.writeInt32LE=b,t.readInt64BE=function(e,t){void 0===t&&(t=0);var a=d(e,t),r=d(e,t+4);return 4294967296*a+r-4294967296*(r>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*o(e,t)+o(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var a=i(e,t);return 4294967296*i(e,t+4)+a-4294967296*(a>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var a=f(e,t);return 4294967296*f(e,t+4)+a},t.writeUint64BE=l,t.writeInt64BE=l,t.writeUint64LE=u,t.writeInt64LE=u,t.readUintBE=function(e,t,a){if(void 0===a&&(a=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-a)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,n=1,c=e/8+a-1;c>=a;c--)r+=t[c]*n,n*=256;return r},t.readUintLE=function(e,t,a){if(void 0===a&&(a=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-a)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,n=1,c=a;c=n;d--)a[d]=t/c&255,c*=256;return a},t.writeUintLE=function(e,t,a,n){if(void 0===a&&(a=new Uint8Array(e/8)),void 0===n&&(n=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var c=1,d=n;d{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(26785),n=a(56537),c=20;function d(e,t,a){for(var n=1634760805,d=857760878,o=2036477234,i=1797285236,f=a[3]<<24|a[2]<<16|a[1]<<8|a[0],s=a[7]<<24|a[6]<<16|a[5]<<8|a[4],b=a[11]<<24|a[10]<<16|a[9]<<8|a[8],l=a[15]<<24|a[14]<<16|a[13]<<8|a[12],u=a[19]<<24|a[18]<<16|a[17]<<8|a[16],h=a[23]<<24|a[22]<<16|a[21]<<8|a[20],p=a[27]<<24|a[26]<<16|a[25]<<8|a[24],x=a[31]<<24|a[30]<<16|a[29]<<8|a[28],m=t[3]<<24|t[2]<<16|t[1]<<8|t[0],g=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],y=t[15]<<24|t[14]<<16|t[13]<<8|t[12],w=n,k=d,I=o,_=i,A=f,E=s,S=b,N=l,M=u,H=h,T=p,P=x,R=m,C=g,O=v,D=y,B=0;B>>16|R<<16)|0)>>>20|A<<12,E=(E^=H=H+(C=(C^=k=k+E|0)>>>16|C<<16)|0)>>>20|E<<12,S=(S^=T=T+(O=(O^=I=I+S|0)>>>16|O<<16)|0)>>>20|S<<12,N=(N^=P=P+(D=(D^=_=_+N|0)>>>16|D<<16)|0)>>>20|N<<12,S=(S^=T=T+(O=(O^=I=I+S|0)>>>24|O<<8)|0)>>>25|S<<7,N=(N^=P=P+(D=(D^=_=_+N|0)>>>24|D<<8)|0)>>>25|N<<7,E=(E^=H=H+(C=(C^=k=k+E|0)>>>24|C<<8)|0)>>>25|E<<7,A=(A^=M=M+(R=(R^=w=w+A|0)>>>24|R<<8)|0)>>>25|A<<7,E=(E^=T=T+(D=(D^=w=w+E|0)>>>16|D<<16)|0)>>>20|E<<12,S=(S^=P=P+(R=(R^=k=k+S|0)>>>16|R<<16)|0)>>>20|S<<12,N=(N^=M=M+(C=(C^=I=I+N|0)>>>16|C<<16)|0)>>>20|N<<12,A=(A^=H=H+(O=(O^=_=_+A|0)>>>16|O<<16)|0)>>>20|A<<12,N=(N^=M=M+(C=(C^=I=I+N|0)>>>24|C<<8)|0)>>>25|N<<7,A=(A^=H=H+(O=(O^=_=_+A|0)>>>24|O<<8)|0)>>>25|A<<7,S=(S^=P=P+(R=(R^=k=k+S|0)>>>24|R<<8)|0)>>>25|S<<7,E=(E^=T=T+(D=(D^=w=w+E|0)>>>24|D<<8)|0)>>>25|E<<7;r.writeUint32LE(w+n|0,e,0),r.writeUint32LE(k+d|0,e,4),r.writeUint32LE(I+o|0,e,8),r.writeUint32LE(_+i|0,e,12),r.writeUint32LE(A+f|0,e,16),r.writeUint32LE(E+s|0,e,20),r.writeUint32LE(S+b|0,e,24),r.writeUint32LE(N+l|0,e,28),r.writeUint32LE(M+u|0,e,32),r.writeUint32LE(H+h|0,e,36),r.writeUint32LE(T+p|0,e,40),r.writeUint32LE(P+x|0,e,44),r.writeUint32LE(R+m|0,e,48),r.writeUint32LE(C+g|0,e,52),r.writeUint32LE(O+v|0,e,56),r.writeUint32LE(D+y|0,e,60)}function o(e,t,a,r,c){if(void 0===c&&(c=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}t.streamXOR=o,t.stream=function(e,t,a,r){return void 0===r&&(r=0),n.wipe(a),o(e,t,a,a,r)}},58953:(e,t,a)=>{"use strict";var r=a(44491),n=a(56657),c=a(56537),d=a(26785),o=a(60825);t.J4=32,t.PX=12,t.iW=16;var i=new Uint8Array(16),f=function(){function e(e){if(this.nonceLength=t.PX,this.tagLength=t.iW,e.length!==t.J4)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,t,a,n){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 i,f=t.length+this.tagLength;if(n){if(n.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");i=n}else i=new Uint8Array(f);return r.streamXOR(this._key,d,t,i,4),this._authenticate(i.subarray(i.length-this.tagLength,i.length),o,i.subarray(0,i.length-this.tagLength),a),c.wipe(d),i},e.prototype.open=function(e,t,a,n){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(t.length0&&o.update(i.subarray(r.length%16))),o.update(a),a.length%16>0&&o.update(i.subarray(a.length%16));var f=new Uint8Array(8);r&&d.writeUint64LE(r.length,f),o.update(f),d.writeUint64LE(a.length,f),o.update(f);for(var s=o.digest(),b=0;b{"use strict";function a(e,t){if(e.length!==t.length)return 0;for(var a=0,r=0;r>>8}Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t,a){return~(e-1)&t|e-1&a},t.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},t.compare=a,t.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==a(e,t)}},43045:(e,t,a)=>{"use strict";t._S=t.K=t.TP=t.wE=t.Ee=void 0;const r=a(95473),n=a(70251),c=a(56537);function d(e){const t=new Float64Array(16);if(e)for(let a=0;a>16&1),a[t-1]&=65535;a[15]=r[15]-32767-(a[14]>>16&1);const e=a[15]>>16&1;a[14]&=65535,x(r,a,1-e)}for(let n=0;n<16;n++)e[2*n]=255&r[n],e[2*n+1]=r[n]>>8}function g(e,t){let a=0;for(let r=0;r<32;r++)a|=e[r]^t[r];return(1&a-1>>>8)-1}function v(e,t){const a=new Uint8Array(32),r=new Uint8Array(32);return m(a,e),m(r,t),g(a,r)}function y(e){const t=new Uint8Array(32);return m(t,e),1&t[0]}function w(e,t,a){for(let r=0;r<16;r++)e[r]=t[r]+a[r]}function k(e,t,a){for(let r=0;r<16;r++)e[r]=t[r]-a[r]}function I(e,t,a){let r,n,c=0,d=0,o=0,i=0,f=0,s=0,b=0,l=0,u=0,h=0,p=0,x=0,m=0,g=0,v=0,y=0,w=0,k=0,I=0,_=0,A=0,E=0,S=0,N=0,M=0,H=0,T=0,P=0,R=0,C=0,O=0,D=a[0],B=a[1],L=a[2],j=a[3],U=a[4],F=a[5],z=a[6],q=a[7],W=a[8],V=a[9],K=a[10],G=a[11],Y=a[12],J=a[13],X=a[14],Z=a[15];r=t[0],c+=r*D,d+=r*B,o+=r*L,i+=r*j,f+=r*U,s+=r*F,b+=r*z,l+=r*q,u+=r*W,h+=r*V,p+=r*K,x+=r*G,m+=r*Y,g+=r*J,v+=r*X,y+=r*Z,r=t[1],d+=r*D,o+=r*B,i+=r*L,f+=r*j,s+=r*U,b+=r*F,l+=r*z,u+=r*q,h+=r*W,p+=r*V,x+=r*K,m+=r*G,g+=r*Y,v+=r*J,y+=r*X,w+=r*Z,r=t[2],o+=r*D,i+=r*B,f+=r*L,s+=r*j,b+=r*U,l+=r*F,u+=r*z,h+=r*q,p+=r*W,x+=r*V,m+=r*K,g+=r*G,v+=r*Y,y+=r*J,w+=r*X,k+=r*Z,r=t[3],i+=r*D,f+=r*B,s+=r*L,b+=r*j,l+=r*U,u+=r*F,h+=r*z,p+=r*q,x+=r*W,m+=r*V,g+=r*K,v+=r*G,y+=r*Y,w+=r*J,k+=r*X,I+=r*Z,r=t[4],f+=r*D,s+=r*B,b+=r*L,l+=r*j,u+=r*U,h+=r*F,p+=r*z,x+=r*q,m+=r*W,g+=r*V,v+=r*K,y+=r*G,w+=r*Y,k+=r*J,I+=r*X,_+=r*Z,r=t[5],s+=r*D,b+=r*B,l+=r*L,u+=r*j,h+=r*U,p+=r*F,x+=r*z,m+=r*q,g+=r*W,v+=r*V,y+=r*K,w+=r*G,k+=r*Y,I+=r*J,_+=r*X,A+=r*Z,r=t[6],b+=r*D,l+=r*B,u+=r*L,h+=r*j,p+=r*U,x+=r*F,m+=r*z,g+=r*q,v+=r*W,y+=r*V,w+=r*K,k+=r*G,I+=r*Y,_+=r*J,A+=r*X,E+=r*Z,r=t[7],l+=r*D,u+=r*B,h+=r*L,p+=r*j,x+=r*U,m+=r*F,g+=r*z,v+=r*q,y+=r*W,w+=r*V,k+=r*K,I+=r*G,_+=r*Y,A+=r*J,E+=r*X,S+=r*Z,r=t[8],u+=r*D,h+=r*B,p+=r*L,x+=r*j,m+=r*U,g+=r*F,v+=r*z,y+=r*q,w+=r*W,k+=r*V,I+=r*K,_+=r*G,A+=r*Y,E+=r*J,S+=r*X,N+=r*Z,r=t[9],h+=r*D,p+=r*B,x+=r*L,m+=r*j,g+=r*U,v+=r*F,y+=r*z,w+=r*q,k+=r*W,I+=r*V,_+=r*K,A+=r*G,E+=r*Y,S+=r*J,N+=r*X,M+=r*Z,r=t[10],p+=r*D,x+=r*B,m+=r*L,g+=r*j,v+=r*U,y+=r*F,w+=r*z,k+=r*q,I+=r*W,_+=r*V,A+=r*K,E+=r*G,S+=r*Y,N+=r*J,M+=r*X,H+=r*Z,r=t[11],x+=r*D,m+=r*B,g+=r*L,v+=r*j,y+=r*U,w+=r*F,k+=r*z,I+=r*q,_+=r*W,A+=r*V,E+=r*K,S+=r*G,N+=r*Y,M+=r*J,H+=r*X,T+=r*Z,r=t[12],m+=r*D,g+=r*B,v+=r*L,y+=r*j,w+=r*U,k+=r*F,I+=r*z,_+=r*q,A+=r*W,E+=r*V,S+=r*K,N+=r*G,M+=r*Y,H+=r*J,T+=r*X,P+=r*Z,r=t[13],g+=r*D,v+=r*B,y+=r*L,w+=r*j,k+=r*U,I+=r*F,_+=r*z,A+=r*q,E+=r*W,S+=r*V,N+=r*K,M+=r*G,H+=r*Y,T+=r*J,P+=r*X,R+=r*Z,r=t[14],v+=r*D,y+=r*B,w+=r*L,k+=r*j,I+=r*U,_+=r*F,A+=r*z,E+=r*q,S+=r*W,N+=r*V,M+=r*K,H+=r*G,T+=r*Y,P+=r*J,R+=r*X,C+=r*Z,r=t[15],y+=r*D,w+=r*B,k+=r*L,I+=r*j,_+=r*U,A+=r*F,E+=r*z,S+=r*q,N+=r*W,M+=r*V,H+=r*K,T+=r*G,P+=r*Y,R+=r*J,C+=r*X,O+=r*Z,c+=38*w,d+=38*k,o+=38*I,i+=38*_,f+=38*A,s+=38*E,b+=38*S,l+=38*N,u+=38*M,h+=38*H,p+=38*T,x+=38*P,m+=38*R,g+=38*C,v+=38*O,n=1,r=c+n+65535,n=Math.floor(r/65536),c=r-65536*n,r=d+n+65535,n=Math.floor(r/65536),d=r-65536*n,r=o+n+65535,n=Math.floor(r/65536),o=r-65536*n,r=i+n+65535,n=Math.floor(r/65536),i=r-65536*n,r=f+n+65535,n=Math.floor(r/65536),f=r-65536*n,r=s+n+65535,n=Math.floor(r/65536),s=r-65536*n,r=b+n+65535,n=Math.floor(r/65536),b=r-65536*n,r=l+n+65535,n=Math.floor(r/65536),l=r-65536*n,r=u+n+65535,n=Math.floor(r/65536),u=r-65536*n,r=h+n+65535,n=Math.floor(r/65536),h=r-65536*n,r=p+n+65535,n=Math.floor(r/65536),p=r-65536*n,r=x+n+65535,n=Math.floor(r/65536),x=r-65536*n,r=m+n+65535,n=Math.floor(r/65536),m=r-65536*n,r=g+n+65535,n=Math.floor(r/65536),g=r-65536*n,r=v+n+65535,n=Math.floor(r/65536),v=r-65536*n,r=y+n+65535,n=Math.floor(r/65536),y=r-65536*n,c+=n-1+37*(n-1),n=1,r=c+n+65535,n=Math.floor(r/65536),c=r-65536*n,r=d+n+65535,n=Math.floor(r/65536),d=r-65536*n,r=o+n+65535,n=Math.floor(r/65536),o=r-65536*n,r=i+n+65535,n=Math.floor(r/65536),i=r-65536*n,r=f+n+65535,n=Math.floor(r/65536),f=r-65536*n,r=s+n+65535,n=Math.floor(r/65536),s=r-65536*n,r=b+n+65535,n=Math.floor(r/65536),b=r-65536*n,r=l+n+65535,n=Math.floor(r/65536),l=r-65536*n,r=u+n+65535,n=Math.floor(r/65536),u=r-65536*n,r=h+n+65535,n=Math.floor(r/65536),h=r-65536*n,r=p+n+65535,n=Math.floor(r/65536),p=r-65536*n,r=x+n+65535,n=Math.floor(r/65536),x=r-65536*n,r=m+n+65535,n=Math.floor(r/65536),m=r-65536*n,r=g+n+65535,n=Math.floor(r/65536),g=r-65536*n,r=v+n+65535,n=Math.floor(r/65536),v=r-65536*n,r=y+n+65535,n=Math.floor(r/65536),y=r-65536*n,c+=n-1+37*(n-1),e[0]=c,e[1]=d,e[2]=o,e[3]=i,e[4]=f,e[5]=s,e[6]=b,e[7]=l,e[8]=u,e[9]=h,e[10]=p,e[11]=x,e[12]=m,e[13]=g,e[14]=v,e[15]=y}function _(e,t){I(e,t,t)}function A(e,t){const a=d();let r;for(r=0;r<16;r++)a[r]=t[r];for(r=253;r>=0;r--)_(a,a),2!==r&&4!==r&&I(a,a,t);for(r=0;r<16;r++)e[r]=a[r]}function E(e,t){const a=d(),r=d(),n=d(),c=d(),o=d(),i=d(),f=d(),b=d(),l=d();k(a,e[1],e[0]),k(l,t[1],t[0]),I(a,a,l),w(r,e[0],e[1]),w(l,t[0],t[1]),I(r,r,l),I(n,e[3],t[3]),I(n,n,s),I(c,e[2],t[2]),w(c,c,c),k(o,r,a),k(i,c,n),w(f,c,n),w(b,r,a),I(e[0],o,i),I(e[1],b,f),I(e[2],f,i),I(e[3],o,b)}function S(e,t,a){for(let r=0;r<4;r++)x(e[r],t[r],a)}function N(e,t){const a=d(),r=d(),n=d();A(n,t[2]),I(a,t[0],n),I(r,t[1],n),m(e,r),e[31]^=y(a)<<7}function M(e,t,a){h(e[0],o),h(e[1],i),h(e[2],i),h(e[3],o);for(let r=255;r>=0;--r){const n=a[r/8|0]>>(7&r)&1;S(e,t,n),E(t,e),E(e,e),S(e,t,n)}}function H(e,t){const a=[d(),d(),d(),d()];h(a[0],b),h(a[1],l),h(a[2],i),I(a[3],b,l),M(e,a,t)}function T(e){if(e.length!==t.TP)throw new Error("ed25519: seed must be ".concat(t.TP," bytes"));const a=(0,n.hash)(e);a[0]&=248,a[31]&=127,a[31]|=64;const r=new Uint8Array(32),c=[d(),d(),d(),d()];H(c,a),N(r,c);const o=new Uint8Array(64);return o.set(e),o.set(r,32),{publicKey:r,secretKey:o}}t.K=T;const 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 R(e,t){let a,r,n,c;for(r=63;r>=32;--r){for(a=0,n=r-32,c=r-12;n>4)*P[n],a=t[n]>>8,t[n]&=255;for(n=0;n<32;n++)t[n]-=a*P[n];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function C(e){const t=new Float64Array(64);for(let a=0;a<64;a++)t[a]=e[a];for(let a=0;a<64;a++)e[a]=0;R(e,t)}function O(e,t){const a=d(),r=d(),n=d(),c=d(),s=d(),b=d(),l=d();return h(e[2],i),function(e,t){for(let a=0;a<16;a++)e[a]=t[2*a]+(t[2*a+1]<<8);e[15]&=32767}(e[1],t),_(n,e[1]),I(c,n,f),k(n,n,e[2]),w(c,e[2],c),_(s,c),_(b,s),I(l,b,s),I(a,l,n),I(a,a,c),function(e,t){const a=d();let r;for(r=0;r<16;r++)a[r]=t[r];for(r=250;r>=0;r--)_(a,a),1!==r&&I(a,a,t);for(r=0;r<16;r++)e[r]=a[r]}(a,a),I(a,a,n),I(a,a,c),I(a,a,c),I(e[0],a,c),_(r,e[0]),I(r,r,c),v(r,n)&&I(e[0],e[0],u),_(r,e[0]),I(r,r,c),v(r,n)?-1:(y(e[0])===t[31]>>7&&k(e[0],o,e[0]),I(e[3],e[0],e[1]),0)}t._S=function(e,t){const a=new Float64Array(64),r=[d(),d(),d(),d()],c=(0,n.hash)(e.subarray(0,32));c[0]&=248,c[31]&=127,c[31]|=64;const o=new Uint8Array(64);o.set(c.subarray(32),32);const i=new n.SHA512;i.update(o.subarray(32)),i.update(t);const f=i.digest();i.clean(),C(f),H(r,f),N(o,r),i.reset(),i.update(o.subarray(0,32)),i.update(e.subarray(32)),i.update(t);const s=i.digest();C(s);for(let n=0;n<32;n++)a[n]=f[n];for(let n=0;n<32;n++)for(let e=0;e<32;e++)a[n+e]+=s[n]*c[e];return R(o.subarray(32),a),o}},98967:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSerializableHash=function(e){return"undefined"!==typeof e.saveState&&"undefined"!==typeof e.restoreState&&"undefined"!==typeof e.cleanSavedState}},10269:(e,t,a)=>{"use strict";var r=a(32553),n=a(56537),c=function(){function e(e,t,a,n){void 0===a&&(a=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=n;var c=r.hmac(this._hash,a,t);this._hmac=new r.HMAC(e,c),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 t=new Uint8Array(e),a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(98967),n=a(60825),c=a(56537),d=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var a=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(a).clean():a.set(t);for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var a=65535&e,r=65535&t;return a*r+((e>>>16&65535)*r+a*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},56657:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(60825),n=a(56537);t.DIGEST_LENGTH=16;var c=function(){function e(e){this.digestLength=t.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 a=e[0]|e[1]<<8;this._r[0]=8191&a;var r=e[2]|e[3]<<8;this._r[1]=8191&(a>>>13|r<<3);var n=e[4]|e[5]<<8;this._r[2]=7939&(r>>>10|n<<6);var c=e[6]|e[7]<<8;this._r[3]=8191&(n>>>7|c<<9);var d=e[8]|e[9]<<8;this._r[4]=255&(c>>>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 i=e[12]|e[13]<<8;this._r[7]=8065&(o>>>11|i<<5);var f=e[14]|e[15]<<8;this._r[8]=8191&(i>>>8|f<<8),this._r[9]=f>>>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,t,a){for(var r=this._fin?0:2048,n=this._h[0],c=this._h[1],d=this._h[2],o=this._h[3],i=this._h[4],f=this._h[5],s=this._h[6],b=this._h[7],l=this._h[8],u=this._h[9],h=this._r[0],p=this._r[1],x=this._r[2],m=this._r[3],g=this._r[4],v=this._r[5],y=this._r[6],w=this._r[7],k=this._r[8],I=this._r[9];a>=16;){var _=e[t+0]|e[t+1]<<8;n+=8191&_;var A=e[t+2]|e[t+3]<<8;c+=8191&(_>>>13|A<<3);var E=e[t+4]|e[t+5]<<8;d+=8191&(A>>>10|E<<6);var S=e[t+6]|e[t+7]<<8;o+=8191&(E>>>7|S<<9);var N=e[t+8]|e[t+9]<<8;i+=8191&(S>>>4|N<<12),f+=N>>>1&8191;var M=e[t+10]|e[t+11]<<8;s+=8191&(N>>>14|M<<2);var H=e[t+12]|e[t+13]<<8;b+=8191&(M>>>11|H<<5);var T=e[t+14]|e[t+15]<<8,P=0,R=P;R+=n*h,R+=c*(5*I),R+=d*(5*k),R+=o*(5*w),P=(R+=i*(5*y))>>>13,R&=8191,R+=f*(5*v),R+=s*(5*g),R+=b*(5*m),R+=(l+=8191&(H>>>8|T<<8))*(5*x);var C=P+=(R+=(u+=T>>>5|r)*(5*p))>>>13;C+=n*p,C+=c*h,C+=d*(5*I),C+=o*(5*k),P=(C+=i*(5*w))>>>13,C&=8191,C+=f*(5*y),C+=s*(5*v),C+=b*(5*g),C+=l*(5*m),P+=(C+=u*(5*x))>>>13,C&=8191;var O=P;O+=n*x,O+=c*p,O+=d*h,O+=o*(5*I),P=(O+=i*(5*k))>>>13,O&=8191,O+=f*(5*w),O+=s*(5*y),O+=b*(5*v),O+=l*(5*g);var D=P+=(O+=u*(5*m))>>>13;D+=n*m,D+=c*x,D+=d*p,D+=o*h,P=(D+=i*(5*I))>>>13,D&=8191,D+=f*(5*k),D+=s*(5*w),D+=b*(5*y),D+=l*(5*v);var B=P+=(D+=u*(5*g))>>>13;B+=n*g,B+=c*m,B+=d*x,B+=o*p,P=(B+=i*h)>>>13,B&=8191,B+=f*(5*I),B+=s*(5*k),B+=b*(5*w),B+=l*(5*y);var L=P+=(B+=u*(5*v))>>>13;L+=n*v,L+=c*g,L+=d*m,L+=o*x,P=(L+=i*p)>>>13,L&=8191,L+=f*h,L+=s*(5*I),L+=b*(5*k),L+=l*(5*w);var j=P+=(L+=u*(5*y))>>>13;j+=n*y,j+=c*v,j+=d*g,j+=o*m,P=(j+=i*x)>>>13,j&=8191,j+=f*p,j+=s*h,j+=b*(5*I),j+=l*(5*k);var U=P+=(j+=u*(5*w))>>>13;U+=n*w,U+=c*y,U+=d*v,U+=o*g,P=(U+=i*m)>>>13,U&=8191,U+=f*x,U+=s*p,U+=b*h,U+=l*(5*I);var F=P+=(U+=u*(5*k))>>>13;F+=n*k,F+=c*w,F+=d*y,F+=o*v,P=(F+=i*g)>>>13,F&=8191,F+=f*m,F+=s*x,F+=b*p,F+=l*h;var z=P+=(F+=u*(5*I))>>>13;z+=n*I,z+=c*k,z+=d*w,z+=o*y,P=(z+=i*v)>>>13,z&=8191,z+=f*g,z+=s*m,z+=b*x,z+=l*p,n=R=8191&(P=(P=((P+=(z+=u*h)>>>13)<<2)+P|0)+(R&=8191)|0),c=C+=P>>>=13,d=O&=8191,o=D&=8191,i=B&=8191,f=L&=8191,s=j&=8191,b=U&=8191,l=F&=8191,u=z&=8191,t+=16,a-=16}this._h[0]=n,this._h[1]=c,this._h[2]=d,this._h[3]=o,this._h[4]=i,this._h[5]=f,this._h[6]=s,this._h[7]=b,this._h[8]=l,this._h[9]=u},e.prototype.finish=function(e,t){void 0===t&&(t=0);var a,r,n,c,d=new Uint16Array(10);if(this._leftover){for(c=this._leftover,this._buffer[c++]=1;c<16;c++)this._buffer[c]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(a=this._h[1]>>>13,this._h[1]&=8191,c=2;c<10;c++)this._h[c]+=a,a=this._h[c]>>>13,this._h[c]&=8191;for(this._h[0]+=5*a,a=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=a,a=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=a,d[0]=this._h[0]+5,a=d[0]>>>13,d[0]&=8191,c=1;c<10;c++)d[c]=this._h[c]+a,a=d[c]>>>13,d[c]&=8191;for(d[9]-=8192,r=(1^a)-1,c=0;c<10;c++)d[c]&=r;for(r=~r,c=0;c<10;c++)this._h[c]=this._h[c]&r|d[c];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),n=this._h[0]+this._pad[0],this._h[0]=65535&n,c=1;c<8;c++)n=(this._h[c]+this._pad[c]|0)+(n>>>16)|0,this._h[c]=65535&n;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var t,a=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var n=0;n=16&&(t=r-r%16,this._blocks(e,a,t),a+=t,r-=t),r){for(n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const r=a(50015),n=a(26785),c=a(56537);function d(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaultRandomSource).randomBytes(e)}t.defaultRandomSource=new r.SystemRandomSource,t.randomBytes=d,t.randomUint32=function(){const e=d(4,arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.defaultRandomSource),a=(0,n.readUint32LE)(e);return(0,c.wipe)(e),a};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function i(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;if(a.length<2)throw new Error("randomString charset is too short");if(a.length>256)throw new Error("randomString charset is too long");let n="";const i=a.length,f=256-256%i;for(;e>0;){const t=d(Math.ceil(256*e/f),r);for(let r=0;r0;r++){const c=t[r];c1&&void 0!==arguments[1]?arguments[1]:o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.defaultRandomSource;return i(Math.ceil(e/(Math.log(a.length)/Math.LN2)),a,r)}},4968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0;t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!==typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const r=a(56537);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=a(99432);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const a=new Uint8Array(e);for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const r=a(4968),n=a(35786);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new r.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new n.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},20153:(e,t,a)=>{"use strict";var r=a(26785),n=a(56537);t.On=32,t.cS=64;var c=function(){function e(){this.digestLength=t.On,this.blockSize=t.cS,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var a=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[a++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(a=o(this._temp,this._state,e,a,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[a++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,a=this._bufferLength,n=t/536870912|0,c=t<<3,d=t%64<56?64:128;this._buffer[a]=128;for(var i=a+1;i0?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){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.aD=c;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,t,a,n,c){for(;c>=64;){for(var o=t[0],i=t[1],f=t[2],s=t[3],b=t[4],l=t[5],u=t[6],h=t[7],p=0;p<16;p++){var x=n+4*p;e[p]=r.readUint32BE(a,x)}for(p=16;p<64;p++){var m=e[p-2],g=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,v=((m=e[p-15])>>>7|m<<25)^(m>>>18|m<<14)^m>>>3;e[p]=(g+e[p-7]|0)+(v+e[p-16]|0)}for(p=0;p<64;p++){g=(((b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&l^~b&u)|0)+(h+(d[p]+e[p]|0)|0)|0,v=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&i^o&f^i&f)|0;h=u,u=l,l=b,b=s+g|0,s=f,f=i,i=o,o=g+v|0}t[0]+=o,t[1]+=i,t[2]+=f,t[3]+=s,t[4]+=b,t[5]+=l,t[6]+=u,t[7]+=h,n+=64,c-=64}return n}t.tW=function(e){var t=new c;t.update(e);var a=t.digest();return t.clean(),a}},70251:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(26785),n=a(56537);t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var c=function(){function e(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.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(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,a){if(void 0===a&&(a=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var r=0;if(this._bytesHashed+=a,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[r++],a--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(a>=this.blockSize&&(r=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,r,a),a%=this.blockSize);a>0;)this._buffer[this._bufferLength++]=e[r++],a--;return this},e.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,a=this._bufferLength,n=t/536870912|0,c=t<<3,d=t%128<112?128:256;this._buffer[a]=128;for(var i=a+1;i0?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){n.wipe(e.stateHi),n.wipe(e.stateLo),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();t.SHA512=c;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,t,a,n,c,o,i){for(var f,s,b,l,u,h,p,x,m=a[0],g=a[1],v=a[2],y=a[3],w=a[4],k=a[5],I=a[6],_=a[7],A=n[0],E=n[1],S=n[2],N=n[3],M=n[4],H=n[5],T=n[6],P=n[7];i>=128;){for(var R=0;R<16;R++){var C=8*R+o;e[R]=r.readUint32BE(c,C),t[R]=r.readUint32BE(c,C+4)}for(R=0;R<80;R++){var O,D,B=m,L=g,j=v,U=y,F=w,z=k,q=I,W=A,V=E,K=S,G=N,Y=M,J=H,X=T;if(u=65535&(s=P),h=s>>>16,p=65535&(f=_),x=f>>>16,u+=65535&(s=(M>>>14|w<<18)^(M>>>18|w<<14)^(w>>>9|M<<23)),h+=s>>>16,p+=65535&(f=(w>>>14|M<<18)^(w>>>18|M<<14)^(M>>>9|w<<23)),x+=f>>>16,u+=65535&(s=M&H^~M&T),h+=s>>>16,p+=65535&(f=w&k^~w&I),x+=f>>>16,f=d[2*R],u+=65535&(s=d[2*R+1]),h+=s>>>16,p+=65535&f,x+=f>>>16,f=e[R%16],h+=(s=t[R%16])>>>16,p+=65535&f,x+=f>>>16,p+=(h+=(u+=65535&s)>>>16)>>>16,u=65535&(s=l=65535&u|h<<16),h=s>>>16,p=65535&(f=b=65535&p|(x+=p>>>16)<<16),x=f>>>16,u+=65535&(s=(A>>>28|m<<4)^(m>>>2|A<<30)^(m>>>7|A<<25)),h+=s>>>16,p+=65535&(f=(m>>>28|A<<4)^(A>>>2|m<<30)^(A>>>7|m<<25)),x+=f>>>16,h+=(s=A&E^A&S^E&S)>>>16,p+=65535&(f=m&g^m&v^g&v),x+=f>>>16,O=65535&(p+=(h+=(u+=65535&s)>>>16)>>>16)|(x+=p>>>16)<<16,D=65535&u|h<<16,u=65535&(s=G),h=s>>>16,p=65535&(f=U),x=f>>>16,h+=(s=l)>>>16,p+=65535&(f=b),x+=f>>>16,g=B,v=L,y=j,w=U=65535&(p+=(h+=(u+=65535&s)>>>16)>>>16)|(x+=p>>>16)<<16,k=F,I=z,_=q,m=O,E=W,S=V,N=K,M=G=65535&u|h<<16,H=Y,T=J,P=X,A=D,R%16===15)for(C=0;C<16;C++)f=e[C],u=65535&(s=t[C]),h=s>>>16,p=65535&f,x=f>>>16,f=e[(C+9)%16],u+=65535&(s=t[(C+9)%16]),h+=s>>>16,p+=65535&f,x+=f>>>16,b=e[(C+1)%16],u+=65535&(s=((l=t[(C+1)%16])>>>1|b<<31)^(l>>>8|b<<24)^(l>>>7|b<<25)),h+=s>>>16,p+=65535&(f=(b>>>1|l<<31)^(b>>>8|l<<24)^b>>>7),x+=f>>>16,b=e[(C+14)%16],h+=(s=((l=t[(C+14)%16])>>>19|b<<13)^(b>>>29|l<<3)^(l>>>6|b<<26))>>>16,p+=65535&(f=(b>>>19|l<<13)^(l>>>29|b<<3)^b>>>6),x+=f>>>16,x+=(p+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,e[C]=65535&p|x<<16,t[C]=65535&u|h<<16}u=65535&(s=A),h=s>>>16,p=65535&(f=m),x=f>>>16,f=a[0],h+=(s=n[0])>>>16,p+=65535&f,x+=f>>>16,x+=(p+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,a[0]=m=65535&p|x<<16,n[0]=A=65535&u|h<<16,u=65535&(s=E),h=s>>>16,p=65535&(f=g),x=f>>>16,f=a[1],h+=(s=n[1])>>>16,p+=65535&f,x+=f>>>16,x+=(p+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,a[1]=g=65535&p|x<<16,n[1]=E=65535&u|h<<16,u=65535&(s=S),h=s>>>16,p=65535&(f=v),x=f>>>16,f=a[2],h+=(s=n[2])>>>16,p+=65535&f,x+=f>>>16,x+=(p+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,a[2]=v=65535&p|x<<16,n[2]=S=65535&u|h<<16,u=65535&(s=N),h=s>>>16,p=65535&(f=y),x=f>>>16,f=a[3],h+=(s=n[3])>>>16,p+=65535&f,x+=f>>>16,x+=(p+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,a[3]=y=65535&p|x<<16,n[3]=N=65535&u|h<<16,u=65535&(s=M),h=s>>>16,p=65535&(f=w),x=f>>>16,f=a[4],h+=(s=n[4])>>>16,p+=65535&f,x+=f>>>16,x+=(p+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,a[4]=w=65535&p|x<<16,n[4]=M=65535&u|h<<16,u=65535&(s=H),h=s>>>16,p=65535&(f=k),x=f>>>16,f=a[5],h+=(s=n[5])>>>16,p+=65535&f,x+=f>>>16,x+=(p+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,a[5]=k=65535&p|x<<16,n[5]=H=65535&u|h<<16,u=65535&(s=T),h=s>>>16,p=65535&(f=I),x=f>>>16,f=a[6],h+=(s=n[6])>>>16,p+=65535&f,x+=f>>>16,x+=(p+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,a[6]=I=65535&p|x<<16,n[6]=T=65535&u|h<<16,u=65535&(s=P),h=s>>>16,p=65535&(f=_),x=f>>>16,f=a[7],h+=(s=n[7])>>>16,p+=65535&f,x+=f>>>16,x+=(p+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,a[7]=_=65535&p|x<<16,n[7]=P=65535&u|h<<16,o+=128,i-=128}return o}t.hash=function(e){var t=new c;t.update(e);var a=t.digest();return t.clean(),a}},56537:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t{"use strict";t.Tc=t.TZ=t.wE=t.Xx=void 0;const r=a(95473),n=a(56537);function c(e){const t=new Float64Array(16);if(e)for(let a=0;a=0;--c){const e=a[c>>>3]>>>(7&c)&1;f(n,d,e),f(h,p,e),s(x,n,h),b(n,n,h),s(h,d,p),b(d,d,p),u(p,x),u(m,n),l(n,h,n),l(h,d,x),s(x,n,h),b(n,n,h),u(d,n),b(h,p,m),l(n,h,o),s(n,n,p),l(h,h,n),l(n,p,m),l(p,d,r),u(d,x),f(n,d,e),f(h,p,e)}for(let c=0;c<16;c++)r[c+16]=n[c],r[c+32]=h[c],r[c+48]=d[c],r[c+64]=p[c];const g=r.subarray(32),v=r.subarray(16);!function(e,t){const a=c();for(let r=0;r<16;r++)a[r]=t[r];for(let r=253;r>=0;r--)u(a,a),2!==r&&4!==r&&l(a,a,t);for(let r=0;r<16;r++)e[r]=a[r]}(g,g),l(v,v,g);const y=new Uint8Array(32);return function(e,t){const a=c(),r=c();for(let n=0;n<16;n++)r[n]=t[n];i(r),i(r),i(r);for(let n=0;n<2;n++){a[0]=r[0]-65517;for(let t=1;t<15;t++)a[t]=r[t]-65535-(a[t-1]>>16&1),a[t-1]&=65535;a[15]=r[15]-32767-(a[14]>>16&1);const e=a[15]>>16&1;a[14]&=65535,f(r,a,1-e)}for(let n=0;n<16;n++)e[2*n]=255&r[n],e[2*n+1]=r[n]>>8}(y,v),y}function p(e){return h(e,d)}function x(e){if(e.length!==t.wE)throw new Error("x25519: seed must be ".concat(t.wE," bytes"));const a=new Uint8Array(e);return{publicKey:p(a),secretKey:a}}t.TZ=function(e){const t=(0,r.randomBytes)(32,e),a=x(t);return(0,n.wipe)(t),a},t.Tc=function(e,a){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.length!==t.Xx)throw new Error("X25519: incorrect secret key length");if(a.length!==t.Xx)throw new Error("X25519: incorrect public key length");const n=h(e,a);if(r){let e=0;for(let t=0;t{"use strict";const r=a(20033)},48623:(e,t,a)=>{"use strict";const r=a(49104),n=a(95707),c=a(71289),d=a(10038),o=Symbol("encodeFragmentIdentifier");function i(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function f(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function s(e,t){return t.decode?n(e):e}function b(e){return Array.isArray(e)?e.sort():"object"===typeof e?b(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const a=function(e){let t;switch(e.arrayFormat){case"index":return(e,a,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=a):r[e]=a};case"bracket":return(e,a,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=[a]:r[e]=a};case"colon-list-separator":return(e,a,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=[a]:r[e]=a};case"comma":case"separator":return(t,a,r)=>{const n="string"===typeof a&&a.includes(e.arrayFormatSeparator),c="string"===typeof a&&!n&&s(a,e).includes(e.arrayFormatSeparator);a=c?s(a,e):a;const d=n||c?a.split(e.arrayFormatSeparator).map((t=>s(t,e))):null===a?a:s(a,e);r[t]=d};case"bracket-separator":return(t,a,r)=>{const n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n)return void(r[t]=a?s(a,e):a);const c=null===a?[]:a.split(e.arrayFormatSeparator).map((t=>s(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],c):r[t]=c};default:return(e,t,a)=>{void 0!==a[e]?a[e]=[].concat(a[e],t):a[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const n of e.split("&")){if(""===n)continue;let[e,d]=c(t.decode?n.replace(/\+/g," "):n,"=");d=void 0===d?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?d:s(d,t),a(s(e,t),d,r)}for(const n of Object.keys(r)){const e=r[n];if("object"===typeof e&&null!==e)for(const a of Object.keys(e))e[a]=h(e[a],t);else r[n]=h(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const a=r[t];return Boolean(a)&&"object"===typeof a&&!Array.isArray(a)?e[t]=b(a):e[t]=a,e}),Object.create(null))}t.extract=u,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const a=a=>{return t.skipNull&&(null===(r=e[a])||void 0===r)||t.skipEmptyString&&""===e[a];var r},r=function(e){switch(e.arrayFormat){case"index":return t=>(a,r)=>{const n=a.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),"[",n,"]"].join("")]:[...a,[f(t,e),"[",f(n,e),"]=",f(r,e)].join("")]};case"bracket":return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),"[]"].join("")]:[...a,[f(t,e),"[]=",f(r,e)].join("")];case"colon-list-separator":return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),":list="].join("")]:[...a,[f(t,e),":list=",f(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return a=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:(n=null===n?"":n,0===r.length?[[f(a,e),t,f(n,e)].join("")]:[[r,f(n,e)].join(e.arrayFormatSeparator)])}default:return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,f(t,e)]:[...a,[f(t,e),"=",f(r,e)].join("")]}}(t),n={};for(const d of Object.keys(e))a(d)||(n[d]=e[d]);const c=Object.keys(n);return!1!==t.sort&&c.sort(t.sort),c.map((a=>{const n=e[a];return void 0===n?"":null===n?f(a,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?f(a,t)+"[]":n.reduce(r(a),[]).join("&"):f(a,t)+"="+f(n,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[a,r]=c(e,"#");return Object.assign({url:a.split("?")[0]||"",query:p(u(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:s(r,t)}:{})},t.stringifyUrl=(e,a)=>{a=Object.assign({encode:!0,strict:!0,[o]:!0},a);const r=l(e.url).split("?")[0]||"",n=t.extract(e.url),c=t.parse(n,{sort:!1}),d=Object.assign(c,e.query);let i=t.stringify(d,a);i&&(i="?".concat(i));let s=function(e){let t="";const a=e.indexOf("#");return-1!==a&&(t=e.slice(a)),t}(e.url);return e.fragmentIdentifier&&(s="#".concat(a[o]?f(e.fragmentIdentifier,a):e.fragmentIdentifier)),"".concat(r).concat(i).concat(s)},t.pick=(e,a,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:n,query:c,fragmentIdentifier:i}=t.parseUrl(e,r);return t.stringifyUrl({url:n,query:d(c,a),fragmentIdentifier:i},r)},t.exclude=(e,a,r)=>{const n=Array.isArray(a)?e=>!a.includes(e):(e,t)=>!a(e,t);return t.pick(e,n,r)}},49104:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))},10364:(e,t,a)=>{"use strict";function r(){return(null===a.g||void 0===a.g?void 0:a.g.crypto)||(null===a.g||void 0===a.g?void 0:a.g.msCrypto)||{}}function n(){const e=r();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=r,t.getSubtleCrypto=n,t.isBrowserCryptoAvailable=function(){return!!r()&&!!n()}},96454:(e,t,a)=>{"use strict";var r=a(62285);function n(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function c(){return"undefined"!==typeof r&&"undefined"!==typeof r.versions&&"undefined"!==typeof r.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=n,t.isNode=c,t.isBrowser=function(){return!n()&&!c()}},8129:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=a(46613);r.__exportStar(a(10364),t),r.__exportStar(a(96454),t)},46613:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__assign:()=>c,__asyncDelegator:()=>y,__asyncGenerator:()=>v,__asyncValues:()=>w,__await:()=>g,__awaiter:()=>s,__classPrivateFieldGet:()=>A,__classPrivateFieldSet:()=>E,__createBinding:()=>l,__decorate:()=>o,__exportStar:()=>u,__extends:()=>n,__generator:()=>b,__importDefault:()=>_,__importStar:()=>I,__makeTemplateObject:()=>k,__metadata:()=>f,__param:()=>i,__read:()=>p,__rest:()=>d,__spread:()=>x,__spreadArrays:()=>m,__values:()=>h});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},r(e,t)};function n(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var c=function(){return c=Object.assign||function(e){for(var t,a=1,r=arguments.length;a=0;o--)(n=e[o])&&(d=(c<3?n(d):c>3?n(t,a,d):n(t,a))||d);return c>3&&d&&Object.defineProperty(t,a,d),d}function i(e,t){return function(a,r){t(a,r,e)}}function f(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function s(e,t,a,r){return new(a||(a=Promise))((function(n,c){function d(e){try{i(r.next(e))}catch(t){c(t)}}function o(e){try{i(r.throw(e))}catch(t){c(t)}}function i(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(d,o)}i((r=r.apply(e,t||[])).next())}))}function b(e,t){var a,r,n,c,d={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return c={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function o(c){return function(o){return function(c){if(a)throw new TypeError("Generator is already executing.");for(;d;)try{if(a=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return d.label++,{value:c[1],done:!1};case 5:d.label++,r=c[1],c=[0];continue;case 7:c=d.ops.pop(),d.trys.pop();continue;default:if(!(n=(n=d.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var a="function"===typeof Symbol&&e[Symbol.iterator];if(!a)return e;var r,n,c=a.call(e),d=[];try{for(;(void 0===t||t-- >0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d}function x(){for(var e=[],t=0;t1||o(e,t)}))})}function o(e,t){try{(a=n[e](t)).value instanceof g?Promise.resolve(a.value.v).then(i,f):s(c[0][2],a)}catch(r){s(c[0][3],r)}var a}function i(e){o("next",e)}function f(e){o("throw",e)}function s(e,t){e(t),c.shift(),c.length&&o(c[0][0],c[0][1])}}function y(e){var t,a;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,n){t[r]=e[r]?function(t){return(a=!a)?{value:g(e[r](t)),done:"return"===r}:n?n(t):t}:n}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(a){t[a]=e[a]&&function(t){return new Promise((function(r,n){(function(e,t,a,r){Promise.resolve(r).then((function(t){e({value:t,done:a})}),t)})(r,n,(t=e[a](t)).done,t.value)}))}}}function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function _(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function E(e,t,a){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,a),a}},54469:(e,t,a)=>{"use strict";const r=a(20033)},417:(e,t,a)=>{"use strict";const r=a(33094),n=a(95707),c=a(71289),d=a(10038),o=Symbol("encodeFragmentIdentifier");function i(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function f(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function s(e,t){return t.decode?n(e):e}function b(e){return Array.isArray(e)?e.sort():"object"===typeof e?b(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const a=function(e){let t;switch(e.arrayFormat){case"index":return(e,a,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=a):r[e]=a};case"bracket":return(e,a,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=[a]:r[e]=a};case"colon-list-separator":return(e,a,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=[a]:r[e]=a};case"comma":case"separator":return(t,a,r)=>{const n="string"===typeof a&&a.includes(e.arrayFormatSeparator),c="string"===typeof a&&!n&&s(a,e).includes(e.arrayFormatSeparator);a=c?s(a,e):a;const d=n||c?a.split(e.arrayFormatSeparator).map((t=>s(t,e))):null===a?a:s(a,e);r[t]=d};case"bracket-separator":return(t,a,r)=>{const n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n)return void(r[t]=a?s(a,e):a);const c=null===a?[]:a.split(e.arrayFormatSeparator).map((t=>s(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],c):r[t]=c};default:return(e,t,a)=>{void 0!==a[e]?a[e]=[].concat(a[e],t):a[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const n of e.split("&")){if(""===n)continue;let[e,d]=c(t.decode?n.replace(/\+/g," "):n,"=");d=void 0===d?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?d:s(d,t),a(s(e,t),d,r)}for(const n of Object.keys(r)){const e=r[n];if("object"===typeof e&&null!==e)for(const a of Object.keys(e))e[a]=h(e[a],t);else r[n]=h(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const a=r[t];return Boolean(a)&&"object"===typeof a&&!Array.isArray(a)?e[t]=b(a):e[t]=a,e}),Object.create(null))}t.extract=u,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const a=a=>{return t.skipNull&&(null===(r=e[a])||void 0===r)||t.skipEmptyString&&""===e[a];var r},r=function(e){switch(e.arrayFormat){case"index":return t=>(a,r)=>{const n=a.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),"[",n,"]"].join("")]:[...a,[f(t,e),"[",f(n,e),"]=",f(r,e)].join("")]};case"bracket":return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),"[]"].join("")]:[...a,[f(t,e),"[]=",f(r,e)].join("")];case"colon-list-separator":return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),":list="].join("")]:[...a,[f(t,e),":list=",f(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return a=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:(n=null===n?"":n,0===r.length?[[f(a,e),t,f(n,e)].join("")]:[[r,f(n,e)].join(e.arrayFormatSeparator)])}default:return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,f(t,e)]:[...a,[f(t,e),"=",f(r,e)].join("")]}}(t),n={};for(const d of Object.keys(e))a(d)||(n[d]=e[d]);const c=Object.keys(n);return!1!==t.sort&&c.sort(t.sort),c.map((a=>{const n=e[a];return void 0===n?"":null===n?f(a,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?f(a,t)+"[]":n.reduce(r(a),[]).join("&"):f(a,t)+"="+f(n,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[a,r]=c(e,"#");return Object.assign({url:a.split("?")[0]||"",query:p(u(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:s(r,t)}:{})},t.stringifyUrl=(e,a)=>{a=Object.assign({encode:!0,strict:!0,[o]:!0},a);const r=l(e.url).split("?")[0]||"",n=t.extract(e.url),c=t.parse(n,{sort:!1}),d=Object.assign(c,e.query);let i=t.stringify(d,a);i&&(i="?".concat(i));let s=function(e){let t="";const a=e.indexOf("#");return-1!==a&&(t=e.slice(a)),t}(e.url);return e.fragmentIdentifier&&(s="#".concat(a[o]?f(e.fragmentIdentifier,a):e.fragmentIdentifier)),"".concat(r).concat(i).concat(s)},t.pick=(e,a,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:n,query:c,fragmentIdentifier:i}=t.parseUrl(e,r);return t.stringifyUrl({url:n,query:d(c,a),fragmentIdentifier:i},r)},t.exclude=(e,a,r)=>{const n=Array.isArray(a)?e=>!a.includes(e):(e,t)=>!a(e,t);return t.pick(e,n,r)}},33094:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))},76526:(e,t,a)=>{"use strict";a.d(t,{A:()=>g,V:()=>g});var r=a(27284),n=a(6177),c=a.n(n),d=a(48661),o=a(10632),i=Object.defineProperty,f=Object.defineProperties,s=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,h=(e,t,a)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,p=(e,t)=>{for(var a in t||(t={}))l.call(t,a)&&h(e,a,t[a]);if(b)for(var a of b(t))u.call(t,a)&&h(e,a,t[a]);return e},x=(e,t)=>f(e,s(t));const m={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class g{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.url=e,this.disableProviderPing=t,this.events=new r.EventEmitter,this.isAvailable=!1,this.registering=!1,!(0,o.isHttpUrl)(e))throw new Error("Provided URL is not compatible with HTTP connection: ".concat(e));this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{const t=(0,d.h)(e),a=await(await c()(this.url,x(p({},m),{body:t}))).json();this.onPayload({data:a})}catch(t){this.onError(e.id,t)}}async register(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;if(!(0,o.isHttpUrl)(e))throw new Error("Provided URL is not compatible with HTTP connection: ".concat(e));if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=(0,d.h)({id:1,jsonrpc:"2.0",method:"test",params:[]});await c()(e,x(p({},m),{body:t}))}this.onOpen()}catch(t){const e=this.parseError(t);throw this.events.emit("register_error",e),this.onClose(),e}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?(0,d.j)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const a=this.parseError(t),r=a.message||a.toString(),n=(0,o.formatJsonRpcError)(e,r);this.events.emit("payload",n)}parseError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return(0,o.parseConnectionError)(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}},6177:function(e,t){var a="undefined"!==typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=a.DOMException}return e.prototype=a,new e}();!function(e){!function(t){var a="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,n="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),c="FormData"in e,d="ArrayBuffer"in e;if(d)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function s(e){return"string"!==typeof e&&(e=String(e)),e}function b(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function l(e){this.map={},e instanceof l?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function u(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,a){e.onload=function(){t(e.result)},e.onerror=function(){a(e.error)}}))}function p(e){var t=new FileReader,a=h(t);return t.readAsArrayBuffer(e),a}function x(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:n&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:c&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:a&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():d&&n&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=x(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):d&&(ArrayBuffer.prototype.isPrototypeOf(e)||i(e))?this._bodyArrayBuffer=x(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,a=h(t);return t.readAsText(e),a}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),a=new Array(t.length),r=0;r-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function y(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var a=e.split("="),r=a.shift().replace(/\+/g," "),n=a.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(n))}})),t}function w(e){var t=new l;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var a=e.split(":"),r=a.shift().trim();if(r){var n=a.join(":").trim();t.append(r,n)}})),t}function k(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new l(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},k.error=function(){var e=new k(null,{status:0,statusText:""});return e.type="error",e};var I=[301,302,303,307,308];k.redirect=function(e,t){if(-1===I.indexOf(t))throw new RangeError("Invalid status code");return new k(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(A){t.DOMException=function(e,t){this.message=e,this.name=t;var a=Error(e);this.stack=a.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function _(e,a){return new Promise((function(r,c){var d=new v(e,a);if(d.signal&&d.signal.aborted)return c(new t.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function i(){o.abort()}o.onload=function(){var e={status:o.status,statusText:o.statusText,headers:w(o.getAllResponseHeaders()||"")};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");var t="response"in o?o.response:o.responseText;r(new k(t,e))},o.onerror=function(){c(new TypeError("Network request failed"))},o.ontimeout=function(){c(new TypeError("Network request failed"))},o.onabort=function(){c(new t.DOMException("Aborted","AbortError"))},o.open(d.method,d.url,!0),"include"===d.credentials?o.withCredentials=!0:"omit"===d.credentials&&(o.withCredentials=!1),"responseType"in o&&n&&(o.responseType="blob"),d.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),d.signal&&(d.signal.addEventListener("abort",i),o.onreadystatechange=function(){4===o.readyState&&d.signal.removeEventListener("abort",i)}),o.send("undefined"===typeof d._bodyInit?null:d._bodyInit)}))}_.polyfill=!0,e.fetch||(e.fetch=_,e.Headers=l,e.Request=v,e.Response=k),t.Headers=l,t.Request=v,t.Response=k,t.fetch=_,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var n=r;(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},97312:(e,t,a)=>{"use strict";a.d(t,{F:()=>c});var r=a(27284),n=a(10632);class c extends n.IJsonRpcProvider{constructor(e){super(e),this.events=new r.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict((0,n.formatJsonRpcRequest)(e.method,e.params||[],e.id||(0,n.getBigIntRpcId)().toString()),t)}async requestStrict(e,t){return new Promise((async(a,r)=>{if(!this.connection.connected)try{await this.open()}catch(c){r(c)}this.events.on("".concat(e.id),(e=>{(0,n.isJsonRpcError)(e)?r(e.error):a(e.result)}));try{await this.connection.send(e,t)}catch(c){r(c)}}))}setConnection(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection}onPayload(e){this.events.emit("payload",e),(0,n.isJsonRpcResponse)(e)?this.events.emit("".concat(e.id),e):this.events.emit("message",{type:e.method,data:e.params})}onClose(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")}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",(e=>this.onPayload(e))),this.connection.on("close",(e=>this.onClose(e))),this.connection.on("error",(e=>this.events.emit("error",e))),this.connection.on("register_error",(e=>this.onClose())),this.hasRegisteredEventListeners=!0)}}},32116:(e,t,a)=>{"use strict";a.d(t,{Vc:()=>n,kF:()=>d});class r{}class n extends r{constructor(e){super()}}class c extends r{constructor(){super()}}class d extends c{constructor(e){super()}}},76765:(e,t,a)=>{"use strict";a.d(t,{Uf:()=>s,XW:()=>b,fO:()=>i,jf:()=>f,zR:()=>o});const r="PARSE_ERROR",n="INVALID_REQUEST",c="METHOD_NOT_FOUND",d="INVALID_PARAMS",o="INTERNAL_ERROR",i="SERVER_ERROR",f=[-32700,-32600,-32601,-32602,-32603],s={[r]:{code:-32700,message:"Parse error"},[n]:{code:-32600,message:"Invalid Request"},[c]:{code:-32601,message:"Method not found"},[d]:{code:-32602,message:"Invalid params"},[o]:{code:-32603,message:"Internal error"},[i]:{code:-32e3,message:"Server error"}},b=i},53587:(e,t,a)=>{"use strict";var r=a(8129);a.o(r,"IJsonRpcProvider")&&a.d(t,{IJsonRpcProvider:function(){return r.IJsonRpcProvider}}),a.o(r,"formatJsonRpcError")&&a.d(t,{formatJsonRpcError:function(){return r.formatJsonRpcError}}),a.o(r,"formatJsonRpcRequest")&&a.d(t,{formatJsonRpcRequest:function(){return r.formatJsonRpcRequest}}),a.o(r,"formatJsonRpcResult")&&a.d(t,{formatJsonRpcResult:function(){return r.formatJsonRpcResult}}),a.o(r,"getBigIntRpcId")&&a.d(t,{getBigIntRpcId:function(){return r.getBigIntRpcId}}),a.o(r,"isHttpUrl")&&a.d(t,{isHttpUrl:function(){return r.isHttpUrl}}),a.o(r,"isJsonRpcError")&&a.d(t,{isJsonRpcError:function(){return r.isJsonRpcError}}),a.o(r,"isJsonRpcRequest")&&a.d(t,{isJsonRpcRequest:function(){return r.isJsonRpcRequest}}),a.o(r,"isJsonRpcResponse")&&a.d(t,{isJsonRpcResponse:function(){return r.isJsonRpcResponse}}),a.o(r,"isJsonRpcResult")&&a.d(t,{isJsonRpcResult:function(){return r.isJsonRpcResult}}),a.o(r,"isLocalhostUrl")&&a.d(t,{isLocalhostUrl:function(){return r.isLocalhostUrl}}),a.o(r,"isReactNative")&&a.d(t,{isReactNative:function(){return r.isReactNative}}),a.o(r,"isWsUrl")&&a.d(t,{isWsUrl:function(){return r.isWsUrl}}),a.o(r,"payloadId")&&a.d(t,{payloadId:function(){return r.payloadId}})},11834:(e,t,a)=>{"use strict";a.d(t,{eF:()=>o,mE:()=>n,rI:()=>d,vG:()=>c});var r=a(76765);function n(e){return r.jf.includes(e)}function c(e){return Object.keys(r.Uf).includes(e)?r.Uf[e]:r.Uf[r.XW]}function d(e){const t=Object.values(r.Uf).find((t=>t.code===e));return t||r.Uf[r.XW]}function o(e,t,a){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error("Unavailable ".concat(a," RPC url at ").concat(t)):e}},50301:(e,t,a)=>{"use strict";a.d(t,{ER:()=>c,Im:()=>i,dZ:()=>f,eX:()=>d,e_:()=>o});var r=a(11834),n=a(76765);function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function d(){return BigInt(c(arguments.length>0&&void 0!==arguments[0]?arguments[0]:6))}function o(e,t,a){return{id:a||c(),jsonrpc:"2.0",method:e,params:t}}function i(e,t){return{id:e,jsonrpc:"2.0",result:t}}function f(e,t,a){return{id:e,jsonrpc:"2.0",error:s(t,a)}}function s(e,t){return"undefined"===typeof e?(0,r.vG)(n.zR):("string"===typeof e&&(e=Object.assign(Object.assign({},(0,r.vG)(n.fO)),{message:e})),"undefined"!==typeof t&&(e.data=t),(0,r.mE)(e.code)&&(e=(0,r.rI)(e.code)),e)}},10632:(e,t,a)=>{"use strict";a.d(t,{IJsonRpcProvider:()=>d.kF,formatJsonRpcError:()=>c.dZ,formatJsonRpcRequest:()=>c.e_,formatJsonRpcResult:()=>c.Im,getBigIntRpcId:()=>c.eX,isHttpUrl:()=>o.q$,isJsonRpcError:()=>i.U$,isJsonRpcRequest:()=>i.p3,isJsonRpcResponse:()=>i.tq,isJsonRpcResult:()=>i.xT,isLocalhostUrl:()=>o.z,isWsUrl:()=>o.A1,parseConnectionError:()=>r.eF,payloadId:()=>c.ER});a(76765);var r=a(11834),n=a(53587);a.o(n,"IJsonRpcProvider")&&a.d(t,{IJsonRpcProvider:function(){return n.IJsonRpcProvider}}),a.o(n,"formatJsonRpcError")&&a.d(t,{formatJsonRpcError:function(){return n.formatJsonRpcError}}),a.o(n,"formatJsonRpcRequest")&&a.d(t,{formatJsonRpcRequest:function(){return n.formatJsonRpcRequest}}),a.o(n,"formatJsonRpcResult")&&a.d(t,{formatJsonRpcResult:function(){return n.formatJsonRpcResult}}),a.o(n,"getBigIntRpcId")&&a.d(t,{getBigIntRpcId:function(){return n.getBigIntRpcId}}),a.o(n,"isHttpUrl")&&a.d(t,{isHttpUrl:function(){return n.isHttpUrl}}),a.o(n,"isJsonRpcError")&&a.d(t,{isJsonRpcError:function(){return n.isJsonRpcError}}),a.o(n,"isJsonRpcRequest")&&a.d(t,{isJsonRpcRequest:function(){return n.isJsonRpcRequest}}),a.o(n,"isJsonRpcResponse")&&a.d(t,{isJsonRpcResponse:function(){return n.isJsonRpcResponse}}),a.o(n,"isJsonRpcResult")&&a.d(t,{isJsonRpcResult:function(){return n.isJsonRpcResult}}),a.o(n,"isLocalhostUrl")&&a.d(t,{isLocalhostUrl:function(){return n.isLocalhostUrl}}),a.o(n,"isReactNative")&&a.d(t,{isReactNative:function(){return n.isReactNative}}),a.o(n,"isWsUrl")&&a.d(t,{isWsUrl:function(){return n.isWsUrl}}),a.o(n,"payloadId")&&a.d(t,{payloadId:function(){return n.payloadId}});var c=a(50301),d=a(33453),o=a(81385),i=a(33985)},33453:(e,t,a)=>{"use strict";a.d(t,{kF:()=>r.kF});var r=a(32116)},81385:(e,t,a)=>{"use strict";a.d(t,{A1:()=>o,q$:()=>d,z:()=>i});const r="^https?:",n="^wss?:";function c(e,t){const a=function(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return"undefined"!==typeof a&&new RegExp(t).test(a)}function d(e){return c(e,r)}function o(e){return c(e,n)}function i(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}},33985:(e,t,a)=>{"use strict";function r(e){return"object"===typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function n(e){return r(e)&&"method"in e}function c(e){return r(e)&&(d(e)||o(e))}function d(e){return"result"in e}function o(e){return"error"in e}a.d(t,{U$:()=>o,p3:()=>n,tq:()=>c,xT:()=>d})},36388:()=>{},48661:(e,t,a)=>{"use strict";a.d(t,{h:()=>d,j:()=>c});const r=e=>JSON.stringify(e,((e,t)=>"bigint"===typeof t?t.toString()+"n":t)),n=e=>{const t=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(t,((e,t)=>"string"===typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t))};function c(e){if("string"!==typeof e)throw new Error("Cannot safe json parse value of type ".concat(typeof e));try{return n(e)}catch(t){return e}}function d(e){return"string"===typeof e?e:r(e)||""}},70071:(e,t,a)=>{"use strict";t.g=void 0;const r=a(20033);t.g=function(){let e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(c){return null}function a(){for(var t=arguments.length,a=new Array(t),r=0;rt.getAttribute(e))).filter((e=>!!e&&a.includes(e)));if(r.length&&r){const e=t.getAttribute("content");if(e)return e}}return""}const n=function(){let t=a("name","og:site_name","og:title","twitter:title");return t||(t=e.title),t}();return{description:a("description","og:description","twitter:description","keywords"),url:t.origin,icons:function(){const a=e.getElementsByTagName("link"),r=[];for(let e=0;e-1){const e=n.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let a=t.protocol+"//"+t.host;if(0===e.indexOf("/"))a+=e;else{const r=t.pathname.split("/");r.pop();a+=r.join("/")+"/"+e}r.push(a)}else if(0===e.indexOf("//")){const a=t.protocol+e;r.push(a)}else r.push(e)}}return r}(),name:n}}},65551:(e,t,a)=>{"use strict";const r=a(27536),n=a(95707),c=a(71289),d=a(10038),o=Symbol("encodeFragmentIdentifier");function i(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function f(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function s(e,t){return t.decode?n(e):e}function b(e){return Array.isArray(e)?e.sort():"object"===typeof e?b(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const a=function(e){let t;switch(e.arrayFormat){case"index":return(e,a,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=a):r[e]=a};case"bracket":return(e,a,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=[a]:r[e]=a};case"colon-list-separator":return(e,a,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=[a]:r[e]=a};case"comma":case"separator":return(t,a,r)=>{const n="string"===typeof a&&a.includes(e.arrayFormatSeparator),c="string"===typeof a&&!n&&s(a,e).includes(e.arrayFormatSeparator);a=c?s(a,e):a;const d=n||c?a.split(e.arrayFormatSeparator).map((t=>s(t,e))):null===a?a:s(a,e);r[t]=d};case"bracket-separator":return(t,a,r)=>{const n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n)return void(r[t]=a?s(a,e):a);const c=null===a?[]:a.split(e.arrayFormatSeparator).map((t=>s(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],c):r[t]=c};default:return(e,t,a)=>{void 0!==a[e]?a[e]=[].concat(a[e],t):a[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const n of e.split("&")){if(""===n)continue;let[e,d]=c(t.decode?n.replace(/\+/g," "):n,"=");d=void 0===d?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?d:s(d,t),a(s(e,t),d,r)}for(const n of Object.keys(r)){const e=r[n];if("object"===typeof e&&null!==e)for(const a of Object.keys(e))e[a]=h(e[a],t);else r[n]=h(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const a=r[t];return Boolean(a)&&"object"===typeof a&&!Array.isArray(a)?e[t]=b(a):e[t]=a,e}),Object.create(null))}t.extract=u,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const a=a=>{return t.skipNull&&(null===(r=e[a])||void 0===r)||t.skipEmptyString&&""===e[a];var r},r=function(e){switch(e.arrayFormat){case"index":return t=>(a,r)=>{const n=a.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),"[",n,"]"].join("")]:[...a,[f(t,e),"[",f(n,e),"]=",f(r,e)].join("")]};case"bracket":return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),"[]"].join("")]:[...a,[f(t,e),"[]=",f(r,e)].join("")];case"colon-list-separator":return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),":list="].join("")]:[...a,[f(t,e),":list=",f(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return a=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:(n=null===n?"":n,0===r.length?[[f(a,e),t,f(n,e)].join("")]:[[r,f(n,e)].join(e.arrayFormatSeparator)])}default:return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,f(t,e)]:[...a,[f(t,e),"=",f(r,e)].join("")]}}(t),n={};for(const d of Object.keys(e))a(d)||(n[d]=e[d]);const c=Object.keys(n);return!1!==t.sort&&c.sort(t.sort),c.map((a=>{const n=e[a];return void 0===n?"":null===n?f(a,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?f(a,t)+"[]":n.reduce(r(a),[]).join("&"):f(a,t)+"="+f(n,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[a,r]=c(e,"#");return Object.assign({url:a.split("?")[0]||"",query:p(u(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:s(r,t)}:{})},t.stringifyUrl=(e,a)=>{a=Object.assign({encode:!0,strict:!0,[o]:!0},a);const r=l(e.url).split("?")[0]||"",n=t.extract(e.url),c=t.parse(n,{sort:!1}),d=Object.assign(c,e.query);let i=t.stringify(d,a);i&&(i="?".concat(i));let s=function(e){let t="";const a=e.indexOf("#");return-1!==a&&(t=e.slice(a)),t}(e.url);return e.fragmentIdentifier&&(s="#".concat(a[o]?f(e.fragmentIdentifier,a):e.fragmentIdentifier)),"".concat(r).concat(i).concat(s)},t.pick=(e,a,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:n,query:c,fragmentIdentifier:i}=t.parseUrl(e,r);return t.stringifyUrl({url:n,query:d(c,a),fragmentIdentifier:i},r)},t.exclude=(e,a,r)=>{const n=Array.isArray(a)?e=>!a.includes(e):(e,t)=>!a(e,t);return t.pick(e,n,r)}},27536:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))},48251:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=a(56121);r.__exportStar(a(8951),t),r.__exportStar(a(45746),t)},8951:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},45746:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},33901:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=a(56121);r.__exportStar(a(65871),t),r.__exportStar(a(71822),t),r.__exportStar(a(1067),t),r.__exportStar(a(48251),t)},1067:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});a(56121).__exportStar(a(40656),t)},40656:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;t.IWatch=class{}},568:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;const r=a(48251);t.toMiliseconds=function(e){return e*r.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/r.ONE_THOUSAND)}},30296:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}},65871:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=a(56121);r.__exportStar(a(30296),t),r.__exportStar(a(568),t)},71822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class a{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error("Watch already started for label: ".concat(e));this.timestamps.set(e,{started:Date.now()})}stop(e){const t=this.get(e);if("undefined"!==typeof t.elapsed)throw new Error("Watch already stopped for label: ".concat(e));const a=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:a})}get(e){const t=this.timestamps.get(e);if("undefined"===typeof t)throw new Error("No timestamp found for label: ".concat(e));return t}elapsed(e){const t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=a,t.default=a},56121:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__assign:()=>c,__asyncDelegator:()=>y,__asyncGenerator:()=>v,__asyncValues:()=>w,__await:()=>g,__awaiter:()=>s,__classPrivateFieldGet:()=>A,__classPrivateFieldSet:()=>E,__createBinding:()=>l,__decorate:()=>o,__exportStar:()=>u,__extends:()=>n,__generator:()=>b,__importDefault:()=>_,__importStar:()=>I,__makeTemplateObject:()=>k,__metadata:()=>f,__param:()=>i,__read:()=>p,__rest:()=>d,__spread:()=>x,__spreadArrays:()=>m,__values:()=>h});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},r(e,t)};function n(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var c=function(){return c=Object.assign||function(e){for(var t,a=1,r=arguments.length;a=0;o--)(n=e[o])&&(d=(c<3?n(d):c>3?n(t,a,d):n(t,a))||d);return c>3&&d&&Object.defineProperty(t,a,d),d}function i(e,t){return function(a,r){t(a,r,e)}}function f(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function s(e,t,a,r){return new(a||(a=Promise))((function(n,c){function d(e){try{i(r.next(e))}catch(t){c(t)}}function o(e){try{i(r.throw(e))}catch(t){c(t)}}function i(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(d,o)}i((r=r.apply(e,t||[])).next())}))}function b(e,t){var a,r,n,c,d={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return c={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function o(c){return function(o){return function(c){if(a)throw new TypeError("Generator is already executing.");for(;d;)try{if(a=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return d.label++,{value:c[1],done:!1};case 5:d.label++,r=c[1],c=[0];continue;case 7:c=d.ops.pop(),d.trys.pop();continue;default:if(!(n=(n=d.trys).length>0&&n[n.length-1])&&(6===c[0]||2===c[0])){d=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var a="function"===typeof Symbol&&e[Symbol.iterator];if(!a)return e;var r,n,c=a.call(e),d=[];try{for(;(void 0===t||t-- >0)&&!(r=c.next()).done;)d.push(r.value)}catch(o){n={error:o}}finally{try{r&&!r.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}return d}function x(){for(var e=[],t=0;t1||o(e,t)}))})}function o(e,t){try{(a=n[e](t)).value instanceof g?Promise.resolve(a.value.v).then(i,f):s(c[0][2],a)}catch(r){s(c[0][3],r)}var a}function i(e){o("next",e)}function f(e){o("throw",e)}function s(e,t){e(t),c.shift(),c.length&&o(c[0][0],c[0][1])}}function y(e){var t,a;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,n){t[r]=e[r]?function(t){return(a=!a)?{value:g(e[r](t)),done:"return"===r}:n?n(t):t}:n}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(a){t[a]=e[a]&&function(t){return new Promise((function(r,n){(function(e,t,a,r){Promise.resolve(r).then((function(t){e({value:t,done:a})}),t)})(r,n,(t=e[a](t)).done,t.value)}))}}}function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function _(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function E(e,t,a){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,a),a}},97501:(e,t,a)=>{"use strict";const r=a(20033)},56793:(e,t,a)=>{"use strict";const r=a(85806),n=a(95707),c=a(71289),d=a(10038),o=Symbol("encodeFragmentIdentifier");function i(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function f(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function s(e,t){return t.decode?n(e):e}function b(e){return Array.isArray(e)?e.sort():"object"===typeof e?b(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const a=function(e){let t;switch(e.arrayFormat){case"index":return(e,a,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=a):r[e]=a};case"bracket":return(e,a,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=[a]:r[e]=a};case"colon-list-separator":return(e,a,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],a):r[e]=[a]:r[e]=a};case"comma":case"separator":return(t,a,r)=>{const n="string"===typeof a&&a.includes(e.arrayFormatSeparator),c="string"===typeof a&&!n&&s(a,e).includes(e.arrayFormatSeparator);a=c?s(a,e):a;const d=n||c?a.split(e.arrayFormatSeparator).map((t=>s(t,e))):null===a?a:s(a,e);r[t]=d};case"bracket-separator":return(t,a,r)=>{const n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n)return void(r[t]=a?s(a,e):a);const c=null===a?[]:a.split(e.arrayFormatSeparator).map((t=>s(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],c):r[t]=c};default:return(e,t,a)=>{void 0!==a[e]?a[e]=[].concat(a[e],t):a[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const n of e.split("&")){if(""===n)continue;let[e,d]=c(t.decode?n.replace(/\+/g," "):n,"=");d=void 0===d?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?d:s(d,t),a(s(e,t),d,r)}for(const n of Object.keys(r)){const e=r[n];if("object"===typeof e&&null!==e)for(const a of Object.keys(e))e[a]=h(e[a],t);else r[n]=h(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const a=r[t];return Boolean(a)&&"object"===typeof a&&!Array.isArray(a)?e[t]=b(a):e[t]=a,e}),Object.create(null))}t.extract=u,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const a=a=>{return t.skipNull&&(null===(r=e[a])||void 0===r)||t.skipEmptyString&&""===e[a];var r},r=function(e){switch(e.arrayFormat){case"index":return t=>(a,r)=>{const n=a.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),"[",n,"]"].join("")]:[...a,[f(t,e),"[",f(n,e),"]=",f(r,e)].join("")]};case"bracket":return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),"[]"].join("")]:[...a,[f(t,e),"[]=",f(r,e)].join("")];case"colon-list-separator":return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,[f(t,e),":list="].join("")]:[...a,[f(t,e),":list=",f(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return a=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:(n=null===n?"":n,0===r.length?[[f(a,e),t,f(n,e)].join("")]:[[r,f(n,e)].join(e.arrayFormatSeparator)])}default:return t=>(a,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?a:null===r?[...a,f(t,e)]:[...a,[f(t,e),"=",f(r,e)].join("")]}}(t),n={};for(const d of Object.keys(e))a(d)||(n[d]=e[d]);const c=Object.keys(n);return!1!==t.sort&&c.sort(t.sort),c.map((a=>{const n=e[a];return void 0===n?"":null===n?f(a,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?f(a,t)+"[]":n.reduce(r(a),[]).join("&"):f(a,t)+"="+f(n,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[a,r]=c(e,"#");return Object.assign({url:a.split("?")[0]||"",query:p(u(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:s(r,t)}:{})},t.stringifyUrl=(e,a)=>{a=Object.assign({encode:!0,strict:!0,[o]:!0},a);const r=l(e.url).split("?")[0]||"",n=t.extract(e.url),c=t.parse(n,{sort:!1}),d=Object.assign(c,e.query);let i=t.stringify(d,a);i&&(i="?".concat(i));let s=function(e){let t="";const a=e.indexOf("#");return-1!==a&&(t=e.slice(a)),t}(e.url);return e.fragmentIdentifier&&(s="#".concat(a[o]?f(e.fragmentIdentifier,a):e.fragmentIdentifier)),"".concat(r).concat(i).concat(s)},t.pick=(e,a,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);const{url:n,query:c,fragmentIdentifier:i}=t.parseUrl(e,r);return t.stringifyUrl({url:n,query:d(c,a),fragmentIdentifier:i},r)},t.exclude=(e,a,r)=>{const n=Array.isArray(a)?e=>!a.includes(e):(e,t)=>!a(e,t);return t.pick(e,n,r)}},85806:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))},20033:(e,t)=>{"use strict";function a(e){let t;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function r(e){const t=a(e);if(!t)throw new Error("".concat(e," is not defined in Window"));return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=a,t.getFromWindowOrThrow=r,t.getDocumentOrThrow=function(){return r("document")},t.getDocument=function(){return a("document")},t.getNavigatorOrThrow=function(){return r("navigator")},t.getNavigator=function(){return a("navigator")},t.getLocationOrThrow=function(){return r("location")},t.getLocation=function(){return a("location")},t.getCryptoOrThrow=function(){return r("crypto")},t.getCrypto=function(){return a("crypto")},t.getLocalStorageOrThrow=function(){return r("localStorage")},t.getLocalStorage=function(){return a("localStorage")}},71604:(e,t,a)=>{var r,n;void 0===(n="function"===typeof(r=function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var a=0;a{const{getAddress:r}=a(254).utils,{BN:n}=a(6373),{getBalanceLeaf:c}=a(71110).Channel,d=a(52251);e.exports=class{constructor(e){const t=Object.entries(e).map((e=>{let[t,a]=e;return[r(t),new n(a,10)]}));this.balances=Object.fromEntries(t),this.mTree=new d(t.map((e=>{let[t,a]=e;return c(t,a)}))),Object.freeze(this)}getProof(e){return this.mTree.proof(c(e,this.getBalance(e)))}getBalance(e){return this.balances[r(e)]||new n(0)}}},71110:(e,t,a)=>{var r=a(26382).Buffer;const n=a(66669),c=a(32161).keccak256,d=a(98902);function o(e){return this.creator=d.Address(e.creator),this.tokenAddr=d.Address(e.tokenAddr),this.tokenAmount=d.Uint256(e.tokenAmount),this.validUntil=d.Uint256(e.validUntil),this.validators=Array.isArray(e.validators)?e.validators.map(d.Address):[],this.spec=d.Bytes32(e.spec),Object.freeze(this.validators),Object.freeze(this),this}o.prototype.hash=function(e){if(!e)throw new Error("contractAddr required");return r.from(c.arrayBuffer(n.rawEncode(["address","address","address","uint256","uint256","address[]","bytes32"],[e,this.creator,this.tokenAddr,this.tokenAmount,this.validUntil,this.validators,this.spec])))},o.prototype.hashHex=function(e){return"0x".concat(this.hash(e).toString("hex"))},o.prototype.toSolidityTuple=function(){return[this.creator,this.tokenAddr,"0x".concat(this.tokenAmount.toString(16)),"0x".concat(this.validUntil.toString(16)),this.validators,this.spec]},o.prototype.hashToSign=function(e,t){return o.getSignableStateRoot(this.hashHex(e),t)},o.prototype.hashToSignHex=function(e,t){return"0x".concat(this.hashToSign(e,t).toString("hex"))},o.getSignableStateRoot=function(e,t){return r.from(c.arrayBuffer(n.rawEncode(["bytes32","bytes32"],[e,t])))},o.getBalanceLeaf=function(e,t){return r.from(c.arrayBuffer(n.rawEncode(["address","uint256"],[e,t])))},e.exports={Channel:o,ChannelState:{Unknown:0,Active:1,Expired:2}}},96471:(e,t,a)=>{var r=a(26382).Buffer;const n=a(66669),c=a(32161).keccak256,{Interface:d}=a(254).utils,o=a(98902),i=new d(a(69407));function f(e){return this.identityContract=o.Address(e.identityContract),this.nonce=o.Uint256(e.nonce),this.feeTokenAddr=o.Address(e.feeTokenAddr),this.feeAmount=o.Uint256(e.feeAmount),this.to=o.Address(e.to),this.value=o.Uint256(e.value),this.data=o.Bytes(e.data),Object.freeze(this),this}function s(e){return this.relayer=o.Address(e.relayer),this.outpace=o.Address(e.outpace),this.validUntil=o.Uint256(e.validUntil),this.feeTokenAddr=o.Address(e.feeTokenAddr),this.weeklyFeeAmount=o.Uint256(e.weeklyFeeAmount),Object.freeze(this),this}f.prototype.hash=function(){const e=n.rawEncode(["address","uint256","address","uint256","address","uint256","bytes"],[this.identityContract,this.nonce,this.feeTokenAddr,this.feeAmount,this.to,this.value,this.data]);return r.from(c.arrayBuffer(e))},f.prototype.hashHex=function(){return"0x".concat(this.hash().toString("hex"))},f.prototype.toSolidityTuple=function(){return[this.identityContract,"0x".concat(this.nonce.toString(16)),this.feeTokenAddr,"0x".concat(this.feeAmount.toString(16)),this.to,"0x".concat(this.value.toString(16)),"0x".concat(this.data.toString("hex"))]},s.prototype.hash=function(){const e=n.rawEncode(["address","address","uint256","address","uint256"],[this.relayer,this.outpace,this.validUntil,this.feeTokenAddr,this.weeklyFeeAmount]);return r.from(c.arrayBuffer(e))},s.prototype.hashHex=function(){return"0x".concat(this.hash().toString("hex"))},s.prototype.toSolidityTuple=function(){return[this.relayer,this.outpace,"0x".concat(this.validUntil.toString(16)),this.feeTokenAddr,"0x".concat(this.weeklyFeeAmount.toString(16))]};const b={channelWithdraw:e=>[0,"0x".concat(i.functions.channelWithdraw.encode(e).slice(10))],channelWithdrawExpired:e=>[1,"0x".concat(i.functions.channelWithdrawExpired.encode(e).slice(10))]};e.exports={Transaction:f,RoutineAuthorization:s,RoutineOps:b}},52251:(e,t,a)=>{const r=a(26382).Buffer,n=a(32161).keccak256;function c(e,t){if(!t)return e;if(!e)return t;const a=r.concat([e,t].sort(r.compare));return r.from(n.arrayBuffer(a))}function d(e){if(0===e.length)return[[r.from("")]];const t=[];for(t.push(e);t[t.length-1].length>1;)t.push(o(t[t.length-1]));return t}function o(e){return e.reduce(((e,t,a,r)=>(a%2===0&&e.push(c(t,r[a+1])),e)),[])}e.exports=class{constructor(e){if(!e.every((e=>32===e.length&&r.isBuffer(e))))throw new Error("elements must be 32 byte buffers");const t={elements:(a=e,a.filter(((e,t)=>a.findIndex((t=>t.equals(e)))===t)))};var a;Object.assign(this,t),this.elements.sort(r.compare);const n={layers:d(this.elements)};Object.assign(this,n)}getRoot(){if(!this.root){const e={root:this.layers[this.layers.length-1][0]};Object.assign(this,e)}return this.root}verify(e,t){return this.getRoot().equals(e.reduce(((e,t)=>c(e,t)),t))}proof(e){let t=this.elements.findIndex((t=>t.equals(e)));if(-1===t)throw new Error("element not found in merkle tree");return this.layers.reduce(((e,a)=>{const r=function(e,t){const a=e%2?e-1:e+1;return a{var r=a(26382).Buffer;const{BN:n}=a(6373);e.exports={Uint256:function(e){const t=new n(e,10);if(t.isNeg())throw new Error("uint256 expected, negative number given");return t},Bytes32:function(e){if(32!==e.length||!r.isBuffer(e))throw new Error("32 byte Buffer expected");return e},Address:function(e){if("string"!==typeof e||42!==e.length||!e.startsWith("0x"))throw new Error("invalid address: must start with a 0x and be 42 characters long");return e},Bytes:function(e){if("string"===typeof e&&e.startsWith("0x"))return r.from(e.slice(2),"hex");if(!r.isBuffer(e))throw new Error("Buffer expected");return e}}},74105:(e,t,a)=>{const r=a(71110),n=a(96471),c=a(52251),d=a(49984);e.exports={...r,...n,MerkleTree:c,splitSig:d}},49984:e=>{e.exports=function(e){const t=e.startsWith("0x")?e.slice(2):e,a="0x".concat(t.substring(0,64)),r="0x".concat(t.substring(64,128));let n=parseInt(t.substring(128,130),16);return n<27&&(n+=27),["0x02".concat(n.toString(16),"000000000000000000000000000000000000000000000000000000000000"),a,r]}},254:(e,t,a)=>{var r;e.exports=function e(t,n,c){function d(i,f){if(!n[i]){if(!t[i]){var s=void 0;if(!f&&s)return r(i,!0);if(o)return o(i,!0);throw(s=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",a(18297)}s=n[i]={exports:{}},t[i][0].call(s.exports,(function(e){return d(t[i][1][e]||e)}),s,s.exports,e,t,n,c)}return n[i].exports}for(var o=void 0,i=0;io[e]||console.log.apply(console,t)}function s(){for(var e=[],t=0;t>4]+i[15&r])}return t.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],p=[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],x=[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],g=[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],v=[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],w=[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],k=[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],A=[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],E=[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 S(e){for(var t=[],a=0;a>2][t%4]=c[t],this._Kd[e-a][t%4]=c[t];for(var d,o=0,i=n;i>16&255]<<24^u[d>>8&255]<<16^u[255&d]<<8^u[d>>24&255]^l[o]<<24,o+=1,8!=n)for(t=1;t>8&255]<<8^u[d>>16&255]<<16^u[d>>24&255]<<24,t=n/2+1;t>2][s=i%4]=c[t],this._Kd[e-f][s]=c[t++],i++}for(var f=1;f>24&255]^_[d>>16&255]^A[d>>8&255]^E[255&d]},N.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,a=[0,0,0,0],r=S(e),n=0;n<4;n++)r[n]^=this._Ke[0][n];for(var c=1;c>24&255]^x[r[(n+1)%4]>>16&255]^m[r[(n+2)%4]>>8&255]^g[255&r[(n+3)%4]]^this._Ke[c][n];r=a.slice()}var o,i=d(16);for(n=0;n<4;n++)o=this._Ke[t][n],i[4*n]=255&(u[r[n]>>24&255]^o>>24),i[4*n+1]=255&(u[r[(n+1)%4]>>16&255]^o>>16),i[4*n+2]=255&(u[r[(n+2)%4]>>8&255]^o>>8),i[4*n+3]=255&(u[255&r[(n+3)%4]]^o);return i},N.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,a=[0,0,0,0],r=S(e),n=0;n<4;n++)r[n]^=this._Kd[0][n];for(var c=1;c>24&255]^y[r[(n+3)%4]>>16&255]^w[r[(n+2)%4]>>8&255]^k[255&r[(n+1)%4]]^this._Kd[c][n];r=a.slice()}var o,i=d(16);for(n=0;n<4;n++)o=this._Kd[t][n],i[4*n]=255&(h[r[n]>>24&255]^o>>24),i[4*n+1]=255&(h[r[(n+3)%4]>>16&255]^o>>16),i[4*n+2]=255&(h[r[(n+2)%4]>>8&255]^o>>8),i[4*n+3]=255&(h[255&r[(n+1)%4]]^o);return i};var M=function(e){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new N(e)};M.prototype.encrypt=function(e){if((e=c(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=d(e.length),a=d(16),r=0;r>=8},R.prototype.setBytes=function(e){if(16!=(e=c(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},R.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,t){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof R||(t=new R(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new N(e)};C.prototype.encrypt=function(e){for(var t=c(e,!0),a=0;a>>26-o&67108863,26<=(o+=24)&&(o-=26,n++);else if("le"===a)for(n=d=0;d>>26-o&67108863,26<=(o+=24)&&(o-=26,n++);return this.strip()},c.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r>>26):c+=8;else for(r=(e.length-t)%2==0?t+1:t;r>>26):c+=8;this.strip()},c.prototype._parseBase=function(e,t,a){this.words=[0];for(var r=0,n=this.length=1;n<=67108863;n*=t)r++;n=n/t|0;for(var c=e.length-a,d=c%--r,o=Math.min(c,c-d)+a,i=0,s=a;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,t,a){a.negative=t.negative^e.negative;var r=e.length+t.length|0,n=(r=(a.length=r)-1|0,(d=(0|e.words[0])*(0|t.words[0]))/67108864|0);a.words[0]=67108863&d;for(var c=1;c>>26,i=67108863&n,f=Math.min(c,t.length-1),s=Math.max(0,c-e.length+1);s<=f;s++)o+=(d=(0|e.words[c-s|0])*(0|t.words[s])+i)/67108864|0,i=67108863&d;a.words[c]=0|i,n=0|o}return 0!==n?a.words[c]=0|n:a.length--,a.strip()}c.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var a=0,n=0,c=0;c>>24-a&16777215)||c!==this.length-1?s[6-o.length]+o+i:o+i;26<=(a+=2)&&(a-=26,c--)}for(0!==n&&(i=n.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative?"-"+i:i}if(e===(0|e)&&2<=e&&e<=36){var f=b[e],u=l[e];for(i="",(h=this.clone()).negative=0;!h.isZero();){var h,p=h.modn(u).toString(e);i=(h=h.idivn(u)).isZero()?p+i:s[f-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative?"-"+i:i}r(!1,"Base should be between 2 and 36")},c.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<=t&&(e+=7,t>>>=7),8<=t&&(e+=4,t>>>=4),2<=t&&(e+=2,t>>>=2),e+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e;return e=0,0==(8191&t)&&(e+=13,t>>>=13),0==(127&t)&&(e+=7,t>>>=7),0==(15&t)&&(e+=4,t>>>=4),0==(3&t)&&(e+=2,t>>>=2),0==(1&t)&&e++,e},c.prototype.bitLength=function(){var e=this.words[this.length-1];return e=this._countBits(e),26*(this.length-1)+e},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){for(var t,a=this.length>e.length?(t=this,e):(t=e,this),r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26);e%=26,this._expand(t),0>26-e),this.strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&0<=e);var a=e/26|0;return e%=26,this._expand(1+a),this.words[a]=t?this.words[a]|1<e.length?(a=this,e):(a=e,this),n=0,c=0;c>>26;for(;0!==n&&c>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ce.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[d]=67108863&t;for(;0!==c&&d>26,this.words[d]=67108863&t;if(0===c&&d>>13,b=8191&(V=0|d[1]),l=V>>>13,u=8191&(K=0|d[2]),h=K>>>13,p=8191&(n=0|d[3]),x=n>>>13,m=8191&(G=0|d[4]),g=G>>>13,v=8191&(Y=0|d[5]),y=Y>>>13,w=8191&(c=0|d[6]),k=c>>>13,I=8191&(J=0|d[7]),_=J>>>13,A=8191&(X=0|d[8]),E=X>>>13,S=8191&(Z=0|d[9]),N=Z>>>13,M=8191&(Q=0|o[0]),H=Q>>>13,T=0|o[1],P=8191&T,R=T>>>13,C=0|o[2],O=8191&C,D=C>>>13,B=8191&($=0|o[3]),L=$>>>13,j=0|o[4],U=8191&j,F=j>>>13,z=0|o[5],q=8191&z,W=z>>>13,V=8191&(r=0|o[6]),K=r>>>13,G=8191&(n=0|o[7]),Y=n>>>13,J=8191&(c=0|o[8]),X=c>>>13,Z=8191&(d=0|o[9]),Q=d>>>13;a.negative=e.negative^t.negative,a.length=19;var $=(0+Math.imul(f,M)|0)+((8191&(C=(C=Math.imul(f,H))+Math.imul(s,M)|0))<<13)|0,ee=((j=Math.imul(s,H))+(C>>>13)|0)+($>>>26)|0;return $&=67108863,T=Math.imul(b,M),C=(C=Math.imul(b,H))+Math.imul(l,M)|0,j=Math.imul(l,H),z=(ee+(T+Math.imul(f,P)|0)|0)+((8191&(C=(C=C+Math.imul(f,R)|0)+Math.imul(s,P)|0))<<13)|0,ee=((j=j+Math.imul(s,R)|0)+(C>>>13)|0)+(z>>>26)|0,z&=67108863,T=Math.imul(u,M),C=(C=Math.imul(u,H))+Math.imul(h,M)|0,j=Math.imul(h,H),T=T+Math.imul(b,P)|0,C=(C=C+Math.imul(b,R)|0)+Math.imul(l,P)|0,j=j+Math.imul(l,R)|0,r=(ee+(T+Math.imul(f,O)|0)|0)+((8191&(C=(C=C+Math.imul(f,D)|0)+Math.imul(s,O)|0))<<13)|0,ee=((j=j+Math.imul(s,D)|0)+(C>>>13)|0)+(r>>>26)|0,r&=67108863,T=Math.imul(p,M),C=(C=Math.imul(p,H))+Math.imul(x,M)|0,j=Math.imul(x,H),T=T+Math.imul(u,P)|0,C=(C=C+Math.imul(u,R)|0)+Math.imul(h,P)|0,j=j+Math.imul(h,R)|0,T=T+Math.imul(b,O)|0,C=(C=C+Math.imul(b,D)|0)+Math.imul(l,O)|0,j=j+Math.imul(l,D)|0,n=(ee+(T+Math.imul(f,B)|0)|0)+((8191&(C=(C=C+Math.imul(f,L)|0)+Math.imul(s,B)|0))<<13)|0,ee=((j=j+Math.imul(s,L)|0)+(C>>>13)|0)+(n>>>26)|0,n&=67108863,T=Math.imul(m,M),C=(C=Math.imul(m,H))+Math.imul(g,M)|0,j=Math.imul(g,H),T=T+Math.imul(p,P)|0,C=(C=C+Math.imul(p,R)|0)+Math.imul(x,P)|0,j=j+Math.imul(x,R)|0,T=T+Math.imul(u,O)|0,C=(C=C+Math.imul(u,D)|0)+Math.imul(h,O)|0,j=j+Math.imul(h,D)|0,T=T+Math.imul(b,B)|0,C=(C=C+Math.imul(b,L)|0)+Math.imul(l,B)|0,j=j+Math.imul(l,L)|0,c=(ee+(T+Math.imul(f,U)|0)|0)+((8191&(C=(C=C+Math.imul(f,F)|0)+Math.imul(s,U)|0))<<13)|0,ee=((j=j+Math.imul(s,F)|0)+(C>>>13)|0)+(c>>>26)|0,c&=67108863,T=Math.imul(v,M),C=(C=Math.imul(v,H))+Math.imul(y,M)|0,j=Math.imul(y,H),T=T+Math.imul(m,P)|0,C=(C=C+Math.imul(m,R)|0)+Math.imul(g,P)|0,j=j+Math.imul(g,R)|0,T=T+Math.imul(p,O)|0,C=(C=C+Math.imul(p,D)|0)+Math.imul(x,O)|0,j=j+Math.imul(x,D)|0,T=T+Math.imul(u,B)|0,C=(C=C+Math.imul(u,L)|0)+Math.imul(h,B)|0,j=j+Math.imul(h,L)|0,T=T+Math.imul(b,U)|0,C=(C=C+Math.imul(b,F)|0)+Math.imul(l,U)|0,j=j+Math.imul(l,F)|0,o=(ee+(T+Math.imul(f,q)|0)|0)+((8191&(C=(C=C+Math.imul(f,W)|0)+Math.imul(s,q)|0))<<13)|0,ee=((j=j+Math.imul(s,W)|0)+(C>>>13)|0)+(o>>>26)|0,o&=67108863,T=Math.imul(w,M),C=(C=Math.imul(w,H))+Math.imul(k,M)|0,j=Math.imul(k,H),T=T+Math.imul(v,P)|0,C=(C=C+Math.imul(v,R)|0)+Math.imul(y,P)|0,j=j+Math.imul(y,R)|0,T=T+Math.imul(m,O)|0,C=(C=C+Math.imul(m,D)|0)+Math.imul(g,O)|0,j=j+Math.imul(g,D)|0,T=T+Math.imul(p,B)|0,C=(C=C+Math.imul(p,L)|0)+Math.imul(x,B)|0,j=j+Math.imul(x,L)|0,T=T+Math.imul(u,U)|0,C=(C=C+Math.imul(u,F)|0)+Math.imul(h,U)|0,j=j+Math.imul(h,F)|0,T=T+Math.imul(b,q)|0,C=(C=C+Math.imul(b,W)|0)+Math.imul(l,q)|0,j=j+Math.imul(l,W)|0,d=(ee+(T+Math.imul(f,V)|0)|0)+((8191&(C=(C=C+Math.imul(f,K)|0)+Math.imul(s,V)|0))<<13)|0,ee=((j=j+Math.imul(s,K)|0)+(C>>>13)|0)+(d>>>26)|0,d&=67108863,T=Math.imul(I,M),C=(C=Math.imul(I,H))+Math.imul(_,M)|0,j=Math.imul(_,H),T=T+Math.imul(w,P)|0,C=(C=C+Math.imul(w,R)|0)+Math.imul(k,P)|0,j=j+Math.imul(k,R)|0,T=T+Math.imul(v,O)|0,C=(C=C+Math.imul(v,D)|0)+Math.imul(y,O)|0,j=j+Math.imul(y,D)|0,T=T+Math.imul(m,B)|0,C=(C=C+Math.imul(m,L)|0)+Math.imul(g,B)|0,j=j+Math.imul(g,L)|0,T=T+Math.imul(p,U)|0,C=(C=C+Math.imul(p,F)|0)+Math.imul(x,U)|0,j=j+Math.imul(x,F)|0,T=T+Math.imul(u,q)|0,C=(C=C+Math.imul(u,W)|0)+Math.imul(h,q)|0,j=j+Math.imul(h,W)|0,T=T+Math.imul(b,V)|0,C=(C=C+Math.imul(b,K)|0)+Math.imul(l,V)|0,j=j+Math.imul(l,K)|0,e=(ee+(T+Math.imul(f,G)|0)|0)+((8191&(C=(C=C+Math.imul(f,Y)|0)+Math.imul(s,G)|0))<<13)|0,ee=((j=j+Math.imul(s,Y)|0)+(C>>>13)|0)+(e>>>26)|0,e&=67108863,T=Math.imul(A,M),C=(C=Math.imul(A,H))+Math.imul(E,M)|0,j=Math.imul(E,H),T=T+Math.imul(I,P)|0,C=(C=C+Math.imul(I,R)|0)+Math.imul(_,P)|0,j=j+Math.imul(_,R)|0,T=T+Math.imul(w,O)|0,C=(C=C+Math.imul(w,D)|0)+Math.imul(k,O)|0,j=j+Math.imul(k,D)|0,T=T+Math.imul(v,B)|0,C=(C=C+Math.imul(v,L)|0)+Math.imul(y,B)|0,j=j+Math.imul(y,L)|0,T=T+Math.imul(m,U)|0,C=(C=C+Math.imul(m,F)|0)+Math.imul(g,U)|0,j=j+Math.imul(g,F)|0,T=T+Math.imul(p,q)|0,C=(C=C+Math.imul(p,W)|0)+Math.imul(x,q)|0,j=j+Math.imul(x,W)|0,T=T+Math.imul(u,V)|0,C=(C=C+Math.imul(u,K)|0)+Math.imul(h,V)|0,j=j+Math.imul(h,K)|0,T=T+Math.imul(b,G)|0,C=(C=C+Math.imul(b,Y)|0)+Math.imul(l,G)|0,j=j+Math.imul(l,Y)|0,t=(ee+(T+Math.imul(f,J)|0)|0)+((8191&(C=(C=C+Math.imul(f,X)|0)+Math.imul(s,J)|0))<<13)|0,ee=((j=j+Math.imul(s,X)|0)+(C>>>13)|0)+(t>>>26)|0,t&=67108863,T=Math.imul(S,M),C=(C=Math.imul(S,H))+Math.imul(N,M)|0,j=Math.imul(N,H),T=T+Math.imul(A,P)|0,C=(C=C+Math.imul(A,R)|0)+Math.imul(E,P)|0,j=j+Math.imul(E,R)|0,T=T+Math.imul(I,O)|0,C=(C=C+Math.imul(I,D)|0)+Math.imul(_,O)|0,j=j+Math.imul(_,D)|0,T=T+Math.imul(w,B)|0,C=(C=C+Math.imul(w,L)|0)+Math.imul(k,B)|0,j=j+Math.imul(k,L)|0,T=T+Math.imul(v,U)|0,C=(C=C+Math.imul(v,F)|0)+Math.imul(y,U)|0,j=j+Math.imul(y,F)|0,T=T+Math.imul(m,q)|0,C=(C=C+Math.imul(m,W)|0)+Math.imul(g,q)|0,j=j+Math.imul(g,W)|0,T=T+Math.imul(p,V)|0,C=(C=C+Math.imul(p,K)|0)+Math.imul(x,V)|0,j=j+Math.imul(x,K)|0,T=T+Math.imul(u,G)|0,C=(C=C+Math.imul(u,Y)|0)+Math.imul(h,G)|0,j=j+Math.imul(h,Y)|0,T=T+Math.imul(b,J)|0,C=(C=C+Math.imul(b,X)|0)+Math.imul(l,J)|0,j=j+Math.imul(l,X)|0,f=(ee+(T+Math.imul(f,Z)|0)|0)+((8191&(C=(C=C+Math.imul(f,Q)|0)+Math.imul(s,Z)|0))<<13)|0,ee=((j=j+Math.imul(s,Q)|0)+(C>>>13)|0)+(f>>>26)|0,f&=67108863,T=Math.imul(S,P),C=(C=Math.imul(S,R))+Math.imul(N,P)|0,j=Math.imul(N,R),T=T+Math.imul(A,O)|0,C=(C=C+Math.imul(A,D)|0)+Math.imul(E,O)|0,j=j+Math.imul(E,D)|0,T=T+Math.imul(I,B)|0,C=(C=C+Math.imul(I,L)|0)+Math.imul(_,B)|0,j=j+Math.imul(_,L)|0,T=T+Math.imul(w,U)|0,C=(C=C+Math.imul(w,F)|0)+Math.imul(k,U)|0,j=j+Math.imul(k,F)|0,T=T+Math.imul(v,q)|0,C=(C=C+Math.imul(v,W)|0)+Math.imul(y,q)|0,j=j+Math.imul(y,W)|0,T=T+Math.imul(m,V)|0,C=(C=C+Math.imul(m,K)|0)+Math.imul(g,V)|0,j=j+Math.imul(g,K)|0,T=T+Math.imul(p,G)|0,C=(C=C+Math.imul(p,Y)|0)+Math.imul(x,G)|0,j=j+Math.imul(x,Y)|0,T=T+Math.imul(u,J)|0,C=(C=C+Math.imul(u,X)|0)+Math.imul(h,J)|0,j=j+Math.imul(h,X)|0,b=(ee+(T+Math.imul(b,Z)|0)|0)+((8191&(C=(C=C+Math.imul(b,Q)|0)+Math.imul(l,Z)|0))<<13)|0,ee=((j=j+Math.imul(l,Q)|0)+(C>>>13)|0)+(b>>>26)|0,b&=67108863,T=Math.imul(S,O),C=(C=Math.imul(S,D))+Math.imul(N,O)|0,j=Math.imul(N,D),T=T+Math.imul(A,B)|0,C=(C=C+Math.imul(A,L)|0)+Math.imul(E,B)|0,j=j+Math.imul(E,L)|0,T=T+Math.imul(I,U)|0,C=(C=C+Math.imul(I,F)|0)+Math.imul(_,U)|0,j=j+Math.imul(_,F)|0,T=T+Math.imul(w,q)|0,C=(C=C+Math.imul(w,W)|0)+Math.imul(k,q)|0,j=j+Math.imul(k,W)|0,T=T+Math.imul(v,V)|0,C=(C=C+Math.imul(v,K)|0)+Math.imul(y,V)|0,j=j+Math.imul(y,K)|0,T=T+Math.imul(m,G)|0,C=(C=C+Math.imul(m,Y)|0)+Math.imul(g,G)|0,j=j+Math.imul(g,Y)|0,T=T+Math.imul(p,J)|0,C=(C=C+Math.imul(p,X)|0)+Math.imul(x,J)|0,j=j+Math.imul(x,X)|0,u=(ee+(T+Math.imul(u,Z)|0)|0)+((8191&(C=(C=C+Math.imul(u,Q)|0)+Math.imul(h,Z)|0))<<13)|0,ee=((j=j+Math.imul(h,Q)|0)+(C>>>13)|0)+(u>>>26)|0,u&=67108863,T=Math.imul(S,B),C=(C=Math.imul(S,L))+Math.imul(N,B)|0,j=Math.imul(N,L),T=T+Math.imul(A,U)|0,C=(C=C+Math.imul(A,F)|0)+Math.imul(E,U)|0,j=j+Math.imul(E,F)|0,T=T+Math.imul(I,q)|0,C=(C=C+Math.imul(I,W)|0)+Math.imul(_,q)|0,j=j+Math.imul(_,W)|0,T=T+Math.imul(w,V)|0,C=(C=C+Math.imul(w,K)|0)+Math.imul(k,V)|0,j=j+Math.imul(k,K)|0,T=T+Math.imul(v,G)|0,C=(C=C+Math.imul(v,Y)|0)+Math.imul(y,G)|0,j=j+Math.imul(y,Y)|0,T=T+Math.imul(m,J)|0,C=(C=C+Math.imul(m,X)|0)+Math.imul(g,J)|0,j=j+Math.imul(g,X)|0,p=(ee+(T+Math.imul(p,Z)|0)|0)+((8191&(C=(C=C+Math.imul(p,Q)|0)+Math.imul(x,Z)|0))<<13)|0,ee=((j=j+Math.imul(x,Q)|0)+(C>>>13)|0)+(p>>>26)|0,p&=67108863,T=Math.imul(S,U),C=(C=Math.imul(S,F))+Math.imul(N,U)|0,j=Math.imul(N,F),T=T+Math.imul(A,q)|0,C=(C=C+Math.imul(A,W)|0)+Math.imul(E,q)|0,j=j+Math.imul(E,W)|0,T=T+Math.imul(I,V)|0,C=(C=C+Math.imul(I,K)|0)+Math.imul(_,V)|0,j=j+Math.imul(_,K)|0,T=T+Math.imul(w,G)|0,C=(C=C+Math.imul(w,Y)|0)+Math.imul(k,G)|0,j=j+Math.imul(k,Y)|0,T=T+Math.imul(v,J)|0,C=(C=C+Math.imul(v,X)|0)+Math.imul(y,J)|0,j=j+Math.imul(y,X)|0,m=(ee+(T+Math.imul(m,Z)|0)|0)+((8191&(C=(C=C+Math.imul(m,Q)|0)+Math.imul(g,Z)|0))<<13)|0,ee=((j=j+Math.imul(g,Q)|0)+(C>>>13)|0)+(m>>>26)|0,m&=67108863,T=Math.imul(S,q),C=(C=Math.imul(S,W))+Math.imul(N,q)|0,j=Math.imul(N,W),T=T+Math.imul(A,V)|0,C=(C=C+Math.imul(A,K)|0)+Math.imul(E,V)|0,j=j+Math.imul(E,K)|0,T=T+Math.imul(I,G)|0,C=(C=C+Math.imul(I,Y)|0)+Math.imul(_,G)|0,j=j+Math.imul(_,Y)|0,T=T+Math.imul(w,J)|0,C=(C=C+Math.imul(w,X)|0)+Math.imul(k,J)|0,j=j+Math.imul(k,X)|0,v=(ee+(T+Math.imul(v,Z)|0)|0)+((8191&(C=(C=C+Math.imul(v,Q)|0)+Math.imul(y,Z)|0))<<13)|0,ee=((j=j+Math.imul(y,Q)|0)+(C>>>13)|0)+(v>>>26)|0,v&=67108863,T=Math.imul(S,V),C=(C=Math.imul(S,K))+Math.imul(N,V)|0,j=Math.imul(N,K),T=T+Math.imul(A,G)|0,C=(C=C+Math.imul(A,Y)|0)+Math.imul(E,G)|0,j=j+Math.imul(E,Y)|0,T=T+Math.imul(I,J)|0,C=(C=C+Math.imul(I,X)|0)+Math.imul(_,J)|0,j=j+Math.imul(_,X)|0,w=(ee+(T+Math.imul(w,Z)|0)|0)+((8191&(C=(C=C+Math.imul(w,Q)|0)+Math.imul(k,Z)|0))<<13)|0,ee=((j=j+Math.imul(k,Q)|0)+(C>>>13)|0)+(w>>>26)|0,w&=67108863,T=Math.imul(S,G),C=(C=Math.imul(S,Y))+Math.imul(N,G)|0,j=Math.imul(N,Y),T=T+Math.imul(A,J)|0,C=(C=C+Math.imul(A,X)|0)+Math.imul(E,J)|0,j=j+Math.imul(E,X)|0,I=(ee+(T+Math.imul(I,Z)|0)|0)+((8191&(C=(C=C+Math.imul(I,Q)|0)+Math.imul(_,Z)|0))<<13)|0,ee=((j=j+Math.imul(_,Q)|0)+(C>>>13)|0)+(I>>>26)|0,I&=67108863,T=Math.imul(S,J),C=(C=Math.imul(S,X))+Math.imul(N,J)|0,j=Math.imul(N,X),A=(ee+(T+Math.imul(A,Z)|0)|0)+((8191&(C=(C=C+Math.imul(A,Q)|0)+Math.imul(E,Z)|0))<<13)|0,ee=((j=j+Math.imul(E,Q)|0)+(C>>>13)|0)+(A>>>26)|0,A&=67108863,Z=(ee+Math.imul(S,Z)|0)+((8191&(C=(C=Math.imul(S,Q))+Math.imul(N,Z)|0))<<13)|0,ee=((j=Math.imul(N,Q))+(C>>>13)|0)+(Z>>>26)|0,Z&=67108863,i[0]=$,i[1]=z,i[2]=r,i[3]=n,i[4]=c,i[5]=o,i[6]=d,i[7]=e,i[8]=t,i[9]=f,i[10]=b,i[11]=u,i[12]=p,i[13]=m,i[14]=v,i[15]=w,i[16]=I,i[17]=A,i[18]=Z,0!=ee&&(i[19]=ee,a.length++),a};function p(e,t,a){return(new x).mulp(e,t,a)}function x(e,t){this.x=e,this.y=t}Math.imul||(h=u),c.prototype.mulTo=function(e,t){var a=this.length+e.length;return t=(10===this.length&&10===e.length?h:a<63?u:a<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var r=0,n=0,c=0;c>>26)|0)>>>26,d&=67108863}a.words[c]=o,r=d,d=n}return 0!==r?a.words[c]=r:a.length--,a.strip()}:p)(this,e,t),t},x.prototype.makeRBT=function(e){for(var t=new Array(e),a=c.prototype._countBits(e)-1,r=0;r>=1;return r},x.prototype.permute=function(e,t,a,r,n,c){for(var d=0;d>>=1)a++;return 1<>>=13),c>>>=13;for(d=2*t;d>=26,t+=n/67108864|0,t+=c>>>26,this.words[a]=67108863&c}return 0!==t&&(this.words[a]=t,this.length++),this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>r}return t}(e);if(0===t.length)return new c(1);for(var a=this,r=0;r>>26-t<<26-t;if(0!=t){for(var c=0,d=0;d>>26-t}c&&(this.words[d]=c,this.length++)}if(0!=a){for(d=this.length-1;0<=d;d--)this.words[d+a]=this.words[d];for(d=0;d>>c<d)for(this.length-=d,f=0;f>>c,s=b&o}return i&&0!==s&&(i.words[i.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(e,t,a){return r(0===this.negative),this.iushrn(e,t,a)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&0<=e);var t=e%26;return e=(e-t)/26,!(this.length<=e)&&!!(this.words[e]&1<>>t<>26)-(i/67108864|0),this.words[d+a]=67108863&o}for(;d>26,this.words[d+a]=67108863&o;if(0===c)return this.strip();for(r(-1===c),d=c=0;d>26,this.words[d]=67108863&o;return this.negative=1,this.strip()},c.prototype._wordDiv=function(e,t){var a=this.length-e.length,r=this.clone(),n=e,d=0|n.words[n.length-1];0!=(a=26-this._countBits(d))&&(n=n.ushln(a),r.iushln(a),d=0|n.words[n.length-1]);var o,i=r.length-n.length;if("mod"!==t){(o=new c(null)).length=1+i,o.words=new Array(o.length);for(var f=0;fthis.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,d,o},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1);return e=e.andln(1),(r=a.cmp(r))<0||1===e&&0===r?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,a=0,n=this.length-1;0<=n;n--)a=(t*a+(0|this.words[n]))%e;return a},c.prototype.idivn=function(e){r(e<=67108863);for(var t=0,a=this.length-1;0<=a;a--){var n=(0|this.words[a])+67108864*t;this.words[a]=n/e|0,t=n%e}return this.strip()},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());for(var t=this,a=e.clone(),n=(t=0!==t.negative?t.umod(e):t.clone(),new c(1)),d=new c(0),o=new c(0),i=new c(1),f=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++f;for(var s=a.clone(),b=t.clone();!t.isZero();){for(var l=0,u=1;0==(t.words[0]&u)&&l<26;++l,u<<=1);if(0>>26,c&=67108863,this.words[n]=c}return 0!==a&&(this.words[n]=a,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this.strip(),e=1e.length)return 1;if(this.lengththis.n;);return 0===(e=t>>22,n=c}0===(e.words[r-10]=n>>>=22)&&10>>=26,e.words[a]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return m[e]=t},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,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.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,t){return this._verify2(e,t),0<=(t=e.add(t)).cmp(this.m)&&t.isub(this.m),t._forceRed(this)},I.prototype.iadd=function(e,t){return this._verify2(e,t),0<=(t=e.iadd(t)).cmp(this.m)&&t.isub(this.m),t},I.prototype.sub=function(e,t){return this._verify2(e,t),(t=e.sub(t)).cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},I.prototype.isub=function(e,t){return this._verify2(e,t),(t=e.isub(t)).cmpn(0)<0&&t.iadd(this.m),t},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},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 t=this.m.andln(3);if(r(t%2==1),3===t)return t=this.m.add(new c(1)).iushrn(2),this.pow(e,t);for(var a=this.m.subn(1),n=0;!a.isZero()&&0===a.andln(1);)n++,a.iushrn(1);r(!a.isZero());for(var d=new c(1).toRed(this),o=d.redNeg(),i=this.m.subn(1).iushrn(1),f=new c(2*(f=this.m.bitLength())*f).toRed(this);0!==this.pow(f,i).cmp(o);)f.redIAdd(o);for(var s=this.pow(f,a),b=this.pow(e,a.addn(1).iushrn(1)),l=this.pow(e,a),u=n;0!==l.cmp(d);){for(var h=l,p=0;0!==h.cmp(d);p++)h=h.redSqr();r(p>s&1;n!==a[0]&&(n=this.sqr(n)),0!=b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(n=this.mul(n,a[d]),d=o=0)):o=0}i=26}return n},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){return(e=e.clone()).red=null,e},c.mont=function(e){return new _(e)},n(_,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,t){return e.isZero()||t.isZero()?(e.words[0]=0,e.length=1,e):(t=(e=e.imul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=e=e.isub(t).iushrn(this.shift),0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this))},_.prototype.mul=function(e,t){return e.isZero()||t.isZero()?new c(0)._forceRed(this):(t=(e=e.mul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),t=e=e.isub(t).iushrn(this.shift),0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this))},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:11}],10:[function(e,t,r){(function(e){(function(){t.exports=function(t){return t=new Uint8Array(t),(e.crypto||e.msCrypto).getRandomValues(t),t}}).call(this)}).call(this,"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,a){},{}],12:[function(e,t,a){"use strict";a.version=e("../package.json").version,a.utils=e("./elliptic/utils"),a.rand=e("brorand"),a.curve=e("./elliptic/curve"),a.curves=e("./elliptic/curves"),a.ec=e("./elliptic/ec"),a.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,t,a){"use strict";var r=e("bn.js"),n=e("../utils"),c=n.getNAF,d=n.getJSF,o=n.assert;function i(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.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=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.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,!(t=this.n&&this.p.div(this.n))||0>1]):i.mixedAdd(n[-b-1>>1].neg()):0>1]):i.add(n[-b-1>>1].neg())}return"affine"===e.type?i.toP():i},i.prototype._wnafMulAdd=function(e,t,a,r,n){for(var o=this._wnafT1,i=this._wnafT2,f=this._wnafT3,s=0,b=0;b>1]:E<0&&(l=i[A][-E-1>>1].neg()),w="affine"===l.type?w.mixedAdd(l):w.add(l))}}for(b=0;b=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var a=[this],r=this,n=0;n":""},f.prototype.isInfinity=function(){return this.inf},f.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=(t=0!==(t=this.y.redSub(e.y)).cmpn(0)?t.redMul(this.x.redSub(e.x).redInvm()):t).redSqr().redISub(this.x).redISub(e.x);var t=t.redMul(this.x.redSub(e)).redISub(this.y);return this.curve.point(e,t)},f.prototype.dbl=function(){if(this.inf)return this;if(0===(a=this.y.redAdd(this.y)).cmpn(0))return this.curve.point(null,null);var e=this.curve.a,t=this.x.redSqr(),a=a.redInvm();return a=(e=t.redAdd(t).redIAdd(t).redIAdd(e).redMul(a)).redSqr().redISub(this.x.redAdd(this.x)),e=e.redMul(this.x.redSub(a)).redISub(this.y),this.curve.point(a,e)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new n(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)},f.prototype.mulAdd=function(e,t,a){return t=[this,t],a=[e,a],this.curve.endo?this.curve._endoWnafMulAdd(t,a):this.curve._wnafMulAdd(1,t,a,2)},f.prototype.jmulAdd=function(e,t,a){return t=[this,t],a=[e,a],this.curve.endo?this.curve._endoWnafMulAdd(t,a,!0):this.curve._wnafMulAdd(1,t,a,2,!0)},f.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))},f.prototype.neg=function(e){if(this.inf)return this;var t,a=this.curve.point(this.x,this.y.redNeg());return e&&this.precomputed&&(t=this.precomputed,e=function(e){return e.neg()},a.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(e)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(e)}}),a},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},c(s,d.BasePoint),i.prototype.jpoint=function(e,t,a){return new s(this,e,t,a)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=(a=this.z.redInvm()).redSqr(),t=this.x.redMul(e),a=this.y.redMul(e).redMul(a);return this.curve.point(t,a)},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 t=e.z.redSqr(),a=this.z.redSqr(),r=this.x.redMul(t),n=e.x.redMul(a),c=this.y.redMul(t.redMul(e.z)),d=e.y.redMul(a.redMul(this.z));return t=r.redSub(n),a=c.redSub(d),0===t.cmpn(0)?0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(d=(n=t.redSqr()).redMul(t),r=r.redMul(n),n=a.redSqr().redIAdd(d).redISub(r).redISub(r),d=a.redMul(r.redISub(n)).redISub(c.redMul(d)),t=this.z.redMul(e.z).redMul(t),this.curve.jpoint(n,d,t))},s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),a=this.x,r=e.x.redMul(t),n=this.y,c=e.y.redMul(t).redMul(this.z);return e=a.redSub(r),t=n.redSub(c),0===e.cmpn(0)?0!==t.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(c=(r=e.redSqr()).redMul(e),a=a.redMul(r),r=t.redSqr().redIAdd(c).redISub(a).redISub(a),c=t.redMul(a.redISub(r)).redISub(n.redMul(c)),e=this.z.redMul(e),this.curve.jpoint(r,c,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 t=this,a=0;a":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":24,"./base":13,"bn.js":9,inherits:39}],18:[function(e,t,a){"use strict";var r,n=a,c=(a=e("hash.js"),e("./curve")),d=e("./utils").assert;function o(e){"short"===e.type?this.curve=new c.short(e):"edwards"===e.type?this.curve=new c.edwards(e):this.curve=new c.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 i(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var a=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:a}),a}})}n.PresetCurve=o,i("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:a.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"]}),i("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:a.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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),i("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1")}catch(e){r=void 0}i("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:a.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,t,a){"use strict";var r=e("bn.js"),n=e("hmac-drbg"),c=e("../utils"),d=e("../curves"),o=e("brorand"),i=c.assert,f=e("./key"),s=e("./signature");function b(e){if(!(this instanceof b))return new b(e);"string"==typeof e&&(i(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}(t.exports=b).prototype.keyPair=function(e){return new f(this,e)},b.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},b.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},b.prototype.genKeyPair=function(e){for(var t=new n({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()}),a=this.n.byteLength(),c=this.n.sub(new r(2));;){var d=new r(t.generate(a));if(!(0>=1,0<=o.cmp(this.curve.p.umod(this.curve.n))&&a)throw new Error("Unable to find sencond key candinate");return o=a?this.curve.pointFromX(o.add(this.curve.n),e):this.curve.pointFromX(o,e),t=t.r.invm(c),d=c.sub(d).mul(t).umod(c),c=n.mul(t).umod(c),this.g.mulAdd(d,o,c)},b.prototype.getKeyRecoveryParam=function(e,t,a,r){if(null!==(t=new s(t,r)).recoveryParam)return t.recoveryParam;for(var n,c=0;c<4;c++){try{n=this.recoverPubKey(e,t,c)}catch(e){continue}if(n.eq(a))return c}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,t,a){"use strict";var r=e("bn.js"),n=e("../utils").assert;function c(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}(t.exports=c).fromPublic=function(e,t,a){return t instanceof c?t:new c(e,{pub:t,pubEnc:a})},c.fromPrivate=function(e,t,a){return t instanceof c?t:new c(e,{priv:t,privEnc:a})},c.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"}},c.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},c.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},c.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},c.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(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,t)},c.prototype.derive=function(e){return e.validate()||n(e.validate(),"public point not validated"),e.mul(this.priv).getX()},c.prototype.sign=function(e,t,a){return this.ec.sign(e,this,t,a)},c.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},c.prototype.inspect=function(){return""}},{"../utils":24,"bn.js":9}],21:[function(e,t,a){"use strict";var r=e("bn.js"),n=e("../utils"),c=n.assert;function d(e,t){if(e instanceof d)return e;this._importDER(e,t)||(c(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 i(e,t){var a=e[t.place++];if(!(128&a))return a;var r=15&a;if(0==r||4>>=0;return!(n<=127)&&(t.place=d,n)}function f(e){for(var t=0,a=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|a);--a;)e.push(t>>>(a<<3)&255);e.push(t)}}(t.exports=d).prototype._importDER=function(e,t){e=n.toArray(e,t);var a=new o;if(48!==e[a.place++])return!1;var c=i(e,a);if(!1===c)return!1;if(c+a.place!==e.length)return!1;if(2!==e[a.place++])return!1;if(!1===(t=i(e,a)))return!1;if(c=e.slice(a.place,t+a.place),a.place+=t,2!==e[a.place++])return!1;if(!1===(t=i(e,a)))return!1;if(e.length!==t+a.place)return!1;if(a=e.slice(a.place,t+a.place),0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new r(c),this.s=new r(a),!(this.recoveryParam=null)},d.prototype.toDER=function(e){var t=this.r.toArray(),a=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&a[0]&&(a=[0].concat(a)),t=f(t),a=f(a);!(a[0]||128&a[1]);)a=a.slice(1);var r=[2];return s(r,t.length),(r=r.concat(t)).push(2),s(r,a.length),t=r.concat(a),s(r=[48],t.length),r=r.concat(t),n.encode(r,e)}},{"../utils":24,"bn.js":9}],22:[function(e,t,a){arguments[4][14][0].apply(a,arguments)},{dup:14}],23:[function(e,t,a){t.exports=void 0},{}],24:[function(e,t,a){"use strict";var r=a,n=e("bn.js");a=e("minimalistic-assert"),e=e("minimalistic-crypto-utils"),r.assert=a,r.toArray=e.toArray,r.zero2=e.zero2,r.toHex=e.toHex,r.encode=e.encode,r.getNAF=function(e,t,a){var r=new Array(Math.max(e.bitLength(),a)+1);r.fill(0);for(var n=1<>1)-1>1)-i:i):o=0,r[d]=o,c.iushrn(1)}return r},r.getJSF=function(e,t){var a=[[],[]];e=e.clone(),t=t.clone();for(var r,n=0,c=0;0=this._delta8){t=(e=this.pending).length%this._delta8,this.pending=e.slice(e.length-t,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-t,this.endian);for(var a=0;a>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,c=8;cthis.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t>>3},a.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},{"../utils":37}],37:[function(e,t,a){"use strict";var r=e("minimalistic-assert");function n(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function c(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"),a.inherits=e,a.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var a=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r>8,c=255&c;n?a.push(n,c):a.push(c)}else for(r=0;r>>0}return c},a.split32=function(e,t){for(var a=new Array(4*e.length),r=0,n=0;r>>24,a[n+1]=c>>>16&255,a[n+2]=c>>>8&255,a[n+3]=255&c):(a[n+3]=c>>>24,a[n+2]=c>>>16&255,a[n+1]=c>>>8&255,a[n]=255&c)}return a},a.rotr32=function(e,t){return e>>>t|e<<32-t},a.rotl32=function(e,t){return e<>>32-t},a.sum32=function(e,t){return e+t>>>0},a.sum32_3=function(e,t,a){return e+t+a>>>0},a.sum32_4=function(e,t,a,r){return e+t+a+r>>>0},a.sum32_5=function(e,t,a,r,n){return e+t+a+r+n>>>0},a.sum64=function(e,t,a,r){var n=e[t],c=r+e[t+1]>>>0;e[t]=(c>>0,e[t+1]=c},a.sum64_hi=function(e,t,a,r){return(t+r>>>0>>0},a.sum64_lo=function(e,t,a,r){return t+r>>>0},a.sum64_4_hi=function(e,t,a,r,n,c,d,o){var i=0,f=t;return i+=(f=t+r>>>0)>>0)>>0)>>0},a.sum64_4_lo=function(e,t,a,r,n,c,d,o){return t+r+c+o>>>0},a.sum64_5_hi=function(e,t,a,r,n,c,d,o,i,f){var s=0,b=t;return s+=(b=t+r>>>0)>>0)>>0)>>0)>>0},a.sum64_5_lo=function(e,t,a,r,n,c,d,o,i,f){return t+r+c+o+f>>>0},a.rotr64_hi=function(e,t,a){return(t<<32-a|e>>>a)>>>0},a.rotr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0},a.shr64_hi=function(e,t,a){return e>>>a},a.shr64_lo=function(e,t,a){return(e<<32-a|t>>>a)>>>0}},{inherits:39,"minimalistic-assert":41}],38:[function(e,t,a){"use strict";var r=e("hash.js"),n=e("minimalistic-crypto-utils"),c=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 t=n.toArray(e.entropy,e.entropyEnc||"hex"),a=n.toArray(e.nonce,e.nonceEnc||"hex");e=n.toArray(e.pers,e.persEnc||"hex"),c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,a,e)}(t.exports=d).prototype._init=function(e,t,a){a=e.concat(t).concat(a),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(a||[])),this._reseed=1},d.prototype.generate=function(e,t,a,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=a,a=t,t=null),a&&(a=n.toArray(a,r||"hex"),this._update(a));for(var c=[];c.length>5,this.byteCount=this.blockCount<<2,this.outputBlocks=a>>5,this.extraBytes=(31&a)>>3;for(var r=0;r<50;++r)this.s[r]=0}w.prototype.update=function(e){for(var t,a,r="string"!=typeof e,n=(e=r&&e.constructor===ArrayBuffer?new Uint8Array(e):e).length,c=this.blocks,o=this.byteCount,i=this.blockCount,f=0,s=this.s;f>2]|=e[f]<>2]|=a<>2]|=(192|a>>6)<>2]|=(224|a>>12)<>2]|=(240|a>>18)<>2]|=(128|a>>12&63)<>2]|=(128|a>>6&63)<>2]|=(128|63&a)<>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[a],t=1;t>4&15]+c[15&e]+c[e>>12&15]+c[e>>8&15]+c[e>>20&15]+c[e>>16&15]+c[e>>28&15]+c[e>>24&15];o%t==0&&(k(a),d=0)}return n&&(e=a[d],0>4&15]+c[15&e]),1>12&15]+c[e>>8&15]),2>20&15]+c[e>>16&15])),i},w.prototype.arrayBuffer=function(){this.finalize();for(var e=this.blockCount,t=this.s,a=this.outputBlocks,r=this.extraBytes,n=0,c=0,d=this.outputBits>>3,o=r?new ArrayBuffer(a+1<<2):new ArrayBuffer(d),i=new Uint32Array(o);c>8&255,i[e+2]=t>>16&255,i[e+3]=t>>24&255;o%a==0&&k(r)}return c&&(e=o<<2,t=r[d],0>8&255),2>16&255)),i};var k=function(e){for(var t,a,r,n,c,d,i,f,s,b,l,u,h,p,x,m,g,v,y,w,k,I,_,A,E,S,N,M,H,T,P,R,C,O,D,B,L,j,U,F,z,q,W,V,K,G,Y,J,X,Z,Q=0;Q<48;Q+=2)N=e[0]^e[10]^e[20]^e[30]^e[40],M=e[1]^e[11]^e[21]^e[31]^e[41],F=e[2]^e[12]^e[22]^e[32]^e[42],U=e[3]^e[13]^e[23]^e[33]^e[43],R=e[4]^e[14]^e[24]^e[34]^e[44],P=e[5]^e[15]^e[25]^e[35]^e[45],G=e[6]^e[16]^e[26]^e[36]^e[46],K=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],b=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(U<<1|F>>>31),e[0]^=s=h^(F<<1|U>>>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=M^(P<<1|R>>>31),e[2]^=s=N^(R<<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=U^(K<<1|G>>>31),e[4]^=s=F^(G<<1|K>>>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^(p<<1|h>>>31),e[6]^=s=R^(h<<1|p>>>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=K^(M<<1|N>>>31),e[8]^=s=G^(N<<1|M>>>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,t=e[0],a=e[1],C=e[11]<<4|e[10]>>>28,O=e[10]<<4|e[11]>>>28,x=e[20]<<3|e[21]>>>29,m=e[21]<<3|e[20]>>>29,Y=e[31]<<9|e[30]>>>23,J=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,T=e[41]<<18|e[40]>>>14,k=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,r=e[13]<<12|e[12]>>>20,n=e[12]<<12|e[13]>>>20,D=e[22]<<10|e[23]>>>22,B=e[23]<<10|e[22]>>>22,g=e[33]<<13|e[32]>>>19,v=e[32]<<13|e[33]>>>19,X=e[42]<<2|e[43]>>>30,Z=e[43]<<2|e[42]>>>30,z=e[5]<<30|e[4]>>>2,q=e[4]<<30|e[5]>>>2,_=e[14]<<6|e[15]>>>26,A=e[15]<<6|e[14]>>>26,c=e[25]<<11|e[24]>>>21,d=e[24]<<11|e[25]>>>21,L=e[34]<<15|e[35]>>>17,j=e[35]<<15|e[34]>>>17,y=e[45]<<29|e[44]>>>3,w=e[44]<<29|e[45]>>>3,l=e[6]<<28|e[7]>>>4,u=e[7]<<28|e[6]>>>4,W=e[17]<<23|e[16]>>>9,V=e[16]<<23|e[17]>>>9,E=e[26]<<25|e[27]>>>7,S=e[27]<<25|e[26]>>>7,i=e[36]<<21|e[37]>>>11,f=e[37]<<21|e[36]>>>11,U=e[47]<<24|e[46]>>>8,F=e[46]<<24|e[47]>>>8,P=e[8]<<27|e[9]>>>5,R=e[9]<<27|e[8]>>>5,h=e[18]<<20|e[19]>>>12,p=e[19]<<20|e[18]>>>12,K=e[29]<<7|e[28]>>>25,G=e[28]<<7|e[29]>>>25,N=e[38]<<8|e[39]>>>24,M=e[39]<<8|e[38]>>>24,s=e[48]<<14|e[49]>>>18,b=e[49]<<14|e[48]>>>18,e[0]=t^~r&c,e[1]=a^~n&d,e[10]=l^~h&x,e[11]=u^~p&m,e[20]=k^~_&E,e[21]=I^~A&S,e[30]=P^~C&D,e[31]=R^~O&B,e[40]=z^~W&K,e[41]=q^~V&G,e[2]=r^~c&i,e[3]=n^~d&f,e[12]=h^~x&g,e[13]=p^~m&v,e[22]=_^~E&N,e[23]=A^~S&M,e[32]=C^~D&L,e[33]=O^~B&j,e[42]=W^~K&Y,e[43]=V^~G&J,e[4]=c^~i&s,e[5]=d^~f&b,e[14]=x^~g&y,e[15]=m^~v&w,e[24]=E^~N&H,e[25]=S^~M&T,e[34]=D^~L&U,e[35]=B^~j&F,e[44]=K^~Y&X,e[45]=G^~J&Z,e[6]=i^~s&t,e[7]=f^~b&a,e[16]=g^~y&l,e[17]=v^~w&u,e[26]=N^~H&k,e[27]=M^~T&I,e[36]=L^~U&P,e[37]=j^~F&R,e[46]=Y^~X&z,e[47]=J^~Z&q,e[8]=s^~t&r,e[9]=b^~a&n,e[18]=y^~l&h,e[19]=w^~u&p,e[28]=H^~k&_,e[29]=T^~I&A,e[38]=U^~P&C,e[39]=F^~R&O,e[48]=X^~z&W,e[49]=Z^~q&V,e[0]^=o[Q],e[1]^=o[Q+1]};if(n)t.exports=h;else for(x=0;x>8,c=255&c;n?a.push(n,c):a.push(c)}return a},a.zero2=r,a.toHex=n,a.encode=function(e,t){return"hex"===t?n(e):e}},{}],43:[function(e,t,a){t.exports={browser:!0}},{}],44:[function(e,t,a){(function(e){(function(){"use strict";function r(e){var t=[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],a=1779033703,r=3144134277,n=1013904242,c=2773480762,d=1359893119,o=2600822924,i=528734635,f=1541459225,s=new Array(64);function b(e){for(var b=0,l=e.length;64<=l;){for(var u,h,p,x,m=a,g=r,v=n,y=c,w=d,k=o,I=i,_=f,A=0;A<16;A++)s[A]=(255&e[h=b+4*A])<<24|(255&e[h+1])<<16|(255&e[h+2])<<8|255&e[h+3];for(A=16;A<64;A++)p=((u=s[A-2])>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,u=s[A-15],s[A]=(p+s[A-7]|0)+((x=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3)+s[A-16]|0)|0;for(A=0;A<64;A++)p=(((w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7))+(w&k^~w&I)|0)+(_+(t[A]+s[A]|0)|0)|0,x=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&g^m&v^g&v)|0,_=I,I=k,k=w,w=y+p|0,y=v,v=g,g=m,m=p+x|0;a=a+m|0,r=r+g|0,n=n+v|0,c=c+y|0,d=d+w|0,o=o+k|0,i=i+I|0,f=f+_|0,b+=64,l-=64}}b(e);var l,u=e.length%64,h=e.length/536870912|0,p=e.length<<3,x=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(p>>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),b(m),[a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>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,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255]}function n(e,t,a){e=e.length<=64?e:r(e);for(var n=64+t.length+4,c=new Array(n),d=new Array(64),o=[],i=0;i<64;i++)c[i]=54;for(i=0;i>>32-t}function o(e,t,a,r){for(var n=0;n>8&255),p.push(x[e]>>16&255),p.push(x[e]>>24&255);var s=n(t,p,l);return h(null,1,s)}R(C)};C()}var l,u;l=this,u=2147483647,void 0!==a?t.exports=b:l&&(l.scrypt&&(l._scrypt=l.scrypt),l.scrypt=b)}).call(this)}).call(this,e("timers").setImmediate)},{timers:46}],45:[function(e,t,r){(function(e,t,a){(function(){!function(t,a){"use strict";var r,n,c,d,o,i,f,s;function b(e){return n[r]=l.apply(a,e),r++}function l(e){var t=[].slice.call(arguments,1);return function(){"function"==typeof e?e.apply(a,t):new Function(""+e)()}}function u(e){if(c)setTimeout(l(u,e),0);else{var t=n[e];if(t){c=!0;try{t()}finally{h(e),c=!1}}}}function h(e){delete n[e]}function p(){function e(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&u(+e.data.slice(a.length))}var a="setImmediate$"+Math.random()+"$";t.addEventListener?t.addEventListener("message",e,!1):t.attachEvent("onmessage",e),o=function(){var e=b(arguments);return t.postMessage(a+e,"*"),e}}t.setImmediate||(r=1,c=!(n={}),d=t.document,s=(s=Object.getPrototypeOf&&Object.getPrototypeOf(t))&&s.setTimeout?s:t,"[object process]"==={}.toString.call(t.process)?o=function(){var t=b(arguments);return e.nextTick(l(u,t)),t}:function(){if(t.postMessage&&!t.importScripts){var e=!0,a=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=a,e}}()?p():o=t.MessageChannel?((f=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(){var e=b(arguments);return f.port2.postMessage(e),e}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,function(){var e=b(arguments),t=d.createElement("script");return t.onreadystatechange=function(){u(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t),e}):function(){var e=b(arguments);return setTimeout(l(u,e),0),e},s.setImmediate=o,s.clearImmediate=h)}("undefined"==typeof self?void 0===t?this:t:self)}).call(this)}).call(this,e("_process"),"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").clearImmediate)},{_process:43,timers:46}],46:[function(e,t,r){(function(e){(function(){t.exports={setImmediate:e.setImmediate}}).call(this)}).call(this,"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(e,t,r){(function(e){(function(){var a,r,n;e.crypto&&crypto.getRandomValues&&(a=new Uint8Array(16),r=function(){return crypto.getRandomValues(a),a}),r||(n=new Array(16),r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}),t.exports=r}).call(this)}).call(this,"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(e,t,a){for(var r=e("./rng"),n=[],c={},d=0;d<256;d++)n[d]=(d+256).toString(16).substr(1),c[n[d]]=d;function o(e,t){return t=t||0,n[e[t++]]+n[e[t++]]+n[e[t++]]+n[e[t++]]+"-"+n[e[t++]]+n[e[t++]]+"-"+n[e[t++]]+n[e[t++]]+"-"+n[e[t++]]+n[e[t++]]+"-"+n[e[t++]]+n[e[t++]]+n[e[t++]]+n[e[t++]]+n[e[t++]]+n[e[t++]]}var i=[1|(e=r())[0],e[1],e[2],e[3],e[4],e[5]],f=16383&(e[6]<<8|e[7]),s=0,b=0;function l(e,t,a){var n=t&&a||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var c=(e=e||{}).random||(e.rng||r)();if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,t)for(var d=0;d<16;d++)t[n+d]=c[d];return t||o(c)}(e=l).v1=function(e,t,a){var r=t&&a||0,n=t||[],c=void 0!==(e=e||{}).clockseq?e.clockseq:f,d=void 0!==e.msecs?e.msecs:(new Date).getTime(),l=void 0!==e.nsecs?e.nsecs:b+1;if((a=d-s+(l-b)/1e4)<0&&void 0===e.clockseq&&(c=c+1&16383),1e4<=(l=(a<0||s>>24&255,n[r++]=l>>>16&255,n[r++]=l>>>8&255,n[r++]=255&l,d=d/4294967296*1e4&268435455,n[r++]=d>>>8&255,n[r++]=255&d,n[r++]=d>>>24&15|16,n[r++]=d>>>16&255,n[r++]=c>>>8|128,n[r++]=255&c;for(var u=e.node||i,h=0;h<6;h++)n[r+h]=u[h];return t||o(n)},e.v4=l,e.parse=function(e,t,a){var r=t&&a||0,n=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,(function(e){n<16&&(t[r+n++]=c[e])}));n<16;)t[r+n++]=0;return t},e.unparse=o,t.exports=e},{"./rng":47}],49:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});try{t.exports.XMLHttpRequest=XMLHttpRequest}catch(e){console.log("Warning: XMLHttpRequest is not defined"),t.exports.XMLHttpRequest=null}},{}],50:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("../utils/properties");function n(){r.setType(this,"Provider")}n.isProvider=function(e){return r.isType(e,"Provider")},e=n,a.Provider=e},{"../utils/properties":74}],51:[function(e,t,a){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},function(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var d=e("../utils/address"),o=e("../utils/bignumber"),i=e("../utils/bytes"),f=e("../constants"),s=e("../utils/hash"),b=e("../utils/networks"),l=e("../utils/properties"),u=e("../utils/rlp"),h=e("../utils/transaction"),p=e("../utils/utf8"),x=e("../utils/web"),m=c(e("../errors")),g=e("./abstract-provider");function v(e,t){var a,r={};for(a in e)try{var n=e[a](t[a]);void 0!==n&&(r[a]=n)}catch(e){throw e.checkKey=a,e.checkValue=t[a],e}return r}function y(e,t){return function(a){return null==a?t:e(a)}}function w(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");var a=[];return t.forEach((function(t){a.push(e(t))})),a}}function k(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),32===i.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(!i.isHexString(e))throw new Error("invalid uint256");for(;e.length<66;)e="0x0"+e.substring(2);return e}function A(e){if(null==e)return"latest";if("earliest"===e)return"0x0";if("latest"===e||"pending"===e)return e;if("number"==typeof e)return i.hexStripZeros(i.hexlify(e));if(i.isHexString(e))return i.hexStripZeros(e);throw new Error("invalid blockTag")}var E={hash:k,blockHash:y(k,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:i.hexlify,r:y(_),s:y(_),v:y(I),creates:y(d.getAddress,null),raw:y(i.hexlify)};function S(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&&(a=[i.stripZeros(i.hexlify(e.nonce)),i.stripZeros(i.hexlify(e.gasPrice)),i.stripZeros(i.hexlify(e.gasLimit)),e.to||"0x",i.stripZeros(i.hexlify(e.value||"0x")),i.hexlify(e.data||"0x"),i.stripZeros(i.hexlify(e.v||"0x")),i.stripZeros(i.hexlify(e.r)),i.stripZeros(i.hexlify(e.s))],e.raw=u.encode(a));var t=v(E,e),a=e.networkId;return null!=e.chainId&&null==a&&null==t.v&&(a=e.chainId),"number"!=typeof(a=i.isHexString(a)?o.bigNumberify(a).toNumber():a)&&null!=t.v&&((a=(t.v-35)/2)<0&&(a=0),a=parseInt(a)),t.networkId=a="number"!=typeof a?0:a,null==t.chainId&&null!=a&&(t.chainId=a),t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}var N={hash:k,parentHash:k,number:I,timestamp:I,nonce:y(i.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:i.hexlify,transactions:y(w(k))},M=l.shallowCopy(N);function H(e,t){return null!=e.author&&null==e.miner&&(e.miner=e.author),v(t?M:N,e)}M.transactions=y(w(S));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(i.hexlify)};function P(e){return v(T,e)}var R={transactionLogIndex:y(I),transactionIndex:I,blockNumber:I,transactionHash:k,address:d.getAddress,topics:w(k),data:i.hexlify,logIndex:I,blockHash:k},C={to:y(d.getAddress,null),from:y(d.getAddress,null),contractAddress:y(d.getAddress,null),transactionIndex:I,root:y(k),gasUsed:o.bigNumberify,logsBloom:y(i.hexlify),blockHash:k,transactionHash:k,logs:w((function(e){return v(R,e)})),blockNumber:I,confirmations:y(I,null),cumulativeGasUsed:o.bigNumberify,status:y(I)};function O(e){return Array.isArray(e)?e.forEach((function(e){O(e)})):null!=e&&k(e),e}var D,B,L,j={fromBlock:y(A,void 0),toBlock:y(A,void 0),address:y(d.getAddress,void 0),topics:y(O,void 0)},U={blockHash:y(k,void 0),address:y(d.getAddress,void 0),topics:y(O,void 0)},F={blockNumber:y(I),blockHash:y(k),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=i.hexlify,B="0x",function(e){return e?D(e):B}),topics:w(k),transactionHash:k,logIndex:I};function z(e){return v(F,e)}function q(e){return e.map((function(e){return"string"==typeof e?e:Array.isArray(e)?(e.forEach((function(e){null!==e&&32!==i.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 W(e){if("string"==typeof e){if(20===i.hexDataLength(e))return"address:"+d.getAddress(e);if(e=e.toLowerCase(),32===i.hexDataLength(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter::"+q(e);if(e&&"object"==typeof e)return"filter:"+(e.address||"")+":"+q(e.topics||[])}throw new Error("invalid event - "+e)}function V(){return(new Date).getTime()}function K(e){var t,a=L.call(this)||this;return m.checkNew(a,g.Provider),e instanceof Promise?(l.defineReadOnly(a,"ready",e.then((function(e){return l.defineReadOnly(a,"_network",e),e}))),a.ready.catch((function(e){}))):(t=b.getNetwork(null==e?"homestead":e))?(l.defineReadOnly(a,"_network",t),l.defineReadOnly(a,"ready",Promise.resolve(a._network))):m.throwError("invalid network",m.INVALID_ARGUMENT,{arg:"network",value:e}),a._lastBlockNumber=-2,a._balances={},a._events=[],a._pollingInterval=4e3,a._emitted={block:-2},a._fastQueryDate=0,a}n(K,L=g.Provider),K.prototype._doPoll=function(){var e=this;this.getBlockNumber().then((function(t){if(e.polling&&(e._setFastBlockNumber(t),t!==e._lastBlockNumber)){-2===e._emitted.block&&(e._emitted.block=t-1);for(var a=e._emitted.block+1;a<=t;a++)e.emit("block",a);e._emitted.block!==t&&(e._emitted.block=t,Object.keys(e._emitted).forEach((function(a){var r;"block"===a||"pending"!==(r=e._emitted[a])&&122*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise},K.prototype._setFastBlockNumber=function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))},K.prototype.waitForTransaction=function(e,t){var a=this;return null==t&&(t=1),this.getTransactionReceipt(e).then((function(r){return 0===t||r&&r.confirmations>=t?r:new Promise((function(r){var n=function(c){c.confirmations(t=t.substring(64)).length)return null;var r=p.toUtf8String("0x"+t.substring(0,2*a));return n.resolveName(r).then((function(t){return t!=e?null:r}))}))},K.checkTransactionResponse=S,K.prototype.doPoll=function(){},K.prototype.perform=function(e,t){return m.throwError(e+" not implemented",m.NOT_IMPLEMENTED,{operation:e}),null},K.prototype._startPending=function(){m.warn("WARNING: this provider does not support pending events")},K.prototype._stopPending=function(){},K.prototype._addEventListener=function(e,t,a){this._events.push({tag:W(e),listener:t,once:a}),"pending"===e&&this._startPending(),this.polling=!0},K.prototype.on=function(e,t){return this._addEventListener(e,t,!1),this},K.prototype.once=function(e,t){return this._addEventListener(e,t,!0),this},K.prototype.addEventListener=function(e,t){return this.on(e,t)},K.prototype.emit=function(e){for(var t=this,a=[],r=1;re.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}},S);function S(e,t){return A.call(this,e,"null","",t,!1)||this}var N,M=(n(H,N=w),H.prototype.encode=function(e){try{var t=f.bigNumberify(e);if(this.signed){var a=d.MaxUint256.maskn(8*this.size-1);if(t.gt(a))throw new Error("out-of-bounds");if(a=a.add(d.One).mul(d.NegativeOne),t.lt(a))throw new Error("out-of-bounds")}else if(t.lt(d.Zero)||t.gt(d.MaxUint256.maskn(8*this.size)))throw new Error("out-of-bounds");return t=t.toTwos(8*this.size).maskn(8*this.size),this.signed&&(t=t.fromTwos(8*this.size).toTwos(256)),s.padZeros(s.arrayify(t),32)}catch(t){o.throwError("invalid number value",o.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e})}return null},H.prototype.decode=function(e,t){e.length>1]>>4&&(t[n]=t[n].toUpperCase()),8<=(15&a[n>>1])&&(t[n+1]=t[n+1].toUpperCase());return"0x"+t.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 t="";for(e.split("").forEach((function(e){t+=s[e]}));t.length>=u;){var a=t.substring(0,u);t=parseInt(a,10)%97+t.substring(a.length)}for(var r=String(98-parseInt(t,10)%97);r.length<2;)r="0"+r;return r}function p(e){var t=null;if("string"!=typeof e&&i.throwError("invalid address",i.INVALID_ARGUMENT,{arg:"address",value:e}),e.match(/^(0x)?[0-9a-fA-F]{40}$/))t=f(e="0x"!==e.substring(0,2)?"0x"+e:e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&i.throwError("bad address checksum",i.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)&&i.throwError("bad icap checksum",i.INVALID_ARGUMENT,{arg:"address",value:e}),t=new n.default.BN(e.substring(4),36).toString(16);t.length<40;)t="0"+t;t=f("0x"+t)}else i.throwError("invalid address",i.INVALID_ARGUMENT,{arg:"address",value:e});return t}a.getAddress=p,a.getIcapAddress=function(e){for(var t=new n.default.BN(p(e).substring(2),16).toString(36).toUpperCase();t.length<30;)t="0"+t;return"XE"+h("XE00"+t)+t},a.getContractAddress=function(e){if(!e.from)throw new Error("missing from address");var t=e.nonce;return p("0x"+d.keccak256(o.encode([p(e.from),c.stripZeros(c.hexlify(t))])).substring(26))},a.getCreate2Address=function(e){var t=e.initCodeHash;e.initCode&&(t?d.keccak256(e.initCode)!==t&&i.throwError("initCode/initCodeHash mismatch",i.INVALID_ARGUMENT,{arg:"options",value:e}):t=d.keccak256(e.initCode)),t||i.throwError("missing initCode or initCodeHash",i.INVALID_ARGUMENT,{arg:"options",value:e});var a=p(e.from),r=c.arrayify(e.salt);return 32!==r.length&&i.throwError("invalid salt",i.INVALID_ARGUMENT,{arg:"options",value:e}),p("0x"+d.keccak256(c.concat(["0xff",a,r,t])).substring(26))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./rlp":76,"bn.js":9}],61:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("../utils/bytes");t.exports={decode:function(e){e=atob(e);for(var t=[],a=0;a>=8;for(;0>=8}for(var o=0;e[o]===this._leader&&o>4]+b[15&i])}return"0x"+r.join("")}return n.throwError("invalid hexlify value",null,{arg:"value",value:e}),"never"}function u(e,t){for(s(e)||n.throwError("invalid hex string",n.INVALID_ARGUMENT,{arg:"value",value:e});e.length<2*t+2;)e="0x0"+e.substring(2);return e}function h(e){var t=0,a="0x",r="0x";if((c=e)&&null!=c.r&&null!=c.s){null==e.v&&null==e.recoveryParam&&n.throwError("at least on of recoveryParam or v must be specified",n.INVALID_ARGUMENT,{argument:"signature",value:e}),a=u(e.r,32),r=u(e.s,32),"string"==typeof(t=e.v)&&(t=parseInt(t,16));var c=e.recoveryParam;t=27+(c=null==c&&null!=e.v?1-t%2:c)}else{if(65!==(e=i(e)).length)throw new Error("invalid signature");a=l(e.slice(0,32)),r=l(e.slice(32,64)),27!==(t=e[64])&&28!==t&&(t=27+t%2)}return{r:a,s:r,recoveryParam:t-27,v:t}}a.hexlify=l,a.hexDataLength=function(e){return s(e)&&e.length%2==0?(e.length-2)/2:null},a.hexDataSlice=function(e,t,a){return s(e)||n.throwError("invalid hex data",n.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2!=0&&n.throwError("hex data length must be even",n.INVALID_ARGUMENT,{arg:"value",value:e}),t=2+2*t,null!=a?"0x"+e.substring(t,2+2*a):"0x"+e.substring(t)},a.hexStripZeros=function(e){for(s(e)||n.throwError("invalid hex string",n.INVALID_ARGUMENT,{arg:"value",value:e});3>3)]=e>>24-r&255;var n=(f=b.computeHmac(b.SupportedAlgorithms.sha512,this.chainCode,a)).slice(0,32),c=f.slice(32),d=null,f=null;return this.privateKey?d=v(i.bigNumberify(n).add(this.privateKey).mod(p)):f=new u.KeyPair(o.hexlify(n))._addPoint(this.publicKey),new I(w,d,f,this.fingerprint,v(c),e,this.depth+1,this.mnemonic,t)},I.prototype.derivePath=function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var a=this,r=0;r>3]|=1<<7-d%8),d++}var b=32*a.length/3,l=g(a.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 S(e,t){if((e=o.arrayify(e)).length%4!=0||e.length<16||32>8-r,a.push(e[n]&(1<<8-r)-1),r+=3);var d=o.arrayify(h.sha256(e))[0],i=e.length/4;return d&=g(i),a[a.length-1]<<=i,a[a.length-1]|=d>>8-i,(t=t||c.langEn).join(a.map((function(e){return t.getWord(e)})))}a.HDNode=k,a.fromExtendedKey=function(e){var t=d.Base58.decode(e);82===t.length&&y(t.slice(0,78))===e||n.throwError("invalid extended key",n.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"});var a=t[4],r=o.hexlify(t.slice(5,9)),c=parseInt(o.hexlify(t.slice(9,13)).substring(2),16),i=o.hexlify(t.slice(13,45)),f=t.slice(45,78);switch(o.hexlify(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new k(w,null,o.hexlify(f),r,i,c,a,null,null);case"0x0488ade4":case"0x04358394":if(0!==f[0])break;return new k(w,o.hexlify(f.slice(1)),null,r,i,c,a,null,null)}return n.throwError("invalid extended key",n.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"})},a.fromMnemonic=function(e,t,a){return _(A(e=S(E(e,t),t),a),e)},a.fromSeed=function(e){return _(e,null)},a.mnemonicToSeed=A,a.mnemonicToEntropy=E,a.entropyToMnemonic=S,a.isValidMnemonic=function(e,t){try{return E(e,t),!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,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n,c=r(e("hash.js")),d=e("../utils/bytes"),o=r(e("../errors"));(e=n=a.SupportedAlgorithms||(a.SupportedAlgorithms={})).sha256="sha256",e.sha512="sha512",a.computeHmac=function(e,t,a){return n[e]||o.throwError("unsupported algorithm "+e,o.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),d.arrayify(c.hmac(c[e],d.arrayify(t)).update(d.arrayify(a)).digest())}},{"../errors":5,"../utils/bytes":64,"hash.js":26}],68:[function(e,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n=e("./abi-coder");a.AbiCoder=n.AbiCoder,a.defaultAbiCoder=n.defaultAbiCoder,a.formatSignature=n.formatSignature,a.formatParamType=n.formatParamType,a.parseSignature=n.parseSignature,a.parseParamType=n.parseParamType,n=e("./address"),a.getAddress=n.getAddress,a.getContractAddress=n.getContractAddress,a.getCreate2Address=n.getCreate2Address,a.getIcapAddress=n.getIcapAddress,n=r(e("./base64")),a.base64=n,n=e("./bignumber"),a.BigNumber=n.BigNumber,a.bigNumberify=n.bigNumberify,n=e("./bytes"),a.arrayify=n.arrayify,a.concat=n.concat,a.hexDataSlice=n.hexDataSlice,a.hexDataLength=n.hexDataLength,a.hexlify=n.hexlify,a.hexStripZeros=n.hexStripZeros,a.hexZeroPad=n.hexZeroPad,a.isHexString=n.isHexString,a.joinSignature=n.joinSignature,a.padZeros=n.padZeros,a.splitSignature=n.splitSignature,a.stripZeros=n.stripZeros,n=e("./hash"),a.hashMessage=n.hashMessage,a.id=n.id,a.namehash=n.namehash,n=r(e("./hdnode")),a.HDNode=n,n=e("./interface"),a.Interface=n.Interface,n=e("./json-wallet"),a.getJsonWalletAddress=n.getJsonWalletAddress,n=e("./keccak256"),a.keccak256=n.keccak256,n=e("./sha2"),a.sha256=n.sha256,n=e("./solidity"),a.solidityKeccak256=n.keccak256,a.solidityPack=n.pack,a.soliditySha256=n.sha256,n=e("./random-bytes"),a.randomBytes=n.randomBytes,n=e("./networks"),a.getNetwork=n.getNetwork,n=e("./properties"),a.checkProperties=n.checkProperties,a.deepCopy=n.deepCopy,a.defineReadOnly=n.defineReadOnly,a.resolveProperties=n.resolveProperties,a.shallowCopy=n.shallowCopy,r=r(e("./rlp")),a.RLP=r,r=e("./secp256k1"),a.computeAddress=r.computeAddress,a.computePublicKey=r.computePublicKey,a.recoverAddress=r.recoverAddress,a.recoverPublicKey=r.recoverPublicKey,a.verifyMessage=r.verifyMessage,r=e("./signing-key"),a.SigningKey=r.SigningKey,r=e("./transaction"),a.populateTransaction=r.populateTransaction,r=e("./transaction"),a.parseTransaction=r.parse,a.serializeTransaction=r.serialize,r=e("./utf8"),a.formatBytes32String=r.formatBytes32String,a.parseBytes32String=r.parseBytes32String,a.toUtf8Bytes=r.toUtf8Bytes,a.toUtf8String=r.toUtf8String,r=e("./units"),a.commify=r.commify,a.formatEther=r.formatEther,a.parseEther=r.parseEther,a.formatUnits=r.formatUnits,a.parseUnits=r.parseUnits,r=e("./web"),a.fetchJson=r.fetchJson,a.poll=r.poll,r=e("./hmac"),a.SupportedAlgorithms=r.SupportedAlgorithms,r=e("./utf8"),a.UnicodeNormalizationForm=r.UnicodeNormalizationForm,e=e("./wordlist"),a.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,t,a){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},function(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var d,o=e("./address"),i=e("./abi-coder"),f=e("./bignumber"),s=e("./bytes"),b=e("./hash"),l=e("./keccak256"),u=e("./properties"),h=c(e("../errors")),p=function(e){u.setType(this,"Indexed"),u.defineReadOnly(this,"hash",e)},x=(e=function(e){for(var t in u.setType(this,"Description"),e)u.defineReadOnly(this,t,u.deepCopy(e[t],!0));Object.freeze(this)},n(m,d=e),m.prototype.encode=function(e,t){s.isHexString(e)||h.throwError("invalid contract bytecode",h.INVALID_ARGUMENT,{arg:"bytecode",value:e}),h.checkArgumentCount(t.length,this.inputs.length," in Interface constructor");try{return e+i.defaultAbiCoder.encode(this.inputs,t).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 g,v=(n(y,g=e),y.prototype.encode=function(e){h.checkArgumentCount(e.length,this.inputs.length," in interface function "+this.name);try{return this.sighash+i.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(t){try{return i.defaultAbiCoder.decode(this.outputs,s.arrayify(t))}catch(e){h.throwError("invalid data for function output",h.INVALID_ARGUMENT,{arg:"data",errorArg:e.arg,errorValue:e.value,value:t,reason:e.reason})}},y);function y(){return null!==g&&g.apply(this,arguments)||this}var w,k=(n(I,w=e),I);function I(){return null!==w&&w.apply(this,arguments)||this}var _,A=(n(E,_=e),E.prototype.encodeTopics=function(e){var t=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 a=[];for(this.anonymous||a.push(this.topic),e.forEach((function(e,r){var n=t.inputs[r];n.indexed?null==e?a.push(null):"string"===n.type?a.push(b.id(e)):"bytes"===n.type?a.push(l.keccak256(e)):-1!==n.type.indexOf("[")||"tuple"===n.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"===n.type&&o.getAddress(e),a.push(s.hexZeroPad(s.hexlify(e),32).toLowerCase())):null!=e&&h.throwError("cannot filter non-indexed parameters; must be null",h.INVALID_ARGUMENT,{argument:n.name||r,value:e})}));a.length&&null===a[a.length-1];)a.pop();return a},E.prototype.decode=function(e,t){null==t||this.anonymous||(t=t.slice(1));var a,r=[],n=[],c=[];this.inputs.forEach((function(e,t){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||""}),c.push(!0)):(r.push(e),c.push(!1)):(n.push(e),c.push(!1))})),null!=t&&(a=i.defaultAbiCoder.decode(r,s.concat(t)));var d=i.defaultAbiCoder.decode(n,s.arrayify(e)),o={},f=0,b=0;return this.inputs.forEach((function(e,r){e.indexed?null==t?o[r]=new p(null):c[r]?o[r]=new p(a[b++]):o[r]=a[b++]:o[r]=d[f++],e.name&&(o[e.name]=o[r])})),o.length=this.inputs.length,new k(o)},E);function E(){return null!==_&&_.apply(this,arguments)||this}var S,N=(n(M,S=e),M);function M(){return null!==S&&S.apply(this,arguments)||this}var H,T=(n(P,H=e),P);function P(){return null!==H&&H.apply(this,arguments)||this}function R(e){switch(e.type){case"constructor":var t=new x({inputs:e.inputs,payable:null==e.payable||!!e.payable});this.deployFunction||(this.deployFunction=t);break;case"function":var a=i.formatSignature(e).replace(/tuple/g,""),r=b.id(a).substring(0,10),n=!1;null!=e.constant?n=e.constant:null!=e.stateMutability&&(n="view"==e.stateMutability||"pure"==e.stateMutability),t=new v({inputs:e.inputs,outputs:e.outputs,gas:e.gas,payable:null==e.payable||!!e.payable,type:n?"call":"transaction",name:e.name,signature:a,sighash:r}),e.name&&(null==this.functions[e.name]?u.defineReadOnly(this.functions,e.name,t):h.warn("WARNING: Multiple definitions for "+e.name)),null==this.functions[t.signature]&&u.defineReadOnly(this.functions,t.signature,t);break;case"event":a=i.formatSignature(e).replace(/tuple/g,""),t=new A({name:e.name,signature:a,inputs:e.inputs,topic:b.id(a),anonymous:!!e.anonymous}),e.name&&null==this.events[e.name]&&u.defineReadOnly(this.events,e.name,t),null==this.events[t.signature]&&u.defineReadOnly(this.events,t.signature,t);break;case"receive":case"fallback":break;default:h.warn("WARNING: unsupported ABI type - "+e.type)}}function C(t){if(h.checkNew(this,C),"string"==typeof t){try{t=JSON.parse(t)}catch(e){h.throwError("could not parse ABI JSON",h.INVALID_ARGUMENT,{arg:"abi",errorMessage:e.message,value:t})}if(!Array.isArray(t))return h.throwError("invalid abi",h.INVALID_ARGUMENT,{arg:"abi",value:t}),null}u.defineReadOnly(this,"functions",{}),u.defineReadOnly(this,"events",{});var a=[];t.forEach((function(e){"string"==typeof e&&(e=i.parseSignature(e)),a.push(e)})),u.defineReadOnly(this,"abi",u.deepCopy(a,!0)),a.forEach(R,this),this.deployFunction||R.call(this,{type:"constructor",inputs:[]}),u.setType(this,"Interface")}C.prototype.parseTransaction=function(e){var t,a=e.data.substring(0,10).toLowerCase();for(t in this.functions)if(-1!==t.indexOf("(")){var r=this.functions[t];if(r.sighash===a){var n=i.defaultAbiCoder.decode(r.inputs,"0x"+e.data.substring(10));return new N({args:n,decode:r.decode,name:r.name,signature:r.signature,sighash:r.sighash,value:f.bigNumberify(e.value||"0")})}}return null},C.prototype.parseLog=function(e){for(var t in this.events)if(-1!==t.indexOf("(")&&!(t=this.events[t]).anonymous&&t.topic===e.topics[0])return new T({decode:t.decode,name:t.name,signature:t.signature,topic:t.topic,values:t.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,a.Interface=e},{"../errors":5,"./abi-coder":59,"./address":60,"./bignumber":63,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74}],70:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("./address");function n(e){try{var t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function c(e){try{var t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}a.isCrowdsaleWallet=n,a.isSecretStorageWallet=c,a.getJsonWalletAddress=function(e){if(n(e))try{return r.getAddress(JSON.parse(e).ethaddr)}catch(e){return null}if(c(e))try{return r.getAddress(JSON.parse(e).address)}catch(e){return null}return null}},{"./address":60}],71:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("js-sha3"),n=e("./bytes");a.keccak256=function(e){return"0x"+r.keccak_256(n.arrayify(e))}},{"./bytes":64,"js-sha3":40}],72:[function(e,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n=r(e("../errors"));function c(e){return function(t){var a=[];return t.InfuraProvider&&a.push(new t.InfuraProvider(e)),t.EtherscanProvider&&a.push(new t.EtherscanProvider(e)),0===a.length?null:t.FallbackProvider?new t.FallbackProvider(a):a[0]}}function d(e,t){return function(a){return a.JsonRpcProvider?new a.JsonRpcProvider(e,t):null}}var o={unspecified:{chainId:0,name:"unspecified"},homestead:r={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:c("homestead")},mainnet:r,morden:{chainId:2,name:"morden"},ropsten:e={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:c("ropsten")},testnet:e,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:c("rinkeby")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:c("goerli")},kovan:{chainId:42,name:"kovan",_defaultProvider:c("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")}};a.getNetwork=function(e){if(null==e)return null;if("number"==typeof e){for(var t in o)if((t=o[t]).chainId===e)return{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress||null,_defaultProvider:t._defaultProvider||null};return{chainId:e,name:"unknown"}}if("string"!=typeof e)return(a=o[e.name])?(0!==e.chainId&&e.chainId!==a.chainId&&n.throwError("network chainId mismatch",n.INVALID_ARGUMENT,{arg:"network",value:e}),{name:e.name,chainId:a.chainId,ensAddress:e.ensAddress||a.ensAddress||null,_defaultProvider:e._defaultProvider||a._defaultProvider||null}):("number"!=typeof e.chainId&&n.throwError("invalid network chainId",n.INVALID_ARGUMENT,{arg:"network",value:e}),e);var a=o[e];return null==a?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}},{"../errors":5}],73:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("../utils/bytes"),n=e("./hmac");a.pbkdf2=function(e,t,a,c,d){var o;e=r.arrayify(e),t=r.arrayify(t);var i,f,s=1,b=new Uint8Array(c),l=new Uint8Array(t.length+4);l.set(t);for(var u=1;u<=s;u++){l[t.length]=u>>24&255,l[t.length+1]=u>>16&255,l[t.length+2]=u>>8&255,l[t.length+3]=255&u;var h=n.computeHmac(d,e,l);o||(o=h.length,f=new Uint8Array(o),i=c-((s=Math.ceil(c/o))-1)*o),f.set(h);for(var p=1;p>=8;return t}function c(e,t,a){for(var r=0,n=0;ne.length)throw new Error("too short");if(t+1+a+(n=c(e,t+1,a))>e.length)throw new Error("to short");return d(e,t,t+1+a,a+n)}if(192<=e[t]){if(t+1+(n=e[t]-192)>e.length)throw new Error("invalid rlp data");return d(e,t,t+1,n)}if(184<=e[t]){var a;if(t+1+(a=e[t]-183)>e.length)throw new Error("invalid rlp data");if(t+1+a+(n=c(e,t+1,a))>e.length)throw new Error("invalid rlp data");return{consumed:1+a+n,result:r.hexlify(e.slice(t+1+a,t+1+a+n))}}if(128<=e[t]){var n;if(t+1+(n=e[t]-128)>e.length)throw new Error("invalid rlp data");return{consumed:1+n,result:r.hexlify(e.slice(t+1,t+1+n))}}return{consumed:1,result:r.hexlify(e[t])}}a.encode=function(e){return r.hexlify(function e(t){if(Array.isArray(t)){var a=[];return t.forEach((function(t){a=a.concat(e(t))})),a.length<=55?(a.unshift(192+a.length),a):((c=n(a.length)).unshift(247+c.length),c.concat(a))}var c;return 1===(t=Array.prototype.slice.call(r.arrayify(t))).length&&t[0]<=127?t:t.length<=55?(t.unshift(128+t.length),t):((c=n(t.length)).unshift(183+c.length),c.concat(t))}(e))},a.decode=function(e){var t=r.arrayify(e);if((e=o(t,0)).consumed!==t.length)throw new Error("invalid rlp data");return e.result}},{"./bytes":64}],77:[function(e,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n=e("elliptic"),c=e("./address"),d=e("./bytes"),o=e("./hash"),i=e("./keccak256"),f=e("./properties"),s=r(e("../errors")),b=null;function l(){return b=b||new n.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 t=l().keyFromPrivate(d.arrayify(this.privateKey));return e=l().keyFromPublic(d.arrayify(p(e))),d.hexZeroPad("0x"+t.derive(e.getPublic()).toString(16),32)},h.prototype._addPoint=function(e){var t=l().keyFromPublic(d.arrayify(this.publicKey));return e=l().keyFromPublic(d.arrayify(e)),"0x"+t.pub.add(e.pub).encodeCompressed("hex")},h);function h(e){e=l().keyFromPrivate(d.arrayify(e)),f.defineReadOnly(this,"privateKey",d.hexlify(e.priv.toArray("be",32))),f.defineReadOnly(this,"publicKey","0x"+e.getPublic(!1,"hex")),f.defineReadOnly(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),f.defineReadOnly(this,"publicKeyBytes",e.getPublic().encode(null,!0))}function p(e,t){return 32!==(e=d.arrayify(e)).length?33===e.length?t?d.hexlify(e):"0x"+l().keyFromPublic(e).getPublic(!1,"hex"):65===e.length?t?"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),t?e.compressedPublicKey:e.publicKey)}function x(e){return e="0x"+p(e).slice(4),c.getAddress("0x"+i.keccak256(e).substring(26))}function m(e,t){var a=d.splitSignature(t);return t={r:d.arrayify(a.r),s:d.arrayify(a.s)},"0x"+l().recoverPubKey(d.arrayify(e),t,a.recoveryParam).encode("hex",!1)}function g(e,t){return x(m(d.arrayify(e),t))}a.KeyPair=u,a.computePublicKey=p,a.computeAddress=x,a.recoverPublicKey=m,a.recoverAddress=g,a.verifyMessage=function(e,t){return g(o.hashMessage(e),t)}},{"../errors":5,"./address":60,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74,elliptic:12}],78:[function(e,t,a){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var c=r(e("aes-js")),d=r(e("scrypt-js")),o=r(e("uuid")),i=e("./signing-key"),f=n(e("./hdnode")),s=e("./address"),b=e("./bytes"),l=e("./pbkdf2"),u=e("./keccak256"),h=e("./utf8"),p=e("./random-bytes");function x(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),b.arrayify(e)}function m(e,t){for(e=String(e);e.lengtht.maxLength&&c.throwError("invalid length for "+t.name,c.INVALID_ARGUMENT,{arg:"transaction"+t.name,value:r}),a.push(f.hexlify(r))})),null!=e.chainId&&0!==e.chainId&&(a.push(f.hexlify(e.chainId)),a.push("0x"),a.push("0x"));var r=l.encode(a);return t?(t=27+(r=f.splitSignature(t)).recoveryParam,9===a.length&&(a.pop(),a.pop(),a.pop(),t+=2*e.chainId+8),a.push(f.hexlify(t)),a.push(f.stripZeros(f.arrayify(r.r))),a.push(f.stripZeros(f.arrayify(r.s))),l.encode(a)):r},a.parse=function(e){9!==(r=l.decode(e)).length&&6!==r.length&&c.throwError("invalid raw transaction",c.INVALID_ARGUMENT,{arg:"rawTransactin",value:e});var t={nonce:h(r[0]).toNumber(),gasPrice:h(r[1]),gasLimit:h(r[2]),to:"0x"===(a=r[3])?null:o.getAddress(a),value:h(r[4]),data:r[5],chainId:0};if(6===r.length)return t;try{t.v=i.bigNumberify(r[6]).toNumber()}catch(e){return c.info(e),t}if(t.r=f.hexZeroPad(r[7],32),t.s=f.hexZeroPad(r[8],32),i.bigNumberify(t.r).isZero()&&i.bigNumberify(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);var a=t.v-27,r=r.slice(0,6);0!==t.chainId&&(r.push(f.hexlify(t.chainId)),r.push("0x"),r.push("0x"),a-=2*t.chainId+8),r=s.keccak256(l.encode(r));try{t.from=d.recoverAddress(r,{r:f.hexlify(t.r),s:f.hexlify(t.s),recoveryParam:a})}catch(e){c.info(e)}t.hash=s.keccak256(e)}return t},a.populateTransaction=function(e,t,a){u.Provider.isProvider(t)||c.throwError("missing provider",c.INVALID_ARGUMENT,{argument:"provider",value:t}),b.checkProperties(e,x);var r=b.shallowCopy(e);return null!=r.to&&(r.to=t.resolveName(r.to)),null==r.gasPrice&&(r.gasPrice=t.getGasPrice()),null==r.nonce&&(r.nonce=t.getTransactionCount(a)),null==r.gasLimit&&((e=b.shallowCopy(r)).from=a,r.gasLimit=t.estimateGas(e)),null==r.chainId&&(r.chainId=t.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,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n,c=e("../constants"),d=r(e("../errors")),o=e("./bignumber"),i={};function f(e){return{decimals:e.length-1,tenPower:o.bigNumberify(e)}}function s(e){var t=i[String(e).toLowerCase()];if(!t&&"number"==typeof e&&parseInt(String(e))==e&&0<=e&&e<=256){for(var a="1",r=0;ra.decimals&&d.throwError("underflow occurred",d.NUMERIC_FAULT,{operation:"division",fault:"underflow"});n.length>6|192),a.push(63&o|128);else if(55296==(64512&o)){n++;var i=e.charCodeAt(n);if(n>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");a.push((o=65536+((1023&o)<<10)+(1023&i))>>18|240),a.push(o>>12&63|128),a.push(o>>6&63|128),a.push(63&o|128)}else a.push(o>>12|224),a.push(o>>6&63|128),a.push(63&o|128)}return d.arrayify(a)}function i(e,t){e=d.arrayify(e);for(var a="",r=0;r>7!=0){var c=null,o=null;if(192==(224&n))c=1,o=127;else if(224==(240&n))c=2,o=2047;else{if(240!=(248&n)){if(t)continue;if(128==(192&n))throw new Error("invalid utf8 byte sequence; unexpected continuation byte");throw new Error("invalid utf8 byte sequence; invalid prefix")}c=3,o=65535}if(r+c>e.length){if(!t)throw new Error("invalid utf8 byte sequence; too short");for(;r>6==2;r++);}else{for(var i=n&(1<<8-c-1)-1,f=0;f>10&1023),56320+(1023&i)));else if(!t)throw new Error("invalid utf8 byte sequence; invalid continuation byte")}}else a+=String.fromCharCode(n)}return a}(e=r=a.UnicodeNormalizationForm||(a.UnicodeNormalizationForm={})).current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD",a.toUtf8Bytes=o,a.toUtf8String=i,a.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,n.HashZero]).slice(0,32))},a.parseBytes32String=function(e){var t=d.arrayify(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var a=31;0===t[a-1];)a--;return i(t.slice(0,a))}},{"../constants":3,"../errors":5,"./bytes":64}],86:[function(e,t,a){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var n=e("xmlhttprequest"),c=e("./base64"),d=e("./properties"),o=e("./utf8"),i=r(e("../errors"));a.fetchJson=function(e,t,a){var r,d={},f=null,s=12e4;if("string"==typeof e)f=e;else if("object"==typeof e){if(null==e.url&&i.throwError("missing URL",i.MISSING_ARGUMENT,{arg:"url"}),f=e.url,"number"==typeof e.timeout&&0t.ceiling&&(e=t.ceiling),o&&(i--,e=o,o=null),setTimeout(n,e)),null}),(function(e){d()&&r(e)}))}()}))}},{"../errors":5,"./base64":61,"./properties":74,"./utf8":85,xmlhttprequest:49}],87:[function(e,t,r){(function(t){(function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=e("../utils/hash"),a=e("../utils/properties");r.check=function(e){for(var a=[],r=0;r<2048;r++){var n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";a.push(n)}return t.id(a.join("\n")+"\n")};var n=(c.prototype.split=function(e){return e.toLowerCase().split(/ +/g)},c.prototype.join=function(e){return e.join(" ")},c);function c(e){a.defineReadOnly(this,"locale",e)}r.Wordlist=n,r.register=function(e,t){t=t||e.locale}}).call(this)}).call(this,"undefined"!=typeof a.g?a.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/hash":65,"../utils/properties":74}],88:[function(e,t,a){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},function(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t};Object.defineProperty(a,"__esModule",{value:!0});var d,o=e("./utils/bytes"),i=e("./utils/hash"),f=e("./utils/hdnode"),s=e("./utils/json-wallet"),b=e("./utils/keccak256"),l=e("./utils/properties"),u=e("./utils/random-bytes"),h=c(e("./utils/secret-storage")),p=e("./utils/signing-key"),x=e("./utils/transaction"),m=e("./abstract-signer"),g=e("./providers/abstract-provider"),v=c(e("./errors"));function y(e,t){var a=d.call(this)||this;return v.checkNew(a,y),p.SigningKey.isSigningKey(e)?l.defineReadOnly(a,"signingKey",e):l.defineReadOnly(a,"signingKey",new p.SigningKey(e)),l.defineReadOnly(a,"provider",t),a}n(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 g.Provider.isProvider(e)||v.throwError("invalid provider",v.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 t=this;return l.resolveProperties(e).then((function(e){var a=x.serialize(e);return a=t.signingKey.signDigest(b.keccak256(a)),x.serialize(e,a)}))},y.prototype.signMessage=function(e){return Promise.resolve(o.joinSignature(this.signingKey.signDigest(i.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 t=this;if(!this.provider)throw new Error("missing provider");return null==e.nonce&&((e=l.shallowCopy(e)).nonce=this.getTransactionCount("pending")),x.populateTransaction(e,this.provider,this.address).then((function(e){return t.sign(e).then((function(e){return t.provider.sendTransaction(e)}))}))},y.prototype.encrypt=function(e,t,a){if("function"!=typeof t||a||(a=t,t={}),a&&"function"!=typeof a)throw new Error("invalid callback");return t=t||{},this.mnemonic&&((t=l.shallowCopy(t)).mnemonic=this.mnemonic,t.path=this.path),h.encrypt(this.privateKey,e,t,a)},y.createRandom=function(e){var t=u.randomBytes(16);return(e=e||{}).extraEntropy&&(t=o.arrayify(b.keccak256(o.concat([t,e.extraEntropy])).substring(0,34))),t=f.entropyToMnemonic(t,e.locale),y.fromMnemonic(t,e.path,e.locale)},y.fromEncryptedJson=function(e,t,a){if(s.isCrowdsaleWallet(e))try{a&&a(0);var r=h.decryptCrowdsale(e,t);return a&&a(1),Promise.resolve(new y(r))}catch(e){return Promise.reject(e)}else if(s.isSecretStorageWallet(e))return h.decrypt(e,t,a).then((function(e){return new y(e)}));return Promise.reject("invalid wallet JSON")},y.fromMnemonic=function(e,t,a){return t=t||f.defaultPath,new y(f.fromMnemonic(e,a).derivePath(t))},n=y,a.Wallet=n},{"./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,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),e=e("../wordlists/lang-en").langEn,a.en=e},{"../wordlists/lang-en":90}],90:[function(e,t,a){"use strict";var r,n=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},function(e,t){function a(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)});Object.defineProperty(a,"__esModule",{value:!0});var c,d=e("../utils/wordlist"),o="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",i=null;function f(e){if(null==i&&(i=o.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==d.check(e)))throw i=null,new Error("BIP39 Wordlist for en (English) FAILED")}function s(){return c.call(this,"en")||this}n=new(n(s,c=d.Wordlist),s.prototype.getWord=function(e){return f(this),i[e]},s.prototype.getWordIndex=function(e){return f(this),i.indexOf(e)},s),a.langEn=n,d.register(n)},{"../utils/wordlist":87}]},{},[7])(7)},69465:function(e){"use strict";!function(t){function a(e){return parseInt(e)===e}function r(e){if(!a(e.length))return!1;for(var t=0;t255)return!1;return!0}function n(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(a(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function c(e){return new Uint8Array(e)}function d(e,t,a,r,n){null==r&&null==n||(e=e.slice?e.slice(r,n):Array.prototype.slice.call(e,r,n)),t.set(e,a)}var o={toBytes:function(e){var t=[],a=0;for(e=encodeURI(e);a191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[a+1])),a+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[a+1])<<6|63&e[a+2])),a+=3)}return t.join("")}},i=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],a=0;a>4]+e[15&n])}return a.join("")}}}(),f={16:10,24:12,32:14},s=[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],b=[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],l=[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],u=[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],h=[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],p=[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],x=[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],m=[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],g=[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],v=[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],y=[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],w=[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],k=[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],I=[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],_=[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 A(e){for(var t=[],a=0;a>2,this._Ke[a][t%4]=c[t],this._Kd[e-a][t%4]=c[t];for(var d,o=0,i=n;i>16&255]<<24^b[d>>8&255]<<16^b[255&d]<<8^b[d>>24&255]^s[o]<<24,o+=1,8!=n)for(t=1;t>8&255]<<8^b[d>>16&255]<<16^b[d>>24&255]<<24;for(t=n/2+1;t>2,u=i%4,this._Ke[l][u]=c[t],this._Kd[e-l][u]=c[t++],i++}for(var l=1;l>24&255]^k[d>>16&255]^I[d>>8&255]^_[255&d]},E.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,a=[0,0,0,0],r=A(e),n=0;n<4;n++)r[n]^=this._Ke[0][n];for(var d=1;d>24&255]^h[r[(n+1)%4]>>16&255]^p[r[(n+2)%4]>>8&255]^x[255&r[(n+3)%4]]^this._Ke[d][n];r=a.slice()}var o,i=c(16);for(n=0;n<4;n++)o=this._Ke[t][n],i[4*n]=255&(b[r[n]>>24&255]^o>>24),i[4*n+1]=255&(b[r[(n+1)%4]>>16&255]^o>>16),i[4*n+2]=255&(b[r[(n+2)%4]>>8&255]^o>>8),i[4*n+3]=255&(b[255&r[(n+3)%4]]^o);return i},E.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,a=[0,0,0,0],r=A(e),n=0;n<4;n++)r[n]^=this._Kd[0][n];for(var d=1;d>24&255]^g[r[(n+3)%4]>>16&255]^v[r[(n+2)%4]>>8&255]^y[255&r[(n+1)%4]]^this._Kd[d][n];r=a.slice()}var o,i=c(16);for(n=0;n<4;n++)o=this._Kd[t][n],i[4*n]=255&(l[r[n]>>24&255]^o>>24),i[4*n+1]=255&(l[r[(n+3)%4]>>16&255]^o>>16),i[4*n+2]=255&(l[r[(n+2)%4]>>8&255]^o>>8),i[4*n+3]=255&(l[255&r[(n+1)%4]]^o);return i};var S=function(e){if(!(this instanceof S))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new E(e)};S.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 t=c(e.length),a=c(16),r=0;r=0;--t)this._counter[t]=e%256,e>>=8},T.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},T.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var P=function(e,t){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof T||(t=new T(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new E(e)};P.prototype.encrypt=function(e){for(var t=n(e,!0),a=0;a16)throw new Error("PKCS#7 padding byte out of range");for(var a=e.length-t,r=0;r{var r=t;r.bignum=a(6373),r.define=a(84130).define,r.base=a(81354),r.constants=a(90828),r.decoders=a(93206),r.encoders=a(36618)},84130:(e,t,a)=>{var r=a(89753),n=a(56329);function c(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new c(e,t)},c.prototype._createNamed=function(e){var t;try{t=Object(function(){var e=new Error("Cannot find module 'vm'");throw e.code="MODULE_NOT_FOUND",e}())("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(a){t=function(e){this._initNamed(e)}}return n(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},c.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r.decoders[e])),this.decoders[e]},c.prototype.decode=function(e,t,a){return this._getDecoder(t).decode(e,a)},c.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r.encoders[e])),this.encoders[e]},c.prototype.encode=function(e,t,a){return this._getEncoder(t).encode(e,a)}},72538:(e,t,a)=>{var r=a(56329),n=a(81354).Reporter,c=a(26382).Buffer;function d(e,t){n.call(this,t),c.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof o||(e=new o(e,t)),this.length+=e.length,e}),this);else if("number"===typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"===typeof e)this.value=e,this.length=c.byteLength(e);else{if(!c.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(d,n),t.t=d,d.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},d.prototype.restore=function(e){var t=new d(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},d.prototype.isEmpty=function(){return this.offset===this.length},d.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},d.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var a=new d(this.base);return a._reporterState=this._reporterState,a.offset=this.offset,a.length=this.offset+e,this.offset+=e,a},d.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.d=o,o.prototype.join=function(e,t){return e||(e=new c(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(a){a.join(e,t),t+=a.length})):("number"===typeof this.value?e[t]=this.value:"string"===typeof this.value?e.write(this.value,t):c.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},81354:(e,t,a)=>{var r=t;r.Reporter=a(4913).a,r.DecoderBuffer=a(72538).t,r.EncoderBuffer=a(72538).d,r.Node=a(64)},64:(e,t,a)=>{var r=a(81354).Reporter,n=a(81354).EncoderBuffer,c=a(81354).DecoderBuffer,d=a(75482),o=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],i=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function f(e,t){var a={};this._baseState=a,a.enc=e,a.parent=t||null,a.children=null,a.tag=null,a.args=null,a.reverseArgs=null,a.choice=null,a.optional=!1,a.any=!1,a.obj=!1,a.use=null,a.useDecoder=null,a.key=null,a.default=null,a.explicit=null,a.implicit=null,a.contains=null,a.parent||(a.children=[],this._wrap())}e.exports=f;var s=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){var e=this._baseState,t={};s.forEach((function(a){t[a]=e[a]}));var a=new this.constructor(t.parent);return a._baseState=t,a},f.prototype._wrap=function(){var e=this._baseState;i.forEach((function(t){this[t]=function(){var a=new this.constructor(this);return e.children.push(a),a[t].apply(a,arguments)}}),this)},f.prototype._init=function(e){var t=this._baseState;d(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),d.equal(t.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(e){var t=this._baseState,a=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==a.length&&(d(null===t.children),t.children=a,a.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(d(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(a){a==(0|a)&&(a|=0);var r=e[a];t[r]=a})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){f.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),o.forEach((function(e){f.prototype[e]=function(){var t=this._baseState,a=Array.prototype.slice.call(arguments);return d(null===t.tag),t.tag=e,this._useArgs(a),this}})),f.prototype.use=function(e){d(e);var t=this._baseState;return d(null===t.use),t.use=e,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(e){var t=this._baseState;return d(null===t.default),t.default=e,t.optional=!0,this},f.prototype.explicit=function(e){var t=this._baseState;return d(null===t.explicit&&null===t.implicit),t.explicit=e,this},f.prototype.implicit=function(e){var t=this._baseState;return d(null===t.explicit&&null===t.implicit),t.implicit=e,this},f.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},f.prototype.key=function(e){var t=this._baseState;return d(null===t.key),t.key=e,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(e){var t=this._baseState;return d(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},f.prototype.contains=function(e){var t=this._baseState;return d(null===t.use),t.contains=e,this},f.prototype._decode=function(e,t){var a=this._baseState;if(null===a.parent)return e.wrapResult(a.children[0]._decode(e,t));var r,n=a.default,d=!0,o=null;if(null!==a.key&&(o=e.enterKey(a.key)),a.optional){var i=null;if(null!==a.explicit?i=a.explicit:null!==a.implicit?i=a.implicit:null!==a.tag&&(i=a.tag),null!==i||a.any){if(d=this._peekTag(e,i,a.any),e.isError(d))return d}else{var f=e.save();try{null===a.choice?this._decodeGeneric(a.tag,e,t):this._decodeChoice(e,t),d=!0}catch(h){d=!1}e.restore(f)}}if(a.obj&&d&&(r=e.enterObject()),d){if(null!==a.explicit){var s=this._decodeTag(e,a.explicit);if(e.isError(s))return s;e=s}var b=e.offset;if(null===a.use&&null===a.choice){if(a.any)f=e.save();var l=this._decodeTag(e,null!==a.implicit?a.implicit:a.tag,a.any);if(e.isError(l))return l;a.any?n=e.raw(f):e=l}if(t&&t.track&&null!==a.tag&&t.track(e.path(),b,e.length,"tagged"),t&&t.track&&null!==a.tag&&t.track(e.path(),e.offset,e.length,"content"),a.any||(n=null===a.choice?this._decodeGeneric(a.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(a.any||null!==a.choice||null===a.children||a.children.forEach((function(a){a._decode(e,t)})),a.contains&&("octstr"===a.tag||"bitstr"===a.tag)){var u=new c(n);n=this._getUse(a.contains,e._reporterState.obj)._decode(u,t)}}return a.obj&&d&&(n=e.leaveObject(r)),null===a.key||null===n&&!0!==d?null!==o&&e.exitKey(o):e.leaveKey(o,a.key,n),n},f.prototype._decodeGeneric=function(e,t,a){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],a):/str$/.test(e)?this._decodeStr(t,e,a):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],a):"objid"===e?this._decodeObjid(t,null,null,a):"gentime"===e||"utctime"===e?this._decodeTime(t,e,a):"null_"===e?this._decodeNull(t,a):"bool"===e?this._decodeBool(t,a):"objDesc"===e?this._decodeStr(t,e,a):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],a):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,a):t.error("unknown tag: "+e)},f.prototype._getUse=function(e,t){var a=this._baseState;return a.useDecoder=this._use(e,t),d(null===a.useDecoder._baseState.parent),a.useDecoder=a.useDecoder._baseState.children[0],a.implicit!==a.useDecoder._baseState.implicit&&(a.useDecoder=a.useDecoder.clone(),a.useDecoder._baseState.implicit=a.implicit),a.useDecoder},f.prototype._decodeChoice=function(e,t){var a=this._baseState,r=null,n=!1;return Object.keys(a.choice).some((function(c){var d=e.save(),o=a.choice[c];try{var i=o._decode(e,t);if(e.isError(i))return!1;r={type:c,value:i},n=!0}catch(f){return e.restore(d),!1}return!0}),this),n?r:e.error("Choice not matched")},f.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},f.prototype._encode=function(e,t,a){var r=this._baseState;if(null===r.default||r.default!==e){var n=this._encodeValue(e,t,a);if(void 0!==n&&!this._skipDefault(n,t,a))return n}},f.prototype._encodeValue=function(e,t,a){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new r);var c=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}var d=null,o=!1;if(n.any)c=this._createEncoderBuffer(e);else if(n.choice)c=this._encodeChoice(e,t);else if(n.contains)d=this._getUse(n.contains,a)._encode(e,t),o=!0;else if(n.children)d=n.children.map((function(a){if("null_"===a._baseState.tag)return a._encode(null,t,e);if(null===a._baseState.key)return t.error("Child should have a key");var r=t.enterKey(a._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");var n=a._encode(e[a._baseState.key],t,e);return t.leaveKey(r),n}),this).filter((function(e){return e})),d=this._createEncoderBuffer(d);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var i=this.clone();i._baseState.implicit=null,d=this._createEncoderBuffer(e.map((function(a){var r=this._baseState;return this._getUse(r.args[0],e)._encode(a,t)}),i))}else null!==n.use?c=this._getUse(n.use,a)._encode(e,t):(d=this._encodePrimitive(n.tag,e),o=!0);if(!n.any&&null===n.choice){var f=null!==n.implicit?n.implicit:n.tag,s=null===n.implicit?"universal":"context";null===f?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(c=this._encodeComposite(f,o,s,d))}return null!==n.explicit&&(c=this._encodeComposite(n.explicit,!1,"context",c)),c},f.prototype._encodeChoice=function(e,t){var a=this._baseState,r=a.choice[e.type];return r||d(!1,e.type+" not found in "+JSON.stringify(Object.keys(a.choice))),r._encode(e.value,t)},f.prototype._encodePrimitive=function(e,t){var a=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&a.args)return this._encodeObjid(t,a.reverseArgs[0],a.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,a.args&&a.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},f.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},f.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},4913:(e,t,a)=>{var r=a(56329);function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function c(e,t){this.path=e,this.rethrow(t)}t.a=n,n.prototype.isError=function(e){return e instanceof c},n.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,a){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=a)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){var t=this._reporterState,a=t.obj;return t.obj=e,a},n.prototype.error=function(e){var t,a=this._reporterState,r=e instanceof c;if(t=r?e:new c(a.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!a.options.partial)throw t;return r||a.errors.push(t),t},n.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(c,Error),c.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,c),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},40395:(e,t,a)=>{var r=a(90828);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r._reverse(t.tag)},90828:(e,t,a)=>{var r=t;r._reverse=function(e){var t={};return Object.keys(e).forEach((function(a){(0|a)==a&&(a|=0);var r=e[a];t[r]=a})),t},r.der=a(40395)},65749:(e,t,a)=>{var r=a(56329),n=a(89753),c=n.base,d=n.bignum,o=n.constants.der;function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){c.Node.call(this,"der",e)}function s(e,t){var a=e.readUInt8(t);if(e.isError(a))return a;var r=o.tagClass[a>>6],n=0===(32&a);if(31===(31&a)){var c=a;for(a=0;128===(128&c);){if(c=e.readUInt8(t),e.isError(c))return c;a<<=7,a|=127&c}}else a&=31;return{cls:r,primitive:n,tag:a,tagStr:o.tag[a]}}function b(e,t,a){var r=e.readUInt8(a);if(e.isError(r))return r;if(!t&&128===r)return null;if(0===(128&r))return r;var n=127&r;if(n>4)return e.error("length octect is too long");r=0;for(var c=0;c{var r=t;r.der=a(65749),r.pem=a(75524)},75524:(e,t,a)=>{var r=a(56329),n=a(26382).Buffer,c=a(65749);function d(e){c.call(this,e),this.enc="pem"}r(d,c),e.exports=d,d.prototype.decode=function(e,t){for(var a=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),d=/^-----(BEGIN|END) ([^-]+)-----$/,o=-1,i=-1,f=0;f{var r=a(56329),n=a(26382).Buffer,c=a(89753),d=c.base,o=c.constants.der;function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){d.Node.call(this,"der",e)}function s(e){return e<10?"0"+e:e}e.exports=i,i.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(f,d.Node),f.prototype._encodeComposite=function(e,t,a,r){var c,d=function(e,t,a,r){var n;"seqof"===e?e="seq":"setof"===e&&(e="set");if(o.tagByName.hasOwnProperty(e))n=o.tagByName[e];else{if("number"!==typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);n=e}if(n>=31)return r.error("Multi-octet tag encoding unsupported");t||(n|=32);return n|=o.tagClassByName[a||"universal"]<<6,n}(e,t,a,this.reporter);if(r.length<128)return(c=new n(2))[0]=d,c[1]=r.length,this._createEncoderBuffer([c,r]);for(var i=1,f=r.length;f>=256;f>>=8)i++;(c=new n(2+i))[0]=d,c[1]=128|i;f=1+i;for(var s=r.length;s>0;f--,s>>=8)c[f]=255&s;return this._createEncoderBuffer([c,r])},f.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var a=new n(2*e.length),r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var c=0;for(r=0;r=128;d>>=7)c++}var o=new n(c),i=o.length-1;for(r=e.length-1;r>=0;r--){d=e[r];for(o[i--]=127&d;(d>>=7)>0;)o[i--]=128|127&d}return this._createEncoderBuffer(o)},f.prototype._encodeTime=function(e,t){var a,r=new Date(e);return"gentime"===t?a=[s(r.getFullYear()),s(r.getUTCMonth()+1),s(r.getUTCDate()),s(r.getUTCHours()),s(r.getUTCMinutes()),s(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?a=[s(r.getFullYear()%100),s(r.getUTCMonth()+1),s(r.getUTCDate()),s(r.getUTCHours()),s(r.getUTCMinutes()),s(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(a,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!n.isBuffer(e)){var a=e.toArray();!e.sign&&128&a[0]&&a.unshift(0),e=new n(a)}if(n.isBuffer(e)){var r=e.length;0===e.length&&r++;var c=new n(r);return e.copy(c),0===e.length&&(c[0]=0),this._createEncoderBuffer(c)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);r=1;for(var d=e;d>=256;d>>=8)r++;for(d=(c=new Array(r)).length-1;d>=0;d--)c[d]=255&e,e>>=8;return 128&c[0]&&c.unshift(0),this._createEncoderBuffer(new n(c))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},f.prototype._skipDefault=function(e,t,a){var r,n=this._baseState;if(null===n.default)return!1;var c=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,a).join()),c.length!==n.defaultBuffer.length)return!1;for(r=0;r{var r=t;r.der=a(63889),r.pem=a(87232)},87232:(e,t,a)=>{var r=a(56329),n=a(63889);function c(e){n.call(this,e),this.enc="pem"}r(c,n),e.exports=c,c.prototype.encode=function(e,t){for(var a=n.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"],c=0;c{"use strict";var r=a(62285);function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function c(e,t){for(var a=0;a1?a-1:0),n=1;n1?a-1:0),n=1;n1?a-1:0),n=1;n1?a-1:0),n=1;n{"use strict";var r=a(62285);function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function c(e){for(var t=1;te.length)&&(a=e.length),e.substring(a-t.length,a)===t}var y="",w="",k="",I="",_={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 A(e){var t=Object.keys(e),a=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){a[t]=e[t]})),Object.defineProperty(a,"message",{value:e.message}),a}function E(e){return m(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function S(e,t,a){var n="",c="",d=0,o="",i=!1,f=E(e),s=f.split("\n"),b=E(t).split("\n"),l=0,u="";if("strictEqual"===a&&"object"===x(e)&&"object"===x(t)&&null!==e&&null!==t&&(a="strictEqualObject"),1===s.length&&1===b.length&&s[0]!==b[0]){var h=s[0].length+b[0].length;if(h<=10){if(("object"!==x(e)||null===e)&&("object"!==x(t)||null===t)&&(0!==e||0!==t))return"".concat(_[a],"\n\n")+"".concat(s[0]," !== ").concat(b[0],"\n")}else if("strictEqualObject"!==a){if(h<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;s[0][l]===b[0][l];)l++;l>2&&(u="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var a=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,a-e.length)}(" ",l),"^"),l=0)}}}for(var p=s[s.length-1],m=b[b.length-1];p===m&&(l++<2?o="\n ".concat(p).concat(o):n=p,s.pop(),b.pop(),0!==s.length&&0!==b.length);)p=s[s.length-1],m=b[b.length-1];var g=Math.max(s.length,b.length);if(0===g){var A=f.split("\n");if(A.length>30)for(A[26]="".concat(y,"...").concat(I);A.length>27;)A.pop();return"".concat(_.notIdentical,"\n\n").concat(A.join("\n"),"\n")}l>3&&(o="\n".concat(y,"...").concat(I).concat(o),i=!0),""!==n&&(o="\n ".concat(n).concat(o),n="");var S=0,N=_[a]+"\n".concat(w,"+ actual").concat(I," ").concat(k,"- expected").concat(I),M=" ".concat(y,"...").concat(I," Lines skipped");for(l=0;l1&&l>2&&(H>4?(c+="\n".concat(y,"...").concat(I),i=!0):H>3&&(c+="\n ".concat(b[l-2]),S++),c+="\n ".concat(b[l-1]),S++),d=l,n+="\n".concat(k,"-").concat(I," ").concat(b[l]),S++;else if(b.length1&&l>2&&(H>4?(c+="\n".concat(y,"...").concat(I),i=!0):H>3&&(c+="\n ".concat(s[l-2]),S++),c+="\n ".concat(s[l-1]),S++),d=l,c+="\n".concat(w,"+").concat(I," ").concat(s[l]),S++;else{var T=b[l],P=s[l],R=P!==T&&(!v(P,",")||P.slice(0,-1)!==T);R&&v(T,",")&&T.slice(0,-1)===P&&(R=!1,P+=","),R?(H>1&&l>2&&(H>4?(c+="\n".concat(y,"...").concat(I),i=!0):H>3&&(c+="\n ".concat(s[l-2]),S++),c+="\n ".concat(s[l-1]),S++),d=l,c+="\n".concat(w,"+").concat(I," ").concat(P),n+="\n".concat(k,"-").concat(I," ").concat(T),S+=2):(c+=n,n="",1!==H&&0!==l||(c+="\n ".concat(P),S++))}if(S>20&&l30)for(h[26]="".concat(y,"...").concat(I);h.length>27;)h.pop();t=1===h.length?i.call(this,"".concat(u," ").concat(h[0])):i.call(this,"".concat(u,"\n\n").concat(h.join("\n"),"\n"))}else{var p=E(d),m="",v=_[n];"notDeepEqual"===n||"notEqual"===n?(p="".concat(_[n],"\n\n").concat(p)).length>1024&&(p="".concat(p.slice(0,1021),"...")):(m="".concat(E(o)),p.length>512&&(p="".concat(p.slice(0,509),"...")),m.length>512&&(m="".concat(m.slice(0,509),"...")),"deepEqual"===n||"equal"===n?p="".concat(v,"\n\n").concat(p,"\n\nshould equal\n\n"):m=" ".concat(n," ").concat(m)),t=i.call(this,"".concat(p).concat(m))}return Error.stackTraceLimit=l,t.generatedMessage=!a,Object.defineProperty(s(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=d,t.expected=o,t.operator=n,Error.captureStackTrace&&Error.captureStackTrace(s(t),c),t.stack,t.name="AssertionError",f(t)}return a=b,(n=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return m(this,c(c({},t),{},{customInspect:!1,depth:0}))}}])&&o(a.prototype,n),d&&o(a,d),Object.defineProperty(a,"prototype",{writable:!1}),b}(b(Error),m.custom);e.exports=N},66608:(e,t,a)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var a=0;a2?"one of ".concat(t," ").concat(e.slice(0,a-1).join(", "),", or ")+e[a-1]:2===a?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(e,t,n){var c,d,o,i;if(void 0===f&&(f=a(2539)),f("string"===typeof e,"'name' must be a string"),"string"===typeof t&&(d="not ",t.substr(!o||o<0?0:+o,d.length)===d)?(c="must not be",t=t.replace(/^not /,"")):c="must be",function(e,t,a){return(void 0===a||a>e.length)&&(a=e.length),e.substring(a-t.length,a)===t}(e," argument"))i="The ".concat(e," ").concat(c," ").concat(u(t,"type"));else{var s=function(e,t,a){return"number"!==typeof a&&(a=0),!(a+t.length>e.length)&&-1!==e.indexOf(t,a)}(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(s," ").concat(c," ").concat(u(t,"type"))}return i+=". Received type ".concat(r(n))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=a(86494));var n=s.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)}),TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",(function(e,t,a){var n;return n=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(r(a)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",c=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),c){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,c-1).join(", "),n+=", and ".concat(t[c-1]," arguments")}return"".concat(n," must be specified")}),TypeError),e.exports.codes=b},46062:(e,t,a)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,c,d,o=[],i=!0,f=!1;try{if(c=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;i=!1}else for(;!(i=(r=c.call(a)).done)&&(o.push(r.value),o.length!==t);i=!0);}catch(e){f=!0,n=e}finally{try{if(!i&&null!=a.return&&(d=a.return(),Object(d)!==d))return}finally{if(f)throw n}}return o}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(e);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function R(e){return Object.keys(e).filter(P).concat(s(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function C(e,t){if(e===t)return 0;for(var a=e.length,r=t.length,n=0,c=Math.min(a,r);n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)((function(t,a){var n;try{n=e.apply(this,t)}catch(c){return a(c)}(0,r.default)(n)&&"function"===typeof n.then?n.then((function(e){o(a,null,e)}),(function(e){o(a,e.message?e:new Error(e))})):a(null,n)}))};var r=d(a(46686)),n=d(a(16822)),c=d(a(56207));function d(e){return e&&e.__esModule?e:{default:e}}function o(e,t,a){try{e(t,a)}catch(r){(0,c.default)(i,r)}}function i(e){throw e}e.exports=t.default},85180:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,a,d){(0,r.default)(t)(e,(0,n.default)((0,c.default)(a)),d)};var r=d(a(32811)),n=d(a(76502)),c=d(a(57760));function d(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},22078:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,a){((0,r.default)(e)?l:u)(e,(0,s.default)(t),a)};var r=b(a(6571)),n=b(a(2149)),c=b(a(7971)),d=b(a(3848)),o=b(a(75713)),i=b(a(39343)),f=b(a(91801)),s=b(a(57760));function b(e){return e&&e.__esModule?e:{default:e}}function l(e,t,a){a=(0,i.default)(a||o.default);var r=0,c=0,d=e.length;function s(e,t){e?a(e):++c!==d&&t!==n.default||a(null)}for(0===d&&a(null);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,a,c){(0,r.default)(t)(e,(0,n.default)(a),c)};var r=c(a(32811)),n=c(a(57760));function c(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},26210:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(a(85180)),n=c(a(3848));function c(e){return e&&e.__esModule?e:{default:e}}t.default=(0,n.default)(r.default,1),e.exports=t.default},2149:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},3848:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(a,r,n){return e(a,t,r,n)}},e.exports=t.default},59388:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,a,c){return e(r.default,t,(0,n.default)(a),c)}};var r=c(a(22078)),n=c(a(57760));function c(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},32811:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,a,i){if(i=(0,n.default)(i||r.default),e<=0||!t)return i(null);var f=(0,c.default)(t),s=!1,b=0,l=!1;function u(e,t){if(b-=1,e)s=!0,i(e);else{if(t===o.default||s&&b<=0)return s=!0,i(null);l||h()}}function h(){for(l=!0;b{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a&&e[a]&&e[a]()};var a="function"===typeof Symbol&&Symbol.iterator;e.exports=t.default},16822:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=(0,c.default)(arguments),a=t.pop();e.call(this,t,a)}};var r,n=a(84350),c=(r=n)&&r.__esModule?r:{default:r};e.exports=t.default},2128:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.default)(e))return function(e){var t=-1,a=e.length;return function(){return++t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,a,c){c=c||r.default,t=t||[];var d=[],o=0,i=(0,n.default)(a);e(t,(function(e,t,a){var r=o++;i(e,(function(e,t){d[r]=t,a(e)}))}),(function(e){c(e,d)}))};var r=c(a(75713)),n=c(a(57760));function c(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},39343:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}},e.exports=t.default},91801:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}},e.exports=t.default},56207:(e,t,a)=>{"use strict";var r=a(62285);Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=s,t.wrap=b;var n,c=a(84350),d=(n=c)&&n.__esModule?n:{default:n};var o,i=t.hasSetImmediate="function"===typeof setImmediate&&setImmediate,f=t.hasNextTick="object"===typeof r&&"function"===typeof r.nextTick;function s(e){setTimeout(e,0)}function b(e){return function(t){var a=(0,d.default)(arguments,1);e((function(){t.apply(null,a)}))}}o=i?setImmediate:f?r.nextTick:s,t.default=b(o)},84350:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t|=0;for(var a=Math.max(e.length-t,0),r=Array(a),n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,a,r){return e(t,r)}},e.exports=t.default},57760:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=void 0;var r,n=a(22248),c=(r=n)&&r.__esModule?r:{default:r};var d="function"===typeof Symbol;function o(e){return d&&"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){return o(e)?(0,c.default)(e):e},t.isAsync=o},59702:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(a(59388)),n=c(a(14862));function c(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)(n.default),e.exports=t.default},87151:(e,t,a)=>{e.exports={default:a(10614),__esModule:!0}},45560:(e,t,a)=>{e.exports={default:a(12015),__esModule:!0}},97360:(e,t,a)=>{e.exports={default:a(1217),__esModule:!0}},91164:(e,t,a)=>{e.exports={default:a(96429),__esModule:!0}},78046:(e,t,a)=>{e.exports={default:a(65127),__esModule:!0}},16247:(e,t,a)=>{e.exports={default:a(52079),__esModule:!0}},64716:(e,t,a)=>{e.exports={default:a(96921),__esModule:!0}},34089:(e,t,a)=>{"use strict";t.__esModule=!0;var r,n=a(78046),c=(r=n)&&r.__esModule?r:{default:r};t.default=function(e){return function(){var t=e.apply(this,arguments);return new c.default((function(e,a){return function r(n,d){try{var o=t[n](d),i=o.value}catch(f){return void a(f)}if(!o.done)return c.default.resolve(i).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(i)}("next")}))}}},96731:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},24620:(e,t,a)=>{"use strict";t.__esModule=!0;var r,n=a(45560),c=(r=n)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var a=0;a{"use strict";t.__esModule=!0;var r=d(a(91164)),n=d(a(87151)),c=d(a(36926));function d(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":(0,c.default)(t)));e.prototype=(0,n.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},31912:(e,t,a)=>{"use strict";t.__esModule=!0;var r,n=a(36926),c=(r=n)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":(0,c.default)(t))&&"function"!==typeof t?e:t}},36926:(e,t,a)=>{"use strict";t.__esModule=!0;var r=d(a(64716)),n=d(a(16247)),c="function"===typeof n.default&&"symbol"===typeof r.default?function(e){return typeof e}:function(e){return e&&"function"===typeof n.default&&e.constructor===n.default&&e!==n.default.prototype?"symbol":typeof e};function d(e){return e&&e.__esModule?e:{default:e}}t.default="function"===typeof n.default&&"symbol"===c(r.default)?function(e){return"undefined"===typeof e?"undefined":c(e)}:function(e){return e&&"function"===typeof n.default&&e.constructor===n.default&&e!==n.default.prototype?"symbol":"undefined"===typeof e?"undefined":c(e)}},26285:(e,t,a)=>{var r=function(){return this}()||Function("return this")(),n=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,c=n&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=a(21284),n)r.regeneratorRuntime=c;else try{delete r.regeneratorRuntime}catch(d){r.regeneratorRuntime=void 0}},21284:e=>{!function(t){"use strict";var a,r=Object.prototype,n=r.hasOwnProperty,c="function"===typeof Symbol?Symbol:{},d=c.iterator||"@@iterator",o=c.asyncIterator||"@@asyncIterator",i=c.toStringTag||"@@toStringTag",f=t.regeneratorRuntime;if(f)e.exports=f;else{(f=t.regeneratorRuntime=e.exports).wrap=v;var s="suspendedStart",b="suspendedYield",l="executing",u="completed",h={},p={};p[d]=function(){return this};var x=Object.getPrototypeOf,m=x&&x(x(H([])));m&&m!==r&&n.call(m,d)&&(p=m);var g=I.prototype=w.prototype=Object.create(p);k.prototype=g.constructor=I,I.constructor=k,I[i]=k.displayName="GeneratorFunction",f.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,I):(e.__proto__=I,i in e||(e[i]="GeneratorFunction")),e.prototype=Object.create(g),e},f.awrap=function(e){return{__await:e}},_(A.prototype),A.prototype[o]=function(){return this},f.AsyncIterator=A,f.async=function(e,t,a,r){var n=new A(v(e,t,a,r));return f.isGeneratorFunction(t)?n:n.next().then((function(e){return e.done?e.value:n.next()}))},_(g),g[i]="Generator",g[d]=function(){return this},g.toString=function(){return"[object Generator]"},f.keys=function(e){var t=[];for(var a in e)t.push(a);return t.reverse(),function a(){for(;t.length;){var r=t.pop();if(r in e)return a.value=r,a.done=!1,a}return a.done=!0,a}},f.values=H,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(N),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=a)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=a),!!n}for(var c=this.tryEntries.length-1;c>=0;--c){var d=this.tryEntries[c],o=d.completion;if("root"===d.tryLoc)return r("end");if(d.tryLoc<=this.prev){var i=n.call(d,"catchLoc"),f=n.call(d,"finallyLoc");if(i&&f){if(this.prev=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),N(a),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;N(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:H(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=a),h}}}function v(e,t,a,r){var n=t&&t.prototype instanceof w?t:w,c=Object.create(n.prototype),d=new M(r||[]);return c._invoke=function(e,t,a){var r=s;return function(n,c){if(r===l)throw new Error("Generator is already running");if(r===u){if("throw"===n)throw c;return T()}for(a.method=n,a.arg=c;;){var d=a.delegate;if(d){var o=E(d,a);if(o){if(o===h)continue;return o}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(r===s)throw r=u,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r=l;var i=y(e,t,a);if("normal"===i.type){if(r=a.done?u:b,i.arg===h)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(r=u,a.method="throw",a.arg=i.arg)}}}(e,a,d),c}function y(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(r){return{type:"throw",arg:r}}}function w(){}function k(){}function I(){}function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function A(e){function t(a,r,c,d){var o=y(e[a],e,r);if("throw"!==o.type){var i=o.arg,f=i.value;return f&&"object"===typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then((function(e){t("next",e,c,d)}),(function(e){t("throw",e,c,d)})):Promise.resolve(f).then((function(e){i.value=e,c(i)}),d)}d(o.arg)}var a;this._invoke=function(e,r){function n(){return new Promise((function(a,n){t(e,r,a,n)}))}return a=a?a.then(n,n):n()}}function E(e,t){var r=e.iterator[t.method];if(r===a){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=a,E(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=y(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,h;var c=n.arg;return c?c.done?(t[e.resultName]=c.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=a),t.delegate=null,h):c:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function H(e){if(e){var t=e[d];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,c=function t(){for(;++r{e.exports=a(26285)},34445:(e,t)=>{"use strict";t.byteLength=function(e){var t=o(e),a=t[0],r=t[1];return 3*(a+r)/4-r},t.toByteArray=function(e){var t,a,c=o(e),d=c[0],i=c[1],f=new n(function(e,t,a){return 3*(t+a)/4-a}(0,d,i)),s=0,b=i>0?d-4:d;for(a=0;a>16&255,f[s++]=t>>8&255,f[s++]=255&t;2===i&&(t=r[e.charCodeAt(a)]<<2|r[e.charCodeAt(a+1)]>>4,f[s++]=255&t);1===i&&(t=r[e.charCodeAt(a)]<<10|r[e.charCodeAt(a+1)]<<4|r[e.charCodeAt(a+2)]>>2,f[s++]=t>>8&255,f[s++]=255&t);return f},t.fromByteArray=function(e){for(var t,r=e.length,n=r%3,c=[],d=16383,o=0,f=r-n;of?f:o+d));1===n?(t=e[r-1],c.push(a[t>>2]+a[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],c.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"="));return c.join("")};for(var a=[],r=[],n="undefined"!==typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0;d<64;++d)a[d]=c[d],r[c.charCodeAt(d)]=d;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=e.indexOf("=");return-1===a&&(a=t),[a,a===t?0:4-a%4]}function i(e,t,r){for(var n,c,d=[],o=t;o>18&63]+a[c>>12&63]+a[c>>6&63]+a[63&c]);return d.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72943:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",a={},r=0;r<32;r++){var n=t.charAt(r);if(void 0!==a[n])throw new TypeError(n+" is ambiguous");a[n]=r}function c(e){var t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function d(e){for(var t=1,a=0;a126)return"Invalid prefix ("+e+")";t=c(t)^r>>5}for(t=c(t),a=0;at)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var o=(e=r).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var i=e.slice(0,o),f=e.slice(o+1);if(f.length<6)return"Data too short";var s=d(i);if("string"===typeof s)return s;for(var b=[],l=0;l=f.length||b.push(h)}return 1!==s?"Invalid checksum for "+e:{prefix:i,words:b}}function i(e,t,a,r){for(var n=0,c=0,d=(1<=a;)c-=a,o.push(n>>c&d);if(r)c>0&&o.push(n<=t)return"Excess padding";if(n<r)throw new TypeError("Exceeds length limit");var n=d(e=e.toLowerCase());if("string"===typeof n)throw new Error(n);for(var o=e+"1",i=0;i>5!==0)throw new Error("Non 5-bit word");n=c(n)^f,o+=t.charAt(f)}for(i=0;i<6;++i)n=c(n);for(n^=1,i=0;i<6;++i){o+=t.charAt(n>>5*(5-i)&31)}return o},toWordsUnsafe:function(e){var t=i(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=i(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=i(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=i(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},1991:function(e,t,a){var r;!function(n){"use strict";var c,d=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,f="[BigNumber Error] ",s=f+"Number primitive has more than 15 significant digits: ",b=1e14,l=14,u=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],p=1e7,x=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,a,r=1,n=e.length,c=e[0]+"";rf^a?1:-1;for(o=(i=n.length)<(f=c.length)?i:f,d=0;dc[d]^a?1:-1;return i==f?0:i>f^a?1:-1}function y(e,t,a,r){if(ea||e!==(e<0?o(e):i(e)))throw Error(f+(r||"Argument")+("number"==typeof e?ea?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return m(e.e/l)==t&&e.c[t]%2!=0}function k(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function I(e,t,a){var r,n;if(t<0){for(n=a+".";++t;n+=a);e=n+e}else if(++t>(r=e.length)){for(n=a,t-=r;--t;n+=a);e+=n}else t=10;b/=10,f++);return m.e=f,void(m.c=[e])}x=String(e)}else{if(x=String(e),!d.test(x))return n(m,x,h);m.s=45==x.charCodeAt(0)?(x=x.slice(1),-1):1}(f=x.indexOf("."))>-1&&(x=x.replace(".","")),(b=x.search(/e/i))>0?(f<0&&(f=b),f+=+x.slice(b+1),x=x.substring(0,b)):f<0&&(f=x.length)}else{if(y(t,2,O.length,"Base"),x=String(e),10==t)return U(m=new D(e instanceof D?e:x),A+m.e+1,E);if(h="number"==typeof e){if(0*e!=0)return n(m,x,h,t);if(m.s=1/e<0?(x=x.slice(1),-1):1,D.DEBUG&&x.replace(/^0\.0*|\./,"").length>15)throw Error(s+e);h=!1}else m.s=45===x.charCodeAt(0)?(x=x.slice(1),-1):1;for(a=O.slice(0,t),f=b=0,p=x.length;bf){f=p;continue}}else if(!o&&(x==x.toUpperCase()&&(x=x.toLowerCase())||x==x.toLowerCase()&&(x=x.toUpperCase()))){o=!0,b=-1,f=0;continue}return n(m,String(e),h,t)}(f=(x=r(x,t,10,m.s)).indexOf("."))>-1?x=x.replace(".",""):f=x.length}for(b=0;48===x.charCodeAt(b);b++);for(p=x.length;48===x.charCodeAt(--p););if(x=x.slice(b,++p)){if(p-=b,h&&D.DEBUG&&p>15&&(e>u||e!==i(e)))throw Error(s+m.s*e);if((f=f-b-1)>H)m.c=m.e=null;else if(f=N)?k(i,d):I(i,d,"0");else if(c=(e=U(new D(e),t,a)).e,o=(i=g(e.c)).length,1==r||2==r&&(t<=c||c<=S)){for(;oo){if(--t>0)for(i+=".";t--;i+="0");}else if((t+=c-o)>0)for(c+1==o&&(i+=".");t--;i+="0");return e.s<0&&n?"-"+i:i}function L(e,t){for(var a,r=1,n=new D(e[0]);r=10;n/=10,r++);return(a=r+a*l-1)>H?e.c=e.e=null:a=10;f/=10,n++);if((c=t-n)<0)c+=l,d=t,p=(s=x[u=0])/m[n-d-1]%10|0;else if((u=o((c+1)/l))>=x.length){if(!r)break e;for(;x.length<=u;x.push(0));s=p=0,n=1,d=(c%=l)-l+1}else{for(s=f=x[u],n=1;f>=10;f/=10,n++);p=(d=(c%=l)-l+n)<0?0:s/m[n-d-1]%10|0}if(r=r||t<0||null!=x[u+1]||(d<0?s:s%m[n-d-1]),r=a<4?(p||r)&&(0==a||a==(e.s<0?3:2)):p>5||5==p&&(4==a||r||6==a&&(c>0?d>0?s/m[n-d]:0:x[u-1])%10&1||a==(e.s<0?8:7)),t<1||!x[0])return x.length=0,r?(t-=e.e+1,x[0]=m[(l-t%l)%l],e.e=-t||0):x[0]=e.e=0,e;if(0==c?(x.length=u,f=1,u--):(x.length=u+1,f=m[l-c],x[u]=d>0?i(s/m[n-d]%m[d])*f:0),r)for(;;){if(0==u){for(c=1,d=x[0];d>=10;d/=10,c++);for(d=x[0]+=f,f=1;d>=10;d/=10,f++);c!=f&&(e.e++,x[0]==b&&(x[0]=1));break}if(x[u]+=f,x[u]!=b)break;x[u--]=0,f=1}for(c=x.length;0===x[--c];x.pop());}e.e>H?e.c=e.e=null:e.e=N?k(t,a):I(t,a,"0"),e.s<0?"-"+t:t)}return D.clone=e,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.set=function(e){var t,a;if(null!=e){if("object"!=typeof e)throw Error(f+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(a=e[t],0,x,t),A=a),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(a=e[t],0,8,t),E=a),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((a=e[t])&&a.pop?(y(a[0],-x,0,t),y(a[1],0,x,t),S=a[0],N=a[1]):(y(a,-x,x,t),S=-(N=a<0?-a:a))),e.hasOwnProperty(t="RANGE"))if((a=e[t])&&a.pop)y(a[0],-x,-1,t),y(a[1],1,x,t),M=a[0],H=a[1];else{if(y(a,-x,x,t),!a)throw Error(f+t+" cannot be zero: "+a);M=-(H=a<0?-a:a)}if(e.hasOwnProperty(t="CRYPTO")){if((a=e[t])!==!!a)throw Error(f+t+" not true or false: "+a);if(a){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw T=!a,Error(f+"crypto unavailable");T=a}else T=a}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(a=e[t],0,9,t),P=a),e.hasOwnProperty(t="POW_PRECISION")&&(y(a=e[t],0,x,t),R=a),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(a=e[t]))throw Error(f+t+" not an object: "+a);C=a}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(a=e[t])||/^.$|[+-.\s]|(.).*\1/.test(a))throw Error(f+t+" invalid: "+a);O=a}}return{DECIMAL_PLACES:A,ROUNDING_MODE:E,EXPONENTIAL_AT:[S,N],RANGE:[M,H],CRYPTO:T,MODULO_MODE:P,POW_PRECISION:R,FORMAT:C,ALPHABET:O}},D.isBigNumber=function(e){return e instanceof D||e&&!0===e._isBigNumber||!1},D.maximum=D.max=function(){return L(arguments,c.lt)},D.minimum=D.min=function(){return L(arguments,c.gt)},D.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return i(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var a,r,n,c,d,s=0,b=[],u=new D(_);if(null==e?e=A:y(e,0,x),c=o(e/l),T)if(crypto.getRandomValues){for(a=crypto.getRandomValues(new Uint32Array(c*=2));s>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),a[s]=r[0],a[s+1]=r[1]):(b.push(d%1e14),s+=2);s=c/2}else{if(!crypto.randomBytes)throw T=!1,Error(f+"crypto unavailable");for(a=crypto.randomBytes(c*=7);s=9e15?crypto.randomBytes(7).copy(a,s):(b.push(d%1e14),s+=7);s=c/7}if(!T)for(;s=10;d/=10,s++);sa-1&&(null==d[n+1]&&(d[n+1]=0),d[n+1]+=d[n]/a|0,d[n]%=a)}return d.reverse()}return function(r,n,c,d,o){var i,f,s,b,l,u,h,p,x=r.indexOf("."),m=A,v=E;for(x>=0&&(b=R,R=0,r=r.replace(".",""),u=(p=new D(n)).pow(r.length-x),R=b,p.c=t(I(g(u.c),u.e,"0"),10,c,e),p.e=p.c.length),s=b=(h=t(r,n,c,o?(i=O,e):(i=e,O))).length;0==h[--b];h.pop());if(!h[0])return i.charAt(0);if(x<0?--s:(u.c=h,u.e=s,u.s=d,h=(u=a(u,p,m,v,c)).c,l=u.r,s=u.e),x=h[f=s+m+1],b=c/2,l=l||f<0||null!=h[f+1],l=v<4?(null!=x||l)&&(0==v||v==(u.s<0?3:2)):x>b||x==b&&(4==v||l||6==v&&1&h[f-1]||v==(u.s<0?8:7)),f<1||!h[0])r=l?I(i.charAt(1),-m,i.charAt(0)):i.charAt(0);else{if(h.length=f,l)for(--c;++h[--f]>c;)h[f]=0,f||(++s,h=[1].concat(h));for(b=h.length;!h[--b];);for(x=0,r="";x<=b;r+=i.charAt(h[x++]));r=I(r,s,i.charAt(0))}return r}}(),a=function(){function e(e,t,a){var r,n,c,d,o=0,i=e.length,f=t%p,s=t/p|0;for(e=e.slice();i--;)o=((n=f*(c=e[i]%p)+(r=s*c+(d=e[i]/p|0)*f)%p*p+o)/a|0)+(r/p|0)+s*d,e[i]=n%a;return o&&(e=[o].concat(e)),e}function t(e,t,a,r){var n,c;if(a!=r)c=a>r?1:-1;else for(n=c=0;nt[n]?1:-1;break}return c}function a(e,t,a,r){for(var n=0;a--;)e[a]-=n,n=e[a]1;e.splice(0,1));}return function(r,n,c,d,o){var f,s,u,h,p,x,g,v,y,w,k,I,_,A,E,S,N,M=r.s==n.s?1:-1,H=r.c,T=n.c;if(!H||!H[0]||!T||!T[0])return new D(r.s&&n.s&&(H?!T||H[0]!=T[0]:T)?H&&0==H[0]||!T?0*M:M/0:NaN);for(y=(v=new D(M)).c=[],M=c+(s=r.e-n.e)+1,o||(o=b,s=m(r.e/l)-m(n.e/l),M=M/l|0),u=0;T[u]==(H[u]||0);u++);if(T[u]>(H[u]||0)&&s--,M<0)y.push(1),h=!0;else{for(A=H.length,S=T.length,u=0,M+=2,(p=i(o/(T[0]+1)))>1&&(T=e(T,p,o),H=e(H,p,o),S=T.length,A=H.length),_=S,k=(w=H.slice(0,S)).length;k=o/2&&E++;do{if(p=0,(f=t(T,w,S,k))<0){if(I=w[0],S!=k&&(I=I*o+(w[1]||0)),(p=i(I/E))>1)for(p>=o&&(p=o-1),g=(x=e(T,p,o)).length,k=w.length;1==t(x,w,g,k);)p--,a(x,S=10;M/=10,u++);U(v,c+(v.e=u+s*l-1)+1,d,h)}else v.e=s,v.r=+h;return v}}(),n=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,a=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,n=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(c,d,o,i){var s,b=o?d:d.replace(n,"");if(r.test(b))c.s=isNaN(b)?null:b<0?-1:1,c.c=c.e=null;else{if(!o&&(b=b.replace(e,(function(e,t,a){return s="x"==(a=a.toLowerCase())?16:"b"==a?2:8,i&&i!=s?e:t})),i&&(s=i,b=b.replace(t,"$1").replace(a,"0.$1")),d!=b))return new D(b,s);if(D.DEBUG)throw Error(f+"Not a"+(i?" base "+i:"")+" number: "+d);c.c=c.e=c.s=null}}}(),c.absoluteValue=c.abs=function(){var e=new D(this);return e.s<0&&(e.s=1),e},c.comparedTo=function(e,t){return v(this,new D(e,t))},c.decimalPlaces=c.dp=function(e,t){var a,r,n,c=this;if(null!=e)return y(e,0,x),null==t?t=E:y(t,0,8),U(new D(c),e+c.e+1,t);if(!(a=c.c))return null;if(r=((n=a.length-1)-m(this.e/l))*l,n=a[n])for(;n%10==0;n/=10,r--);return r<0&&(r=0),r},c.dividedBy=c.div=function(e,t){return a(this,new D(e,t),A,E)},c.dividedToIntegerBy=c.idiv=function(e,t){return a(this,new D(e,t),0,1)},c.exponentiatedBy=c.pow=function(e,t){var a,r,n,c,d,s,b,u,h=this;if((e=new D(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+F(e));if(null!=t&&(t=new D(t)),d=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return u=new D(Math.pow(+F(h),d?2-w(e):+F(e))),t?u.mod(t):u;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new D(NaN);(r=!s&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||d&&h.c[1]>=24e7:h.c[0]<8e13||d&&h.c[0]<=9999975e7)))return c=h.s<0&&w(e)?-0:0,h.e>-1&&(c=1/c),new D(s?1/c:c);R&&(c=o(R/l+2))}for(d?(a=new D(.5),s&&(e.s=1),b=w(e)):b=(n=Math.abs(+F(e)))%2,u=new D(_);;){if(b){if(!(u=u.times(h)).c)break;c?u.c.length>c&&(u.c.length=c):r&&(u=u.mod(t))}if(n){if(0===(n=i(n/2)))break;b=n%2}else if(U(e=e.times(a),e.e+1,1),e.e>14)b=w(e);else{if(0===(n=+F(e)))break;b=n%2}h=h.times(h),c?h.c&&h.c.length>c&&(h.c.length=c):r&&(h=h.mod(t))}return r?u:(s&&(u=_.div(u)),t?u.mod(t):c?U(u,R,E,undefined):u)},c.integerValue=function(e){var t=new D(this);return null==e?e=E:y(e,0,8),U(t,t.e+1,e)},c.isEqualTo=c.eq=function(e,t){return 0===v(this,new D(e,t))},c.isFinite=function(){return!!this.c},c.isGreaterThan=c.gt=function(e,t){return v(this,new D(e,t))>0},c.isGreaterThanOrEqualTo=c.gte=function(e,t){return 1===(t=v(this,new D(e,t)))||0===t},c.isInteger=function(){return!!this.c&&m(this.e/l)>this.c.length-2},c.isLessThan=c.lt=function(e,t){return v(this,new D(e,t))<0},c.isLessThanOrEqualTo=c.lte=function(e,t){return-1===(t=v(this,new D(e,t)))||0===t},c.isNaN=function(){return!this.s},c.isNegative=function(){return this.s<0},c.isPositive=function(){return this.s>0},c.isZero=function(){return!!this.c&&0==this.c[0]},c.minus=function(e,t){var a,r,n,c,d=this,o=d.s;if(t=(e=new D(e,t)).s,!o||!t)return new D(NaN);if(o!=t)return e.s=-t,d.plus(e);var i=d.e/l,f=e.e/l,s=d.c,u=e.c;if(!i||!f){if(!s||!u)return s?(e.s=-t,e):new D(u?d:NaN);if(!s[0]||!u[0])return u[0]?(e.s=-t,e):new D(s[0]?d:3==E?-0:0)}if(i=m(i),f=m(f),s=s.slice(),o=i-f){for((c=o<0)?(o=-o,n=s):(f=i,n=u),n.reverse(),t=o;t--;n.push(0));n.reverse()}else for(r=(c=(o=s.length)<(t=u.length))?o:t,o=t=0;t0)for(;t--;s[a++]=0);for(t=b-1;r>o;){if(s[--r]=0;){for(a=0,h=I[n]%y,x=I[n]/y|0,c=n+(d=i);c>n;)a=((f=h*(f=k[--d]%y)+(o=x*f+(s=k[d]/y|0)*h)%y*y+g[c]+a)/v|0)+(o/y|0)+x*s,g[c--]=f%v;g[c]=a}return a?++r:g.splice(0,1),j(e,g,r)},c.negated=function(){var e=new D(this);return e.s=-e.s||null,e},c.plus=function(e,t){var a,r=this,n=r.s;if(t=(e=new D(e,t)).s,!n||!t)return new D(NaN);if(n!=t)return e.s=-t,r.minus(e);var c=r.e/l,d=e.e/l,o=r.c,i=e.c;if(!c||!d){if(!o||!i)return new D(n/0);if(!o[0]||!i[0])return i[0]?e:new D(o[0]?r:0*n)}if(c=m(c),d=m(d),o=o.slice(),n=c-d){for(n>0?(d=c,a=i):(n=-n,a=o),a.reverse();n--;a.push(0));a.reverse()}for((n=o.length)-(t=i.length)<0&&(a=i,i=o,o=a,t=n),n=0;t;)n=(o[--t]=o[t]+i[t]+n)/b|0,o[t]=b===o[t]?0:o[t]%b;return n&&(o=[n].concat(o),++d),j(e,o,d)},c.precision=c.sd=function(e,t){var a,r,n,c=this;if(null!=e&&e!==!!e)return y(e,1,x),null==t?t=E:y(t,0,8),U(new D(c),e,t);if(!(a=c.c))return null;if(r=(n=a.length-1)*l+1,n=a[n]){for(;n%10==0;n/=10,r--);for(n=a[0];n>=10;n/=10,r++);}return e&&c.e+1>r&&(r=c.e+1),r},c.shiftedBy=function(e){return y(e,-9007199254740991,u),this.times("1e"+e)},c.squareRoot=c.sqrt=function(){var e,t,r,n,c,d=this,o=d.c,i=d.s,f=d.e,s=A+4,b=new D("0.5");if(1!==i||!o||!o[0])return new D(!i||i<0&&(!o||o[0])?NaN:o?d:1/0);if(0==(i=Math.sqrt(+F(d)))||i==1/0?(((t=g(o)).length+f)%2==0&&(t+="0"),i=Math.sqrt(+t),f=m((f+1)/2)-(f<0||f%2),r=new D(t=i==1/0?"1e"+f:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+f)):r=new D(i+""),r.c[0])for((i=(f=r.e)+s)<3&&(i=0);;)if(c=r,r=b.times(c.plus(a(d,c,s,1))),g(c.c).slice(0,i)===(t=g(r.c)).slice(0,i)){if(r.e0&&p>0){for(c=p%o||o,b=h.substr(0,c);c0&&(b+=s+h.slice(c)),u&&(b="-"+b)}r=l?b+(a.decimalSeparator||"")+((i=+a.fractionGroupSize)?l.replace(new RegExp("\\d{"+i+"}\\B","g"),"$&"+(a.fractionGroupSeparator||"")):l):b}return(a.prefix||"")+r+(a.suffix||"")},c.toFraction=function(e){var t,r,n,c,d,o,i,s,b,u,p,x,m=this,v=m.c;if(null!=e&&(!(i=new D(e)).isInteger()&&(i.c||1!==i.s)||i.lt(_)))throw Error(f+"Argument "+(i.isInteger()?"out of range: ":"not an integer: ")+F(i));if(!v)return new D(m);for(t=new D(_),b=r=new D(_),n=s=new D(_),x=g(v),d=t.e=x.length-m.e-1,t.c[0]=h[(o=d%l)<0?l+o:o],e=!e||i.comparedTo(t)>0?d>0?t:b:i,o=H,H=1/0,i=new D(x),s.c[0]=0;u=a(i,t,0,1),1!=(c=r.plus(u.times(n))).comparedTo(e);)r=n,n=c,b=s.plus(u.times(c=b)),s=c,t=i.minus(u.times(c=t)),i=c;return c=a(e.minus(r),n,0,1),s=s.plus(c.times(b)),r=r.plus(c.times(n)),s.s=b.s=m.s,p=a(b,n,d*=2,E).minus(m).abs().comparedTo(a(s,r,d,E).minus(m).abs())<1?[b,n]:[s,r],H=o,p},c.toNumber=function(){return+F(this)},c.toPrecision=function(e,t){return null!=e&&y(e,1,x),B(this,e,t,2)},c.toString=function(e){var t,a=this,n=a.s,c=a.e;return null===c?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=c<=S||c>=N?k(g(a.c),c):I(g(a.c),c,"0"):10===e?t=I(g((a=U(new D(a),A+c+1,E)).c),a.e,"0"):(y(e,2,O.length,"Base"),t=r(I(g(a.c),c,"0"),10,e,n,!0)),n<0&&a.c[0]&&(t="-"+t)),t},c.valueOf=c.toJSON=function(){return F(this)},c._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(c[Symbol.toStringTag]="BigNumber",c[Symbol.for("nodejs.util.inspect.custom")]=c.valueOf),null!=t&&D.set(t),D}(),c.default=c.BigNumber=c,void 0===(r=function(){return c}.call(t,a,t,e))||(e.exports=r)}()},6355:(e,t,a)=>{var r=a(59966).Buffer,n=a(36059),c=a(11973),d=c.pbkdf2Sync,o=c.pbkdf2,i=a(15838),f=a(35584),s=a(67321),b=a(54028),l=a(93625),u=a(83199),h=a(17009),p=a(28056),x=a(84931),m=a(45537),g=l,v="Invalid mnemonic",y="Invalid entropy",w="Invalid mnemonic checksum";function k(e,t,a){for(;e.length32)throw new Error(y);if(i.length%4!==0)throw new Error(y);var s=r.from(i);if(A(s)!==o)throw new Error(w);return s.toString("hex")}function H(e,t){if(r.isBuffer(e)||(e=r.from(e,"hex")),t=t||g,e.length<16)throw new TypeError(y);if(e.length>32)throw new TypeError(y);if(e.length%4!==0)throw new TypeError(y);var a=(_([].slice.call(e))+A(e)).match(/(.{1,11})/g).map((function(e){var a=I(e);return t[a]}));return t===p?a.join("\u3000"):a.join(" ")}e.exports={mnemonicToSeed:S,mnemonicToSeedAsync:N,mnemonicToSeedHex:function(e,t){return S(e,t).toString("hex")},mnemonicToSeedHexAsync:function(e,t){return N(e,t).then((function(e){return e.toString("hex")}))},mnemonicToEntropy:M,entropyToMnemonic:H,generateMnemonic:function(e,t,a){if((e=e||128)%32!==0)throw new TypeError(y);return H((t=t||i)(e/8),a)},validateMnemonic:function(e,t){try{M(e,t)}catch(a){return!1}return!0},wordlists:{EN:l,JA:p,chinese_simplified:s,chinese_traditional:b,english:l,french:u,italian:h,japanese:p,korean:x,spanish:m}}},49603:(e,t,a)=>{var r=a(59966).Buffer;e.exports={check:function(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var a=e[5+t];return 0!==a&&(6+t+a===e.length&&(!(128&e[4])&&(!(t>1&&0===e[4]&&!(128&e[5]))&&(!(128&e[t+6])&&!(a>1&&0===e[t+6]&&!(128&e[t+7]))))))},decode:function(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var a=e[5+t];if(0===a)throw new Error("S length is zero");if(6+t+a!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(a>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}},encode:function(e,t){var a=e.length,n=t.length;if(0===a)throw new Error("R length is zero");if(0===n)throw new Error("S length is zero");if(a>33)throw new Error("R length is too long");if(n>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(a>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(n>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var c=r.allocUnsafe(6+a+n);return c[0]=48,c[1]=c.length-2,c[2]=2,c[3]=e.length,e.copy(c,4),c[4+a]=2,c[5+a]=t.length,t.copy(c,6+a),c}}},77259:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SIZE=8,t.DEFAULT_SCALE=4},99322:(e,t,a)=>{"use strict";function r(e){for(var a in e)t.hasOwnProperty(a)||(t[a]=e[a])}Object.defineProperty(t,"__esModule",{value:!0});const n=a(84715);function c(e,t){var a,r,c,d,o;const i=n.parseOptions(e||{});let f=n.createImageData(i.size),s=Math.sqrt(f.length);t.width=t.height=i.size*i.scale;let b=t.getContext("2d");null===(a=b)||void 0===a||(a.fillStyle=i.bgcolor),null===(r=b)||void 0===r||r.fillRect(0,0,t.width,t.height),null===(c=b)||void 0===c||(c.fillStyle=i.color);for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randArr=new Array(4),t.seedRandomness=function(e){let a;for(a=0;a>19^e^e>>8,(t.randArr[3]>>>0)/(1<<31>>>0)}},84715:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=a(71587),n=a(77259);function c(){return"hsl("+Math.floor(360*r.random())+","+(60*r.random()+40+"%")+","+(25*(r.random()+r.random()+r.random()+r.random())+"%")+")"}t.createColor=c,t.createImageData=function(e){let t=e,a=e,n=Math.ceil(t/2),c=t-n,d=[];for(let o=0;o=65&&a<=70?a-55:a>=97&&a<=102?a-87:a-48&15}function i(e,t,a){var r=o(e,a);return a-1>=t&&(r|=o(e,a-1)<<4),r}function f(e,t,a,r){for(var n=0,c=Math.min(e.length,a),d=t;d=49?o-49+10:o>=17?o-17+10:o}return n}c.isBN=function(e){return e instanceof c||null!==e&&"object"===typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words)},c.max=function(e,t){return e.cmp(t)>0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,t,a){if("number"===typeof e)return this._initNumber(e,t,a);if("object"===typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)d=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[c]|=d<>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);else if("le"===a)for(n=0,c=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);return this.strip()},c.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)n=i(e,t,r)<=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;this.strip()},c.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var c=e.length-a,d=c%r,o=Math.min(c,c-d)+a,i=0,s=a;s1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};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,t,a){a.negative=t.negative^e.negative;var r=e.length+t.length|0;a.length=r,r=r-1|0;var n=0|e.words[0],c=0|t.words[0],d=n*c,o=67108863&d,i=d/67108864|0;a.words[0]=o;for(var f=1;f>>26,b=67108863&i,l=Math.min(f,t.length-1),u=Math.max(0,f-e.length+1);u<=l;u++){var h=f-u|0;s+=(d=(n=0|e.words[h])*(c=0|t.words[u])+b)/67108864|0,b=67108863&d}a.words[f]=0|b,i=0|s}return 0!==i?a.words[f]=0|i:a.length--,a.strip()}c.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var n=0,c=0,d=0;d>>24-n&16777215)||d!==this.length-1?s[6-i.length]+i+a:i+a,(n+=2)>=26&&(n-=26,d--)}for(0!==c&&(a=c.toString(16)+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var f=b[e],u=l[e];a="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);a=(h=h.idivn(u)).isZero()?p+a:s[f-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}r(!1,"Base should be between 2 and 36")},c.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},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(e,t){return r("undefined"!==typeof d),this.toArrayLike(d,e,t)},c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},c.prototype.toArrayLike=function(e,t,a){var n=this.byteLength(),c=a||Math.max(1,n);r(n<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0"),this.strip();var d,o,i="le"===t,f=new e(c),s=this.clone();if(i){for(o=0;!s.isZero();o++)d=s.andln(255),s.iushrn(8),f[o]=d;for(;o=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0===(8191&t)&&(a+=13,t>>>=13),0===(127&t)&&(a+=7,t>>>=7),0===(15&t)&&(a+=4,t>>>=4),0===(3&t)&&(a+=2,t>>>=2),0===(1&t)&&a++,a},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-a),this.strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var a=e/26|0,n=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,r=e):(a=e,r=this);for(var n=0,c=0;c>>26;for(;0!==n&&c>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ce.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,r=e):(a=e,r=this);for(var c=0,d=0;d>26,this.words[d]=67108863&t;for(;0!==c&&d>26,this.words[d]=67108863&t;if(0===c&&d>>13,u=0|d[1],h=8191&u,p=u>>>13,x=0|d[2],m=8191&x,g=x>>>13,v=0|d[3],y=8191&v,w=v>>>13,k=0|d[4],I=8191&k,_=k>>>13,A=0|d[5],E=8191&A,S=A>>>13,N=0|d[6],M=8191&N,H=N>>>13,T=0|d[7],P=8191&T,R=T>>>13,C=0|d[8],O=8191&C,D=C>>>13,B=0|d[9],L=8191&B,j=B>>>13,U=0|o[0],F=8191&U,z=U>>>13,q=0|o[1],W=8191&q,V=q>>>13,K=0|o[2],G=8191&K,Y=K>>>13,J=0|o[3],X=8191&J,Z=J>>>13,Q=0|o[4],$=8191&Q,ee=Q>>>13,te=0|o[5],ae=8191&te,re=te>>>13,ne=0|o[6],ce=8191&ne,de=ne>>>13,oe=0|o[7],ie=8191&oe,fe=oe>>>13,se=0|o[8],be=8191&se,le=se>>>13,ue=0|o[9],he=8191&ue,pe=ue>>>13;a.negative=e.negative^t.negative,a.length=19;var xe=(f+(r=Math.imul(b,F))|0)+((8191&(n=(n=Math.imul(b,z))+Math.imul(l,F)|0))<<13)|0;f=((c=Math.imul(l,z))+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(h,F),n=(n=Math.imul(h,z))+Math.imul(p,F)|0,c=Math.imul(p,z);var me=(f+(r=r+Math.imul(b,W)|0)|0)+((8191&(n=(n=n+Math.imul(b,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((c=c+Math.imul(l,V)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),n=(n=Math.imul(m,z))+Math.imul(g,F)|0,c=Math.imul(g,z),r=r+Math.imul(h,W)|0,n=(n=n+Math.imul(h,V)|0)+Math.imul(p,W)|0,c=c+Math.imul(p,V)|0;var ge=(f+(r=r+Math.imul(b,G)|0)|0)+((8191&(n=(n=n+Math.imul(b,Y)|0)+Math.imul(l,G)|0))<<13)|0;f=((c=c+Math.imul(l,Y)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(w,F)|0,c=Math.imul(w,z),r=r+Math.imul(m,W)|0,n=(n=n+Math.imul(m,V)|0)+Math.imul(g,W)|0,c=c+Math.imul(g,V)|0,r=r+Math.imul(h,G)|0,n=(n=n+Math.imul(h,Y)|0)+Math.imul(p,G)|0,c=c+Math.imul(p,Y)|0;var ve=(f+(r=r+Math.imul(b,X)|0)|0)+((8191&(n=(n=n+Math.imul(b,Z)|0)+Math.imul(l,X)|0))<<13)|0;f=((c=c+Math.imul(l,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(_,F)|0,c=Math.imul(_,z),r=r+Math.imul(y,W)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(w,W)|0,c=c+Math.imul(w,V)|0,r=r+Math.imul(m,G)|0,n=(n=n+Math.imul(m,Y)|0)+Math.imul(g,G)|0,c=c+Math.imul(g,Y)|0,r=r+Math.imul(h,X)|0,n=(n=n+Math.imul(h,Z)|0)+Math.imul(p,X)|0,c=c+Math.imul(p,Z)|0;var ye=(f+(r=r+Math.imul(b,$)|0)|0)+((8191&(n=(n=n+Math.imul(b,ee)|0)+Math.imul(l,$)|0))<<13)|0;f=((c=c+Math.imul(l,ee)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),n=(n=Math.imul(E,z))+Math.imul(S,F)|0,c=Math.imul(S,z),r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(_,W)|0,c=c+Math.imul(_,V)|0,r=r+Math.imul(y,G)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(w,G)|0,c=c+Math.imul(w,Y)|0,r=r+Math.imul(m,X)|0,n=(n=n+Math.imul(m,Z)|0)+Math.imul(g,X)|0,c=c+Math.imul(g,Z)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(p,$)|0,c=c+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(b,ae)|0)|0)+((8191&(n=(n=n+Math.imul(b,re)|0)+Math.imul(l,ae)|0))<<13)|0;f=((c=c+Math.imul(l,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,F),n=(n=Math.imul(M,z))+Math.imul(H,F)|0,c=Math.imul(H,z),r=r+Math.imul(E,W)|0,n=(n=n+Math.imul(E,V)|0)+Math.imul(S,W)|0,c=c+Math.imul(S,V)|0,r=r+Math.imul(I,G)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(_,G)|0,c=c+Math.imul(_,Y)|0,r=r+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(w,X)|0,c=c+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,n=(n=n+Math.imul(m,ee)|0)+Math.imul(g,$)|0,c=c+Math.imul(g,ee)|0,r=r+Math.imul(h,ae)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(p,ae)|0,c=c+Math.imul(p,re)|0;var ke=(f+(r=r+Math.imul(b,ce)|0)|0)+((8191&(n=(n=n+Math.imul(b,de)|0)+Math.imul(l,ce)|0))<<13)|0;f=((c=c+Math.imul(l,de)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(R,F)|0,c=Math.imul(R,z),r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(H,W)|0,c=c+Math.imul(H,V)|0,r=r+Math.imul(E,G)|0,n=(n=n+Math.imul(E,Y)|0)+Math.imul(S,G)|0,c=c+Math.imul(S,Y)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(_,X)|0,c=c+Math.imul(_,Z)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0,r=r+Math.imul(m,ae)|0,n=(n=n+Math.imul(m,re)|0)+Math.imul(g,ae)|0,c=c+Math.imul(g,re)|0,r=r+Math.imul(h,ce)|0,n=(n=n+Math.imul(h,de)|0)+Math.imul(p,ce)|0,c=c+Math.imul(p,de)|0;var Ie=(f+(r=r+Math.imul(b,ie)|0)|0)+((8191&(n=(n=n+Math.imul(b,fe)|0)+Math.imul(l,ie)|0))<<13)|0;f=((c=c+Math.imul(l,fe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(O,F),n=(n=Math.imul(O,z))+Math.imul(D,F)|0,c=Math.imul(D,z),r=r+Math.imul(P,W)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(R,W)|0,c=c+Math.imul(R,V)|0,r=r+Math.imul(M,G)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(H,G)|0,c=c+Math.imul(H,Y)|0,r=r+Math.imul(E,X)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(S,X)|0,c=c+Math.imul(S,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(y,ae)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(w,ae)|0,c=c+Math.imul(w,re)|0,r=r+Math.imul(m,ce)|0,n=(n=n+Math.imul(m,de)|0)+Math.imul(g,ce)|0,c=c+Math.imul(g,de)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,fe)|0)+Math.imul(p,ie)|0,c=c+Math.imul(p,fe)|0;var _e=(f+(r=r+Math.imul(b,be)|0)|0)+((8191&(n=(n=n+Math.imul(b,le)|0)+Math.imul(l,be)|0))<<13)|0;f=((c=c+Math.imul(l,le)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,F),n=(n=Math.imul(L,z))+Math.imul(j,F)|0,c=Math.imul(j,z),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,V)|0)+Math.imul(D,W)|0,c=c+Math.imul(D,V)|0,r=r+Math.imul(P,G)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(R,G)|0,c=c+Math.imul(R,Y)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(H,X)|0,c=c+Math.imul(H,Z)|0,r=r+Math.imul(E,$)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(S,$)|0,c=c+Math.imul(S,ee)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(_,ae)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(y,ce)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(w,ce)|0,c=c+Math.imul(w,de)|0,r=r+Math.imul(m,ie)|0,n=(n=n+Math.imul(m,fe)|0)+Math.imul(g,ie)|0,c=c+Math.imul(g,fe)|0,r=r+Math.imul(h,be)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(p,be)|0,c=c+Math.imul(p,le)|0;var Ae=(f+(r=r+Math.imul(b,he)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(l,he)|0))<<13)|0;f=((c=c+Math.imul(l,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,V))+Math.imul(j,W)|0,c=Math.imul(j,V),r=r+Math.imul(O,G)|0,n=(n=n+Math.imul(O,Y)|0)+Math.imul(D,G)|0,c=c+Math.imul(D,Y)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(R,X)|0,c=c+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(E,ae)|0,n=(n=n+Math.imul(E,re)|0)+Math.imul(S,ae)|0,c=c+Math.imul(S,re)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,de)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,fe)|0)+Math.imul(w,ie)|0,c=c+Math.imul(w,fe)|0,r=r+Math.imul(m,be)|0,n=(n=n+Math.imul(m,le)|0)+Math.imul(g,be)|0,c=c+Math.imul(g,le)|0;var Ee=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;f=((c=c+Math.imul(p,pe)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,G),n=(n=Math.imul(L,Y))+Math.imul(j,G)|0,c=Math.imul(j,Y),r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(D,X)|0,c=c+Math.imul(D,Z)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(R,$)|0,c=c+Math.imul(R,ee)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(H,ae)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(E,ce)|0,n=(n=n+Math.imul(E,de)|0)+Math.imul(S,ce)|0,c=c+Math.imul(S,de)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(y,be)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(w,be)|0,c=c+Math.imul(w,le)|0;var Se=(f+(r=r+Math.imul(m,he)|0)|0)+((8191&(n=(n=n+Math.imul(m,pe)|0)+Math.imul(g,he)|0))<<13)|0;f=((c=c+Math.imul(g,pe)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,Z))+Math.imul(j,X)|0,c=Math.imul(j,Z),r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,r=r+Math.imul(P,ae)|0,n=(n=n+Math.imul(P,re)|0)+Math.imul(R,ae)|0,c=c+Math.imul(R,re)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,de)|0,r=r+Math.imul(E,ie)|0,n=(n=n+Math.imul(E,fe)|0)+Math.imul(S,ie)|0,c=c+Math.imul(S,fe)|0,r=r+Math.imul(I,be)|0,n=(n=n+Math.imul(I,le)|0)+Math.imul(_,be)|0,c=c+Math.imul(_,le)|0;var Ne=(f+(r=r+Math.imul(y,he)|0)|0)+((8191&(n=(n=n+Math.imul(y,pe)|0)+Math.imul(w,he)|0))<<13)|0;f=((c=c+Math.imul(w,pe)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(j,$)|0,c=Math.imul(j,ee),r=r+Math.imul(O,ae)|0,n=(n=n+Math.imul(O,re)|0)+Math.imul(D,ae)|0,c=c+Math.imul(D,re)|0,r=r+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(R,ce)|0,c=c+Math.imul(R,de)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(E,be)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(S,be)|0,c=c+Math.imul(S,le)|0;var Me=(f+(r=r+Math.imul(I,he)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(_,he)|0))<<13)|0;f=((c=c+Math.imul(_,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,re))+Math.imul(j,ae)|0,c=Math.imul(j,re),r=r+Math.imul(O,ce)|0,n=(n=n+Math.imul(O,de)|0)+Math.imul(D,ce)|0,c=c+Math.imul(D,de)|0,r=r+Math.imul(P,ie)|0,n=(n=n+Math.imul(P,fe)|0)+Math.imul(R,ie)|0,c=c+Math.imul(R,fe)|0,r=r+Math.imul(M,be)|0,n=(n=n+Math.imul(M,le)|0)+Math.imul(H,be)|0,c=c+Math.imul(H,le)|0;var He=(f+(r=r+Math.imul(E,he)|0)|0)+((8191&(n=(n=n+Math.imul(E,pe)|0)+Math.imul(S,he)|0))<<13)|0;f=((c=c+Math.imul(S,pe)|0)+(n>>>13)|0)+(He>>>26)|0,He&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,de))+Math.imul(j,ce)|0,c=Math.imul(j,de),r=r+Math.imul(O,ie)|0,n=(n=n+Math.imul(O,fe)|0)+Math.imul(D,ie)|0,c=c+Math.imul(D,fe)|0,r=r+Math.imul(P,be)|0,n=(n=n+Math.imul(P,le)|0)+Math.imul(R,be)|0,c=c+Math.imul(R,le)|0;var Te=(f+(r=r+Math.imul(M,he)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(H,he)|0))<<13)|0;f=((c=c+Math.imul(H,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,fe))+Math.imul(j,ie)|0,c=Math.imul(j,fe),r=r+Math.imul(O,be)|0,n=(n=n+Math.imul(O,le)|0)+Math.imul(D,be)|0,c=c+Math.imul(D,le)|0;var Pe=(f+(r=r+Math.imul(P,he)|0)|0)+((8191&(n=(n=n+Math.imul(P,pe)|0)+Math.imul(R,he)|0))<<13)|0;f=((c=c+Math.imul(R,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,be),n=(n=Math.imul(L,le))+Math.imul(j,be)|0,c=Math.imul(j,le);var Re=(f+(r=r+Math.imul(O,he)|0)|0)+((8191&(n=(n=n+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;f=((c=c+Math.imul(D,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(f+(r=Math.imul(L,he))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(j,he)|0))<<13)|0;return f=((c=Math.imul(j,pe))+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i[0]=xe,i[1]=me,i[2]=ge,i[3]=ve,i[4]=ye,i[5]=we,i[6]=ke,i[7]=Ie,i[8]=_e,i[9]=Ae,i[10]=Ee,i[11]=Se,i[12]=Ne,i[13]=Me,i[14]=He,i[15]=Te,i[16]=Pe,i[17]=Re,i[18]=Ce,0!==f&&(i[19]=f,a.length++),a};function p(e,t,a){return(new x).mulp(e,t,a)}function x(e,t){this.x=e,this.y=t}Math.imul||(h=u),c.prototype.mulTo=function(e,t){var a,r=this.length+e.length;return a=10===this.length&&10===e.length?h(this,e,t):r<63?u(this,e,t):r<1024?function(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var r=0,n=0,c=0;c>>26)|0)>>>26,d&=67108863}a.words[c]=o,r=d,d=n}return 0!==r?a.words[c]=r:a.length--,a.strip()}(this,e,t):p(this,e,t),a},x.prototype.makeRBT=function(e){for(var t=new Array(e),a=c.prototype._countBits(e)-1,r=0;r>=1;return r},x.prototype.permute=function(e,t,a,r,n,c){for(var d=0;d>>=1)n++;return 1<>>=13,a[2*d+1]=8191&c,c>>>=13;for(d=2*t;d>=26,t+=n/67108864|0,t+=c>>>26,this.words[a]=67108863&c}return 0!==t&&(this.words[a]=t,this.length++),this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>n}return t}(e);if(0===t.length)return new c(1);for(var a=this,r=0;r=0);var t,a=e%26,n=(e-a)/26,c=67108863>>>26-a<<26-a;if(0!==a){var d=0;for(t=0;t>>26-a}d&&(this.words[t]=d,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var c=e%26,d=Math.min((e-c)/26,this.length),o=67108863^67108863>>>c<d)for(this.length-=d,f=0;f=0&&(0!==s||f>=n);f--){var b=0|this.words[f];this.words[f]=s<<26-c|b>>>c,s=b&o}return i&&0!==s&&(i.words[i.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(e,t,a){return r(0===this.negative),this.iushrn(e,t,a)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,a=(e-t)/26,n=1<=0);var t=e%26,a=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},c.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 t=0;t>26)-(i/67108864|0),this.words[n+a]=67108863&c}for(;n>26,this.words[n+a]=67108863&c;if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&c;return this.negative=1,this.strip()},c.prototype._wordDiv=function(e,t){var a=(this.length,e.length),r=this.clone(),n=e,d=0|n.words[n.length-1];0!==(a=26-this._countBits(d))&&(n=n.ushln(a),r.iushln(a),d=0|n.words[n.length-1]);var o,i=r.length-n.length;if("mod"!==t){(o=new c(null)).length=i+1,o.words=new Array(o.length);for(var f=0;f=0;b--){var l=67108864*(0|r.words[n.length+b])+(0|r.words[n.length+b-1]);for(l=Math.min(l/d|0,67108863),r._ishlnsubmul(n,l,b);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,b),r.isZero()||(r.negative^=1);o&&(o.words[b]=l)}return o&&o.strip(),r.strip(),"div"!==t&&0!==a&&r.iushrn(a),{div:o||null,mod:r}},c.prototype.divmod=function(e,t,a){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.iadd(e)),{div:n,mod:d}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.isub(e)),{div:o.div,mod:d}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,d,o},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),c=a.cmp(r);return c<0||1===n&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,a=0,n=this.length-1;n>=0;n--)a=(t*a+(0|this.words[n]))%e;return a},c.prototype.idivn=function(e){r(e<=67108863);for(var t=0,a=this.length-1;a>=0;a--){var n=(0|this.words[a])+67108864*t;this.words[a]=n/e|0,t=n%e}return this.strip()},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new c(1),d=new c(0),o=new c(0),i=new c(1),f=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++f;for(var s=a.clone(),b=t.clone();!t.isZero();){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||d.isOdd())&&(n.iadd(s),d.isub(b)),n.iushrn(1),d.iushrn(1);for(var h=0,p=1;0===(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(s),i.isub(b)),o.iushrn(1),i.iushrn(1);t.cmp(a)>=0?(t.isub(a),n.isub(o),d.isub(i)):(a.isub(t),o.isub(n),i.isub(d))}return{a:o,b:i,gcd:a.iushln(f)}},c.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,d=new c(1),o=new c(0),i=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var f=0,s=1;0===(t.words[0]&s)&&f<26;++f,s<<=1);if(f>0)for(t.iushrn(f);f-- >0;)d.isOdd()&&d.iadd(i),d.iushrn(1);for(var b=0,l=1;0===(a.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(a.iushrn(b);b-- >0;)o.isOdd()&&o.iadd(i),o.iushrn(1);t.cmp(a)>=0?(t.isub(a),d.isub(o)):(a.isub(t),o.isub(d))}return(n=0===t.cmpn(1)?d:o).cmpn(0)<0&&n.iadd(e),n},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var r=0;t.isEven()&&a.isEven();r++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var n=t.cmp(a);if(n<0){var c=t;t=a,a=c}else if(0===n||0===a.cmpn(1))break;t.isub(a)}return a.iushln(r)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0===(1&this.words[0])},c.prototype.isOdd=function(){return 1===(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,a=(e-t)/26,n=1<>>26,o&=67108863,this.words[d]=o}return 0!==c&&(this.words[d]=c,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this.strip(),this.length>1)t=1;else{a&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;a--){var r=0|this.words[a],n=0|e.words[a];if(r!==n){rn&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new I(e)},c.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)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new c(t,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(e){if("string"===typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(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)}g.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},n(v,g),v.prototype.split=function(e,t){for(var a=4194303,r=Math.min(e.length,9),n=0;n>>22,c=d}c>>>=22,e.words[n-10]=c,0===c&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return m[e]=t,t},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,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},I.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):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,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},I.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},I.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},I.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},I.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},I.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},I.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},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 t=this.m.andln(3);if(r(t%2===1),3===t){var a=this.m.add(new c(1)).iushrn(2);return this.pow(e,a)}for(var n=this.m.subn(1),d=0;!n.isZero()&&0===n.andln(1);)d++,n.iushrn(1);r(!n.isZero());var o=new c(1).toRed(this),i=o.redNeg(),f=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new c(2*s*s).toRed(this);0!==this.pow(s,f).cmp(i);)s.redIAdd(i);for(var b=this.pow(s,n),l=this.pow(e,n.addn(1).iushrn(1)),u=this.pow(e,n),h=d;0!==u.cmp(o);){for(var p=u,x=0;0!==p.cmp(o);x++)p=p.redSqr();r(x=0;r--){for(var f=t.words[r],s=i-1;s>=0;s--){var b=f>>s&1;n!==a[0]&&(n=this.sqr(n)),0!==b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(n=this.mul(n,a[d]),o=0,d=0)):o=0}i=26}return n},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new _(e)},n(_,I),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),c=n;return n.cmp(this.m)>=0?c=n.isub(this.m):n.cmpn(0)<0&&(c=n.iadd(this.m)),c._forceRed(this)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new c(0)._forceRed(this);var a=e.mul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),d=n;return n.cmp(this.m)>=0?d=n.isub(this.m):n.cmpn(0)<0&&(d=n.iadd(this.m)),d._forceRed(this)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},88462:(e,t,a)=>{var r;function n(e){this.rand=e}if(e.exports=function(e){return r||(r=new n(null)),r.generate(e)},e.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),a=0;a{var r=a(59966).Buffer;function n(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,a=new Array(t),n=0;n>>24]^s[h>>>16&255]^b[p>>>8&255]^l[255&x]^t[m++],d=f[h>>>24]^s[p>>>16&255]^b[x>>>8&255]^l[255&u]^t[m++],o=f[p>>>24]^s[x>>>16&255]^b[u>>>8&255]^l[255&h]^t[m++],i=f[x>>>24]^s[u>>>16&255]^b[h>>>8&255]^l[255&p]^t[m++],u=c,h=d,p=o,x=i;return c=(r[u>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&x])^t[m++],d=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[x>>>8&255]<<8|r[255&u])^t[m++],o=(r[p>>>24]<<24|r[x>>>16&255]<<16|r[u>>>8&255]<<8|r[255&h])^t[m++],i=(r[x>>>24]<<24|r[u>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^t[m++],[c>>>=0,d>>>=0,o>>>=0,i>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],i=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var a=[],r=[],n=[[],[],[],[]],c=[[],[],[],[]],d=0,o=0,i=0;i<256;++i){var f=o^o<<1^o<<2^o<<3^o<<4;f=f>>>8^255&f^99,a[d]=f,r[f]=d;var s=e[d],b=e[s],l=e[b],u=257*e[f]^16843008*f;n[0][d]=u<<24|u>>>8,n[1][d]=u<<16|u>>>16,n[2][d]=u<<8|u>>>24,n[3][d]=u,u=16843009*l^65537*b^257*s^16843008*d,c[0][f]=u<<24|u>>>8,c[1][f]=u<<16|u>>>16,c[2][f]=u<<8|u>>>24,c[3][f]=u,0===d?d=o=1:(d=s^e[e[e[l^s]]],o^=e[e[o]])}return{SBOX:a,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:c}}();function f(e){this._key=n(e),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,a=t+6,r=4*(a+1),n=[],c=0;c>>24,d=i.SBOX[d>>>24]<<24|i.SBOX[d>>>16&255]<<16|i.SBOX[d>>>8&255]<<8|i.SBOX[255&d],d^=o[c/t|0]<<24):t>6&&c%t===4&&(d=i.SBOX[d>>>24]<<24|i.SBOX[d>>>16&255]<<16|i.SBOX[d>>>8&255]<<8|i.SBOX[255&d]),n[c]=n[c-t]^d}for(var f=[],s=0;s>>24]]^i.INV_SUB_MIX[1][i.SBOX[l>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[l>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&l]]}this._nRounds=a,this._keySchedule=n,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(e){return d(e=n(e),this._keySchedule,i.SUB_MIX,i.SBOX,this._nRounds)},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),a=r.allocUnsafe(16);return a.writeUInt32BE(t[0],0),a.writeUInt32BE(t[1],4),a.writeUInt32BE(t[2],8),a.writeUInt32BE(t[3],12),a},f.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var a=d(e,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX,this._nRounds),c=r.allocUnsafe(16);return c.writeUInt32BE(a[0],0),c.writeUInt32BE(a[3],4),c.writeUInt32BE(a[2],8),c.writeUInt32BE(a[1],12),c},f.prototype.scrub=function(){c(this._keySchedule),c(this._invKeySchedule),c(this._key)},e.exports.AES=f},45787:(e,t,a)=>{var r=a(34279),n=a(59966).Buffer,c=a(6239),d=a(56329),o=a(48525),i=a(58586),f=a(93277);function s(e,t,a,d){c.call(this);var i=n.alloc(4,0);this._cipher=new r.AES(t);var s=this._cipher.encryptBlock(i);this._ghash=new o(s),a=function(e,t,a){if(12===t.length)return e._finID=n.concat([t,n.from([0,0,0,1])]),n.concat([t,n.from([0,0,0,2])]);var r=new o(a),c=t.length,d=c%16;r.update(t),d&&(d=16-d,r.update(n.alloc(d,0))),r.update(n.alloc(8,0));var i=8*c,s=n.alloc(8);s.writeUIntBE(i,0,8),r.update(s),e._finID=r.state;var b=n.from(e._finID);return f(b),b}(this,a,s),this._prev=n.from(a),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=d,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}d(s,c),s.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=n.alloc(t,0),this._ghash.update(t))}this._called=!0;var a=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(a),this._len+=e.length,a},s.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=i(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var a=0;e.length!==t.length&&a++;for(var r=Math.min(e.length,t.length),n=0;n{var r=a(29454),n=a(35190),c=a(3219);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=n.createDecipher,t.createDecipheriv=t.Decipheriv=n.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(c)}},35190:(e,t,a)=>{var r=a(45787),n=a(59966).Buffer,c=a(1735),d=a(2301),o=a(6239),i=a(34279),f=a(98451);function s(e,t,a){o.call(this),this._cache=new b,this._last=void 0,this._cipher=new i.AES(t),this._prev=n.from(a),this._mode=e,this._autopadding=!0}function b(){this.cache=n.allocUnsafe(0)}function l(e,t,a){var o=c[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"===typeof a&&(a=n.from(a)),"GCM"!==o.mode&&a.length!==o.iv)throw new TypeError("invalid iv length "+a.length);if("string"===typeof t&&(t=n.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===o.type?new d(o.module,t,a,!0):"auth"===o.type?new r(o.module,t,a,!0):new s(o.module,t,a)}a(56329)(s,o),s.prototype._update=function(e){var t,a;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)a=this._mode.decrypt(this,t),r.push(a);return n.concat(r)},s.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var a=-1;for(;++a16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},b.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var a=c[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");var r=f(t,!1,a.key,a.iv);return l(e,r.key,r.iv)},t.createDecipheriv=l},29454:(e,t,a)=>{var r=a(1735),n=a(45787),c=a(59966).Buffer,d=a(2301),o=a(6239),i=a(34279),f=a(98451);function s(e,t,a){o.call(this),this._cache=new l,this._cipher=new i.AES(t),this._prev=c.from(a),this._mode=e,this._autopadding=!0}a(56329)(s,o),s.prototype._update=function(e){var t,a;this._cache.add(e);for(var r=[];t=this._cache.get();)a=this._mode.encrypt(this,t),r.push(a);return c.concat(r)};var b=c.alloc(16,16);function l(){this.cache=c.allocUnsafe(0)}function u(e,t,a){var o=r[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"===typeof t&&(t=c.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"===typeof a&&(a=c.from(a)),"GCM"!==o.mode&&a.length!==o.iv)throw new TypeError("invalid iv length "+a.length);return"stream"===o.type?new d(o.module,t,a):"auth"===o.type?new n(o.module,t,a):new s(o.module,t,a)}s.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(b))throw this._cipher.scrub(),new Error("data not multiple of block length")},s.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=c.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,t=c.allocUnsafe(e),a=-1;++a{var r=a(59966).Buffer,n=r.alloc(16,0);function c(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function d(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}d.prototype.ghash=function(e){for(var t=-1;++t0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,a&&(r[0]=r[0]^225<<24)}this.state=c(n)},d.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},d.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(c([0,e,0,t])),this.state},e.exports=d},93277:e=>{e.exports=function(e){for(var t,a=e.length;a--;){if(255!==(t=e.readUInt8(a))){t++,e.writeUInt8(t,a);break}e.writeUInt8(0,a)}}},64645:(e,t,a)=>{var r=a(58586);t.encrypt=function(e,t){var a=r(t,e._prev);return e._prev=e._cipher.encryptBlock(a),e._prev},t.decrypt=function(e,t){var a=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return r(n,a)}},36210:(e,t,a)=>{var r=a(59966).Buffer,n=a(58586);function c(e,t,a){var c=t.length,d=n(t,e._cache);return e._cache=e._cache.slice(c),e._prev=r.concat([e._prev,a?t:d]),d}t.encrypt=function(e,t,a){for(var n,d=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){d=r.concat([d,c(e,t,a)]);break}n=e._cache.length,d=r.concat([d,c(e,t.slice(0,n),a)]),t=t.slice(n)}return d}},57071:(e,t,a)=>{var r=a(59966).Buffer;function n(e,t,a){for(var r,n,d=-1,o=0;++d<8;)r=t&1<<7-d?128:0,o+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^r))>>d%8,e._prev=c(e._prev,a?r:n);return o}function c(e,t){var a=e.length,n=-1,c=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++n>7;return c}t.encrypt=function(e,t,a){for(var c=t.length,d=r.allocUnsafe(c),o=-1;++o{var r=a(59966).Buffer;function n(e,t,a){var n=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([a?t:n])]),n}t.encrypt=function(e,t,a){for(var c=t.length,d=r.allocUnsafe(c),o=-1;++o{var r=a(58586),n=a(59966).Buffer,c=a(93277);function d(e){var t=e._cipher.encryptBlockRaw(e._prev);return c(e._prev),t}t.encrypt=function(e,t){var a=Math.ceil(t.length/16),c=e._cache.length;e._cache=n.concat([e._cache,n.allocUnsafe(16*a)]);for(var o=0;o{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},1735:(e,t,a)=>{var r={ECB:a(47257),CBC:a(64645),CFB:a(36210),CFB8:a(28528),CFB1:a(57071),OFB:a(3542),CTR:a(75536),GCM:a(75536)},n=a(3219);for(var c in n)n[c].module=r[n[c].mode];e.exports=n},3542:(e,t,a)=>{var r=a(26382).Buffer,n=a(58586);function c(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length{var r=a(34279),n=a(59966).Buffer,c=a(6239);function d(e,t,a,d){c.call(this),this._cipher=new r.AES(t),this._prev=n.from(a),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=d,this._mode=e}a(56329)(d,c),d.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},d.prototype._final=function(){this._cipher.scrub()},e.exports=d},4014:(e,t,a)=>{var r=a(86951),n=a(32428),c=a(1735),d=a(35491),o=a(98451);function i(e,t,a){if(e=e.toLowerCase(),c[e])return n.createCipheriv(e,t,a);if(d[e])return new r({key:t,iv:a,mode:e});throw new TypeError("invalid suite type")}function f(e,t,a){if(e=e.toLowerCase(),c[e])return n.createDecipheriv(e,t,a);if(d[e])return new r({key:t,iv:a,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var a,r;if(e=e.toLowerCase(),c[e])a=c[e].key,r=c[e].iv;else{if(!d[e])throw new TypeError("invalid suite type");a=8*d[e].key,r=d[e].iv}var n=o(t,!1,a,r);return i(e,n.key,n.iv)},t.createCipheriv=t.Cipheriv=i,t.createDecipher=t.Decipher=function(e,t){var a,r;if(e=e.toLowerCase(),c[e])a=c[e].key,r=c[e].iv;else{if(!d[e])throw new TypeError("invalid suite type");a=8*d[e].key,r=d[e].iv}var n=o(t,!1,a,r);return f(e,n.key,n.iv)},t.createDecipheriv=t.Decipheriv=f,t.listCiphers=t.getCiphers=function(){return Object.keys(d).concat(n.getCiphers())}},86951:(e,t,a)=>{var r=a(6239),n=a(13325),c=a(56329),d=a(59966).Buffer,o={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function i(e){r.call(this);var t,a=e.mode.toLowerCase(),n=o[a];t=e.decrypt?"decrypt":"encrypt";var c=e.key;d.isBuffer(c)||(c=d.from(c)),"des-ede"!==a&&"des-ede-cbc"!==a||(c=d.concat([c,c.slice(0,8)]));var i=e.iv;d.isBuffer(i)||(i=d.from(i)),this._des=n.create({key:c,iv:i,type:t})}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],e.exports=i,c(i,r),i.prototype._update=function(e){return d.from(this._des.update(e))},i.prototype._final=function(){return d.from(this._des.final())}},35491:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},78102:(e,t,a)=>{var r=a(26382).Buffer,n=a(17992),c=a(15838);function d(e){var t,a=e.modulus.byteLength();do{t=new n(c(a))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function o(e,t){var a=function(e){var t=d(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),c=t.modulus.byteLength(),o=new n(e).mul(a.blinder).umod(t.modulus),i=o.toRed(n.mont(t.prime1)),f=o.toRed(n.mont(t.prime2)),s=t.coefficient,b=t.prime1,l=t.prime2,u=i.redPow(t.exponent1).fromRed(),h=f.redPow(t.exponent2).fromRed(),p=u.isub(h).imul(s).umod(b).imul(l);return h.iadd(p).imul(a.unblinder).umod(t.modulus).toArrayLike(r,"be",c)}o.getr=d,e.exports=o},17992:function(e,t,a){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}function c(e,t,a){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(a=t,t=10),this._init(e||0,t||10,a||"be"))}var d;"object"===typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{d="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:a(98285).Buffer}catch(N){}function o(e,t){var a=e.charCodeAt(t);return a>=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:void r(!1,"Invalid character in "+e)}function i(e,t,a){var r=o(e,a);return a-1>=t&&(r|=o(e,a-1)<<4),r}function f(e,t,a,n){for(var c=0,d=0,o=Math.min(e.length,a),i=t;i=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&d0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,t,a){if("number"===typeof e)return this._initNumber(e,t,a);if("object"===typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)d=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[c]|=d<>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);else if("le"===a)for(n=0,c=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);return this._strip()},c.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)n=i(e,t,r)<=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;this._strip()},c.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var c=e.length-a,d=c%r,o=Math.min(c,c-d)+a,i=0,s=a;s1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch(N){c.prototype.inspect=b}else c.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];c.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var n=0,c=0,d=0;d>>24-n&16777215,(n+=2)>=26&&(n-=26,d--),a=0!==c||d!==this.length-1?l[6-i.length]+i+a:i+a}for(0!==c&&(a=c.toString(16)+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var f=u[e],s=h[e];a="";var b=this.clone();for(b.negative=0;!b.isZero();){var p=b.modrn(s).toString(e);a=(b=b.idivn(s)).isZero()?p+a:l[f-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}r(!1,"Base should be between 2 and 36")},c.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},c.prototype.toJSON=function(){return this.toString(16,2)},d&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(d,e,t)}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,a){a.negative=t.negative^e.negative;var r=e.length+t.length|0;a.length=r,r=r-1|0;var n=0|e.words[0],c=0|t.words[0],d=n*c,o=67108863&d,i=d/67108864|0;a.words[0]=o;for(var f=1;f>>26,b=67108863&i,l=Math.min(f,t.length-1),u=Math.max(0,f-e.length+1);u<=l;u++){var h=f-u|0;s+=(d=(n=0|e.words[h])*(c=0|t.words[u])+b)/67108864|0,b=67108863&d}a.words[f]=0|b,i=0|s}return 0!==i?a.words[f]=0|i:a.length--,a._strip()}c.prototype.toArrayLike=function(e,t,a){this._strip();var n=this.byteLength(),c=a||Math.max(1,n);r(n<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0");var d=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](d,n),d},c.prototype._toArrayLikeLE=function(e,t){for(var a=0,r=0,n=0,c=0;n>8&255),a>16&255),6===c?(a>24&255),r=0,c=0):(r=d>>>24,c+=2)}if(a=0&&(e[a--]=d>>8&255),a>=0&&(e[a--]=d>>16&255),6===c?(a>=0&&(e[a--]=d>>24&255),r=0,c=0):(r=d>>>24,c+=2)}if(a>=0)for(e[a--]=r;a>=0;)e[a--]=0},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,a=0;return t>=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0===(8191&t)&&(a+=13,t>>>=13),0===(127&t)&&(a+=7,t>>>=7),0===(15&t)&&(a+=4,t>>>=4),0===(3&t)&&(a+=2,t>>>=2),0===(1&t)&&a++,a},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-a),this._strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var a=e/26|0,n=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,r=e):(a=e,r=this);for(var n=0,c=0;c>>26;for(;0!==n&&c>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ce.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,r=e):(a=e,r=this);for(var c=0,d=0;d>26,this.words[d]=67108863&t;for(;0!==c&&d>26,this.words[d]=67108863&t;if(0===c&&d>>13,u=0|d[1],h=8191&u,p=u>>>13,x=0|d[2],m=8191&x,g=x>>>13,v=0|d[3],y=8191&v,w=v>>>13,k=0|d[4],I=8191&k,_=k>>>13,A=0|d[5],E=8191&A,S=A>>>13,N=0|d[6],M=8191&N,H=N>>>13,T=0|d[7],P=8191&T,R=T>>>13,C=0|d[8],O=8191&C,D=C>>>13,B=0|d[9],L=8191&B,j=B>>>13,U=0|o[0],F=8191&U,z=U>>>13,q=0|o[1],W=8191&q,V=q>>>13,K=0|o[2],G=8191&K,Y=K>>>13,J=0|o[3],X=8191&J,Z=J>>>13,Q=0|o[4],$=8191&Q,ee=Q>>>13,te=0|o[5],ae=8191&te,re=te>>>13,ne=0|o[6],ce=8191&ne,de=ne>>>13,oe=0|o[7],ie=8191&oe,fe=oe>>>13,se=0|o[8],be=8191&se,le=se>>>13,ue=0|o[9],he=8191&ue,pe=ue>>>13;a.negative=e.negative^t.negative,a.length=19;var xe=(f+(r=Math.imul(b,F))|0)+((8191&(n=(n=Math.imul(b,z))+Math.imul(l,F)|0))<<13)|0;f=((c=Math.imul(l,z))+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(h,F),n=(n=Math.imul(h,z))+Math.imul(p,F)|0,c=Math.imul(p,z);var me=(f+(r=r+Math.imul(b,W)|0)|0)+((8191&(n=(n=n+Math.imul(b,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((c=c+Math.imul(l,V)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),n=(n=Math.imul(m,z))+Math.imul(g,F)|0,c=Math.imul(g,z),r=r+Math.imul(h,W)|0,n=(n=n+Math.imul(h,V)|0)+Math.imul(p,W)|0,c=c+Math.imul(p,V)|0;var ge=(f+(r=r+Math.imul(b,G)|0)|0)+((8191&(n=(n=n+Math.imul(b,Y)|0)+Math.imul(l,G)|0))<<13)|0;f=((c=c+Math.imul(l,Y)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(w,F)|0,c=Math.imul(w,z),r=r+Math.imul(m,W)|0,n=(n=n+Math.imul(m,V)|0)+Math.imul(g,W)|0,c=c+Math.imul(g,V)|0,r=r+Math.imul(h,G)|0,n=(n=n+Math.imul(h,Y)|0)+Math.imul(p,G)|0,c=c+Math.imul(p,Y)|0;var ve=(f+(r=r+Math.imul(b,X)|0)|0)+((8191&(n=(n=n+Math.imul(b,Z)|0)+Math.imul(l,X)|0))<<13)|0;f=((c=c+Math.imul(l,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(_,F)|0,c=Math.imul(_,z),r=r+Math.imul(y,W)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(w,W)|0,c=c+Math.imul(w,V)|0,r=r+Math.imul(m,G)|0,n=(n=n+Math.imul(m,Y)|0)+Math.imul(g,G)|0,c=c+Math.imul(g,Y)|0,r=r+Math.imul(h,X)|0,n=(n=n+Math.imul(h,Z)|0)+Math.imul(p,X)|0,c=c+Math.imul(p,Z)|0;var ye=(f+(r=r+Math.imul(b,$)|0)|0)+((8191&(n=(n=n+Math.imul(b,ee)|0)+Math.imul(l,$)|0))<<13)|0;f=((c=c+Math.imul(l,ee)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),n=(n=Math.imul(E,z))+Math.imul(S,F)|0,c=Math.imul(S,z),r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(_,W)|0,c=c+Math.imul(_,V)|0,r=r+Math.imul(y,G)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(w,G)|0,c=c+Math.imul(w,Y)|0,r=r+Math.imul(m,X)|0,n=(n=n+Math.imul(m,Z)|0)+Math.imul(g,X)|0,c=c+Math.imul(g,Z)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(p,$)|0,c=c+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(b,ae)|0)|0)+((8191&(n=(n=n+Math.imul(b,re)|0)+Math.imul(l,ae)|0))<<13)|0;f=((c=c+Math.imul(l,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,F),n=(n=Math.imul(M,z))+Math.imul(H,F)|0,c=Math.imul(H,z),r=r+Math.imul(E,W)|0,n=(n=n+Math.imul(E,V)|0)+Math.imul(S,W)|0,c=c+Math.imul(S,V)|0,r=r+Math.imul(I,G)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(_,G)|0,c=c+Math.imul(_,Y)|0,r=r+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(w,X)|0,c=c+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,n=(n=n+Math.imul(m,ee)|0)+Math.imul(g,$)|0,c=c+Math.imul(g,ee)|0,r=r+Math.imul(h,ae)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(p,ae)|0,c=c+Math.imul(p,re)|0;var ke=(f+(r=r+Math.imul(b,ce)|0)|0)+((8191&(n=(n=n+Math.imul(b,de)|0)+Math.imul(l,ce)|0))<<13)|0;f=((c=c+Math.imul(l,de)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(R,F)|0,c=Math.imul(R,z),r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(H,W)|0,c=c+Math.imul(H,V)|0,r=r+Math.imul(E,G)|0,n=(n=n+Math.imul(E,Y)|0)+Math.imul(S,G)|0,c=c+Math.imul(S,Y)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(_,X)|0,c=c+Math.imul(_,Z)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0,r=r+Math.imul(m,ae)|0,n=(n=n+Math.imul(m,re)|0)+Math.imul(g,ae)|0,c=c+Math.imul(g,re)|0,r=r+Math.imul(h,ce)|0,n=(n=n+Math.imul(h,de)|0)+Math.imul(p,ce)|0,c=c+Math.imul(p,de)|0;var Ie=(f+(r=r+Math.imul(b,ie)|0)|0)+((8191&(n=(n=n+Math.imul(b,fe)|0)+Math.imul(l,ie)|0))<<13)|0;f=((c=c+Math.imul(l,fe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(O,F),n=(n=Math.imul(O,z))+Math.imul(D,F)|0,c=Math.imul(D,z),r=r+Math.imul(P,W)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(R,W)|0,c=c+Math.imul(R,V)|0,r=r+Math.imul(M,G)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(H,G)|0,c=c+Math.imul(H,Y)|0,r=r+Math.imul(E,X)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(S,X)|0,c=c+Math.imul(S,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(y,ae)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(w,ae)|0,c=c+Math.imul(w,re)|0,r=r+Math.imul(m,ce)|0,n=(n=n+Math.imul(m,de)|0)+Math.imul(g,ce)|0,c=c+Math.imul(g,de)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,fe)|0)+Math.imul(p,ie)|0,c=c+Math.imul(p,fe)|0;var _e=(f+(r=r+Math.imul(b,be)|0)|0)+((8191&(n=(n=n+Math.imul(b,le)|0)+Math.imul(l,be)|0))<<13)|0;f=((c=c+Math.imul(l,le)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,F),n=(n=Math.imul(L,z))+Math.imul(j,F)|0,c=Math.imul(j,z),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,V)|0)+Math.imul(D,W)|0,c=c+Math.imul(D,V)|0,r=r+Math.imul(P,G)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(R,G)|0,c=c+Math.imul(R,Y)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(H,X)|0,c=c+Math.imul(H,Z)|0,r=r+Math.imul(E,$)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(S,$)|0,c=c+Math.imul(S,ee)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(_,ae)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(y,ce)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(w,ce)|0,c=c+Math.imul(w,de)|0,r=r+Math.imul(m,ie)|0,n=(n=n+Math.imul(m,fe)|0)+Math.imul(g,ie)|0,c=c+Math.imul(g,fe)|0,r=r+Math.imul(h,be)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(p,be)|0,c=c+Math.imul(p,le)|0;var Ae=(f+(r=r+Math.imul(b,he)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(l,he)|0))<<13)|0;f=((c=c+Math.imul(l,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,V))+Math.imul(j,W)|0,c=Math.imul(j,V),r=r+Math.imul(O,G)|0,n=(n=n+Math.imul(O,Y)|0)+Math.imul(D,G)|0,c=c+Math.imul(D,Y)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(R,X)|0,c=c+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(E,ae)|0,n=(n=n+Math.imul(E,re)|0)+Math.imul(S,ae)|0,c=c+Math.imul(S,re)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,de)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,fe)|0)+Math.imul(w,ie)|0,c=c+Math.imul(w,fe)|0,r=r+Math.imul(m,be)|0,n=(n=n+Math.imul(m,le)|0)+Math.imul(g,be)|0,c=c+Math.imul(g,le)|0;var Ee=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;f=((c=c+Math.imul(p,pe)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,G),n=(n=Math.imul(L,Y))+Math.imul(j,G)|0,c=Math.imul(j,Y),r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(D,X)|0,c=c+Math.imul(D,Z)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(R,$)|0,c=c+Math.imul(R,ee)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(H,ae)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(E,ce)|0,n=(n=n+Math.imul(E,de)|0)+Math.imul(S,ce)|0,c=c+Math.imul(S,de)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(y,be)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(w,be)|0,c=c+Math.imul(w,le)|0;var Se=(f+(r=r+Math.imul(m,he)|0)|0)+((8191&(n=(n=n+Math.imul(m,pe)|0)+Math.imul(g,he)|0))<<13)|0;f=((c=c+Math.imul(g,pe)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,Z))+Math.imul(j,X)|0,c=Math.imul(j,Z),r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,r=r+Math.imul(P,ae)|0,n=(n=n+Math.imul(P,re)|0)+Math.imul(R,ae)|0,c=c+Math.imul(R,re)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,de)|0,r=r+Math.imul(E,ie)|0,n=(n=n+Math.imul(E,fe)|0)+Math.imul(S,ie)|0,c=c+Math.imul(S,fe)|0,r=r+Math.imul(I,be)|0,n=(n=n+Math.imul(I,le)|0)+Math.imul(_,be)|0,c=c+Math.imul(_,le)|0;var Ne=(f+(r=r+Math.imul(y,he)|0)|0)+((8191&(n=(n=n+Math.imul(y,pe)|0)+Math.imul(w,he)|0))<<13)|0;f=((c=c+Math.imul(w,pe)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(j,$)|0,c=Math.imul(j,ee),r=r+Math.imul(O,ae)|0,n=(n=n+Math.imul(O,re)|0)+Math.imul(D,ae)|0,c=c+Math.imul(D,re)|0,r=r+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(R,ce)|0,c=c+Math.imul(R,de)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(E,be)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(S,be)|0,c=c+Math.imul(S,le)|0;var Me=(f+(r=r+Math.imul(I,he)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(_,he)|0))<<13)|0;f=((c=c+Math.imul(_,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,re))+Math.imul(j,ae)|0,c=Math.imul(j,re),r=r+Math.imul(O,ce)|0,n=(n=n+Math.imul(O,de)|0)+Math.imul(D,ce)|0,c=c+Math.imul(D,de)|0,r=r+Math.imul(P,ie)|0,n=(n=n+Math.imul(P,fe)|0)+Math.imul(R,ie)|0,c=c+Math.imul(R,fe)|0,r=r+Math.imul(M,be)|0,n=(n=n+Math.imul(M,le)|0)+Math.imul(H,be)|0,c=c+Math.imul(H,le)|0;var He=(f+(r=r+Math.imul(E,he)|0)|0)+((8191&(n=(n=n+Math.imul(E,pe)|0)+Math.imul(S,he)|0))<<13)|0;f=((c=c+Math.imul(S,pe)|0)+(n>>>13)|0)+(He>>>26)|0,He&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,de))+Math.imul(j,ce)|0,c=Math.imul(j,de),r=r+Math.imul(O,ie)|0,n=(n=n+Math.imul(O,fe)|0)+Math.imul(D,ie)|0,c=c+Math.imul(D,fe)|0,r=r+Math.imul(P,be)|0,n=(n=n+Math.imul(P,le)|0)+Math.imul(R,be)|0,c=c+Math.imul(R,le)|0;var Te=(f+(r=r+Math.imul(M,he)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(H,he)|0))<<13)|0;f=((c=c+Math.imul(H,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,fe))+Math.imul(j,ie)|0,c=Math.imul(j,fe),r=r+Math.imul(O,be)|0,n=(n=n+Math.imul(O,le)|0)+Math.imul(D,be)|0,c=c+Math.imul(D,le)|0;var Pe=(f+(r=r+Math.imul(P,he)|0)|0)+((8191&(n=(n=n+Math.imul(P,pe)|0)+Math.imul(R,he)|0))<<13)|0;f=((c=c+Math.imul(R,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,be),n=(n=Math.imul(L,le))+Math.imul(j,be)|0,c=Math.imul(j,le);var Re=(f+(r=r+Math.imul(O,he)|0)|0)+((8191&(n=(n=n+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;f=((c=c+Math.imul(D,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(f+(r=Math.imul(L,he))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(j,he)|0))<<13)|0;return f=((c=Math.imul(j,pe))+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i[0]=xe,i[1]=me,i[2]=ge,i[3]=ve,i[4]=ye,i[5]=we,i[6]=ke,i[7]=Ie,i[8]=_e,i[9]=Ae,i[10]=Ee,i[11]=Se,i[12]=Ne,i[13]=Me,i[14]=He,i[15]=Te,i[16]=Pe,i[17]=Re,i[18]=Ce,0!==f&&(i[19]=f,a.length++),a};function m(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var r=0,n=0,c=0;c>>26)|0)>>>26,d&=67108863}a.words[c]=o,r=d,d=n}return 0!==r?a.words[c]=r:a.length--,a._strip()}function g(e,t,a){return m(e,t,a)}function v(e,t){this.x=e,this.y=t}Math.imul||(x=p),c.prototype.mulTo=function(e,t){var a=this.length+e.length;return 10===this.length&&10===e.length?x(this,e,t):a<63?p(this,e,t):a<1024?m(this,e,t):g(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),a=c.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,a,r,n,c){for(var d=0;d>>=1)n++;return 1<>>=13,a[2*d+1]=8191&c,c>>>=13;for(d=2*t;d>=26,a+=c/67108864|0,a+=d>>>26,this.words[n]=67108863&d}return 0!==a&&(this.words[n]=a,this.length++),t?this.ineg():this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>n&1}return t}(e);if(0===t.length)return new c(1);for(var a=this,r=0;r=0);var t,a=e%26,n=(e-a)/26,c=67108863>>>26-a<<26-a;if(0!==a){var d=0;for(t=0;t>>26-a}d&&(this.words[t]=d,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var c=e%26,d=Math.min((e-c)/26,this.length),o=67108863^67108863>>>c<d)for(this.length-=d,f=0;f=0&&(0!==s||f>=n);f--){var b=0|this.words[f];this.words[f]=s<<26-c|b>>>c,s=b&o}return i&&0!==s&&(i.words[i.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(e,t,a){return r(0===this.negative),this.iushrn(e,t,a)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,a=(e-t)/26,n=1<=0);var t=e%26,a=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},c.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 t=0;t>26)-(i/67108864|0),this.words[n+a]=67108863&c}for(;n>26,this.words[n+a]=67108863&c;if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&c;return this.negative=1,this._strip()},c.prototype._wordDiv=function(e,t){var a=(this.length,e.length),r=this.clone(),n=e,d=0|n.words[n.length-1];0!==(a=26-this._countBits(d))&&(n=n.ushln(a),r.iushln(a),d=0|n.words[n.length-1]);var o,i=r.length-n.length;if("mod"!==t){(o=new c(null)).length=i+1,o.words=new Array(o.length);for(var f=0;f=0;b--){var l=67108864*(0|r.words[n.length+b])+(0|r.words[n.length+b-1]);for(l=Math.min(l/d|0,67108863),r._ishlnsubmul(n,l,b);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,b),r.isZero()||(r.negative^=1);o&&(o.words[b]=l)}return o&&o._strip(),r._strip(),"div"!==t&&0!==a&&r.iushrn(a),{div:o||null,mod:r}},c.prototype.divmod=function(e,t,a){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.iadd(e)),{div:n,mod:d}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.isub(e)),{div:o.div,mod:d}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,d,o},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),c=a.cmp(r);return c<0||1===n&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var a=(1<<26)%e,n=0,c=this.length-1;c>=0;c--)n=(a*n+(0|this.words[c]))%e;return t?-n:n},c.prototype.modn=function(e){return this.modrn(e)},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var a=0,n=this.length-1;n>=0;n--){var c=(0|this.words[n])+67108864*a;this.words[n]=c/e|0,a=c%e}return this._strip(),t?this.ineg():this},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new c(1),d=new c(0),o=new c(0),i=new c(1),f=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++f;for(var s=a.clone(),b=t.clone();!t.isZero();){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||d.isOdd())&&(n.iadd(s),d.isub(b)),n.iushrn(1),d.iushrn(1);for(var h=0,p=1;0===(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(s),i.isub(b)),o.iushrn(1),i.iushrn(1);t.cmp(a)>=0?(t.isub(a),n.isub(o),d.isub(i)):(a.isub(t),o.isub(n),i.isub(d))}return{a:o,b:i,gcd:a.iushln(f)}},c.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,d=new c(1),o=new c(0),i=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var f=0,s=1;0===(t.words[0]&s)&&f<26;++f,s<<=1);if(f>0)for(t.iushrn(f);f-- >0;)d.isOdd()&&d.iadd(i),d.iushrn(1);for(var b=0,l=1;0===(a.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(a.iushrn(b);b-- >0;)o.isOdd()&&o.iadd(i),o.iushrn(1);t.cmp(a)>=0?(t.isub(a),d.isub(o)):(a.isub(t),o.isub(d))}return(n=0===t.cmpn(1)?d:o).cmpn(0)<0&&n.iadd(e),n},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var r=0;t.isEven()&&a.isEven();r++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var n=t.cmp(a);if(n<0){var c=t;t=a,a=c}else if(0===n||0===a.cmpn(1))break;t.isub(a)}return a.iushln(r)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0===(1&this.words[0])},c.prototype.isOdd=function(){return 1===(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,a=(e-t)/26,n=1<>>26,o&=67108863,this.words[d]=o}return 0!==c&&(this.words[d]=c,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this._strip(),this.length>1)t=1;else{a&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;a--){var r=0|this.words[a],n=0|e.words[a];if(r!==n){rn&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new E(e)},c.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)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.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 w(e,t){this.name=e,this.p=new c(t,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function I(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},n(k,w),k.prototype.split=function(e,t){for(var a=4194303,r=Math.min(e.length,9),n=0;n>>22,c=d}c>>>=22,e.words[n-10]=c,0===c&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new I;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return y[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},E.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var a=this.m.add(new c(1)).iushrn(2);return this.pow(e,a)}for(var n=this.m.subn(1),d=0;!n.isZero()&&0===n.andln(1);)d++,n.iushrn(1);r(!n.isZero());var o=new c(1).toRed(this),i=o.redNeg(),f=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new c(2*s*s).toRed(this);0!==this.pow(s,f).cmp(i);)s.redIAdd(i);for(var b=this.pow(s,n),l=this.pow(e,n.addn(1).iushrn(1)),u=this.pow(e,n),h=d;0!==u.cmp(o);){for(var p=u,x=0;0!==p.cmp(o);x++)p=p.redSqr();r(x=0;r--){for(var f=t.words[r],s=i-1;s>=0;s--){var b=f>>s&1;n!==a[0]&&(n=this.sqr(n)),0!==b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(n=this.mul(n,a[d]),o=0,d=0)):o=0}i=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new S(e)},n(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),c=n;return n.cmp(this.m)>=0?c=n.isub(this.m):n.cmpn(0)<0&&(c=n.iadd(this.m)),c._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new c(0)._forceRed(this);var a=e.mul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),d=n;return n.cmp(this.m)>=0?d=n.isub(this.m):n.cmpn(0)<0&&(d=n.iadd(this.m)),d._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},99096:(e,t,a)=>{"use strict";e.exports=a(62951)},17207:(e,t,a)=>{"use strict";var r=a(59966).Buffer,n=a(36059),c=a(73350),d=a(56329),o=a(12478),i=a(48818),f=a(62951);function s(e){c.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function b(e){c.Writable.call(this);var t=f[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){return new s(e)}function u(e){return new b(e)}Object.keys(f).forEach((function(e){f[e].id=r.from(f[e].id,"hex"),f[e.toLowerCase()]=f[e]})),d(s,c.Writable),s.prototype._write=function(e,t,a){this._hash.update(e),a()},s.prototype.update=function(e,t){return this._hash.update("string"===typeof e?r.from(e,t):e),this},s.prototype.sign=function(e,t){this.end();var a=this._hash.digest(),r=o(a,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},d(b,c.Writable),b.prototype._write=function(e,t,a){this._hash.update(e),a()},b.prototype.update=function(e,t){return this._hash.update("string"===typeof e?r.from(e,t):e),this},b.prototype.verify=function(e,t,a){var n="string"===typeof t?r.from(t,a):t;this.end();var c=this._hash.digest();return i(n,c,e,this._signType,this._tag)},e.exports={Sign:l,Verify:u,createSign:l,createVerify:u}},12478:(e,t,a)=>{"use strict";var r=a(59966).Buffer,n=a(82080),c=a(78102),d=a(38086).ec,o=a(81949),i=a(74496),f=a(64589);function s(e,t,a,c){if((e=r.from(e.toArray())).length0&&a.ishrn(r),a}function l(e,t,a){var c,d;do{for(c=r.alloc(0);8*c.length{"use strict";var r=a(59966).Buffer,n=a(81949),c=a(38086).ec,d=a(74496),o=a(64589);function i(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,a,f,s){var b=d(a);if("ec"===b.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(e,t,a){var r=o[a.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+a.data.algorithm.curve.join("."));var n=new c(r),d=a.data.subjectPrivateKey.data;return n.verify(t,e,d)}(e,t,b)}if("dsa"===b.type){if("dsa"!==f)throw new Error("wrong public key type");return function(e,t,a){var r=a.data.p,c=a.data.q,o=a.data.g,f=a.data.pub_key,s=d.signature.decode(e,"der"),b=s.s,l=s.r;i(b,c),i(l,c);var u=n.mont(r),h=b.invm(c),p=o.toRed(u).redPow(new n(t).mul(h).mod(c)).fromRed().mul(f.toRed(u).redPow(l.mul(h).mod(c)).fromRed()).mod(r).mod(c);return 0===p.cmp(l)}(e,t,b)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");t=r.concat([s,t]);for(var l=b.modulus.byteLength(),u=[1],h=0;t.length+u.length+2=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:void r(!1,"Invalid character in "+e)}function i(e,t,a){var r=o(e,a);return a-1>=t&&(r|=o(e,a-1)<<4),r}function f(e,t,a,n){for(var c=0,d=0,o=Math.min(e.length,a),i=t;i=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&d0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,t,a){if("number"===typeof e)return this._initNumber(e,t,a);if("object"===typeof e)return this._initArray(e,t,a);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)d=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[c]|=d<>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);else if("le"===a)for(n=0,c=0;n>>26-o&67108863,(o+=24)>=26&&(o-=26,c++);return this._strip()},c.prototype._parseHex=function(e,t,a){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)n=i(e,t,r)<=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(c-=18,d+=1,this.words[d]|=n>>>26):c+=8;this._strip()},c.prototype._parseBase=function(e,t,a){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var c=e.length-a,d=c%r,o=Math.min(c,c-d)+a,i=0,s=a;s1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch(N){c.prototype.inspect=b}else c.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];c.prototype.toString=function(e,t){var a;if(t=0|t||1,16===(e=e||10)||"hex"===e){a="";for(var n=0,c=0,d=0;d>>24-n&16777215,(n+=2)>=26&&(n-=26,d--),a=0!==c||d!==this.length-1?l[6-i.length]+i+a:i+a}for(0!==c&&(a=c.toString(16)+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}if(e===(0|e)&&e>=2&&e<=36){var f=u[e],s=h[e];a="";var b=this.clone();for(b.negative=0;!b.isZero();){var p=b.modrn(s).toString(e);a=(b=b.idivn(s)).isZero()?p+a:l[f-p.length]+p+a}for(this.isZero()&&(a="0"+a);a.length%t!==0;)a="0"+a;return 0!==this.negative&&(a="-"+a),a}r(!1,"Base should be between 2 and 36")},c.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},c.prototype.toJSON=function(){return this.toString(16,2)},d&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(d,e,t)}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function p(e,t,a){a.negative=t.negative^e.negative;var r=e.length+t.length|0;a.length=r,r=r-1|0;var n=0|e.words[0],c=0|t.words[0],d=n*c,o=67108863&d,i=d/67108864|0;a.words[0]=o;for(var f=1;f>>26,b=67108863&i,l=Math.min(f,t.length-1),u=Math.max(0,f-e.length+1);u<=l;u++){var h=f-u|0;s+=(d=(n=0|e.words[h])*(c=0|t.words[u])+b)/67108864|0,b=67108863&d}a.words[f]=0|b,i=0|s}return 0!==i?a.words[f]=0|i:a.length--,a._strip()}c.prototype.toArrayLike=function(e,t,a){this._strip();var n=this.byteLength(),c=a||Math.max(1,n);r(n<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0");var d=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](d,n),d},c.prototype._toArrayLikeLE=function(e,t){for(var a=0,r=0,n=0,c=0;n>8&255),a>16&255),6===c?(a>24&255),r=0,c=0):(r=d>>>24,c+=2)}if(a=0&&(e[a--]=d>>8&255),a>=0&&(e[a--]=d>>16&255),6===c?(a>=0&&(e[a--]=d>>24&255),r=0,c=0):(r=d>>>24,c+=2)}if(a>=0)for(e[a--]=r;a>=0;)e[a--]=0},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,a=0;return t>=4096&&(a+=13,t>>>=13),t>=64&&(a+=7,t>>>=7),t>=8&&(a+=4,t>>>=4),t>=2&&(a+=2,t>>>=2),a+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,a=0;return 0===(8191&t)&&(a+=13,t>>>=13),0===(127&t)&&(a+=7,t>>>=7),0===(15&t)&&(a+=4,t>>>=4),0===(3&t)&&(a+=2,t>>>=2),0===(1&t)&&a++,a},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var a=0;ae.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var t,a;this.length>e.length?(t=this,a=e):(t=e,a=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),a=e%26;this._expand(t),a>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-a),this._strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var a=e/26|0,n=e%26;return this._expand(a+1),this.words[a]=t?this.words[a]|1<e.length?(a=this,r=e):(a=e,r=this);for(var n=0,c=0;c>>26;for(;0!==n&&c>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;ce.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,r=e):(a=e,r=this);for(var c=0,d=0;d>26,this.words[d]=67108863&t;for(;0!==c&&d>26,this.words[d]=67108863&t;if(0===c&&d>>13,u=0|d[1],h=8191&u,p=u>>>13,x=0|d[2],m=8191&x,g=x>>>13,v=0|d[3],y=8191&v,w=v>>>13,k=0|d[4],I=8191&k,_=k>>>13,A=0|d[5],E=8191&A,S=A>>>13,N=0|d[6],M=8191&N,H=N>>>13,T=0|d[7],P=8191&T,R=T>>>13,C=0|d[8],O=8191&C,D=C>>>13,B=0|d[9],L=8191&B,j=B>>>13,U=0|o[0],F=8191&U,z=U>>>13,q=0|o[1],W=8191&q,V=q>>>13,K=0|o[2],G=8191&K,Y=K>>>13,J=0|o[3],X=8191&J,Z=J>>>13,Q=0|o[4],$=8191&Q,ee=Q>>>13,te=0|o[5],ae=8191&te,re=te>>>13,ne=0|o[6],ce=8191&ne,de=ne>>>13,oe=0|o[7],ie=8191&oe,fe=oe>>>13,se=0|o[8],be=8191&se,le=se>>>13,ue=0|o[9],he=8191&ue,pe=ue>>>13;a.negative=e.negative^t.negative,a.length=19;var xe=(f+(r=Math.imul(b,F))|0)+((8191&(n=(n=Math.imul(b,z))+Math.imul(l,F)|0))<<13)|0;f=((c=Math.imul(l,z))+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(h,F),n=(n=Math.imul(h,z))+Math.imul(p,F)|0,c=Math.imul(p,z);var me=(f+(r=r+Math.imul(b,W)|0)|0)+((8191&(n=(n=n+Math.imul(b,V)|0)+Math.imul(l,W)|0))<<13)|0;f=((c=c+Math.imul(l,V)|0)+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),n=(n=Math.imul(m,z))+Math.imul(g,F)|0,c=Math.imul(g,z),r=r+Math.imul(h,W)|0,n=(n=n+Math.imul(h,V)|0)+Math.imul(p,W)|0,c=c+Math.imul(p,V)|0;var ge=(f+(r=r+Math.imul(b,G)|0)|0)+((8191&(n=(n=n+Math.imul(b,Y)|0)+Math.imul(l,G)|0))<<13)|0;f=((c=c+Math.imul(l,Y)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(w,F)|0,c=Math.imul(w,z),r=r+Math.imul(m,W)|0,n=(n=n+Math.imul(m,V)|0)+Math.imul(g,W)|0,c=c+Math.imul(g,V)|0,r=r+Math.imul(h,G)|0,n=(n=n+Math.imul(h,Y)|0)+Math.imul(p,G)|0,c=c+Math.imul(p,Y)|0;var ve=(f+(r=r+Math.imul(b,X)|0)|0)+((8191&(n=(n=n+Math.imul(b,Z)|0)+Math.imul(l,X)|0))<<13)|0;f=((c=c+Math.imul(l,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(_,F)|0,c=Math.imul(_,z),r=r+Math.imul(y,W)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(w,W)|0,c=c+Math.imul(w,V)|0,r=r+Math.imul(m,G)|0,n=(n=n+Math.imul(m,Y)|0)+Math.imul(g,G)|0,c=c+Math.imul(g,Y)|0,r=r+Math.imul(h,X)|0,n=(n=n+Math.imul(h,Z)|0)+Math.imul(p,X)|0,c=c+Math.imul(p,Z)|0;var ye=(f+(r=r+Math.imul(b,$)|0)|0)+((8191&(n=(n=n+Math.imul(b,ee)|0)+Math.imul(l,$)|0))<<13)|0;f=((c=c+Math.imul(l,ee)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),n=(n=Math.imul(E,z))+Math.imul(S,F)|0,c=Math.imul(S,z),r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(_,W)|0,c=c+Math.imul(_,V)|0,r=r+Math.imul(y,G)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(w,G)|0,c=c+Math.imul(w,Y)|0,r=r+Math.imul(m,X)|0,n=(n=n+Math.imul(m,Z)|0)+Math.imul(g,X)|0,c=c+Math.imul(g,Z)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(p,$)|0,c=c+Math.imul(p,ee)|0;var we=(f+(r=r+Math.imul(b,ae)|0)|0)+((8191&(n=(n=n+Math.imul(b,re)|0)+Math.imul(l,ae)|0))<<13)|0;f=((c=c+Math.imul(l,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,F),n=(n=Math.imul(M,z))+Math.imul(H,F)|0,c=Math.imul(H,z),r=r+Math.imul(E,W)|0,n=(n=n+Math.imul(E,V)|0)+Math.imul(S,W)|0,c=c+Math.imul(S,V)|0,r=r+Math.imul(I,G)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(_,G)|0,c=c+Math.imul(_,Y)|0,r=r+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(w,X)|0,c=c+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,n=(n=n+Math.imul(m,ee)|0)+Math.imul(g,$)|0,c=c+Math.imul(g,ee)|0,r=r+Math.imul(h,ae)|0,n=(n=n+Math.imul(h,re)|0)+Math.imul(p,ae)|0,c=c+Math.imul(p,re)|0;var ke=(f+(r=r+Math.imul(b,ce)|0)|0)+((8191&(n=(n=n+Math.imul(b,de)|0)+Math.imul(l,ce)|0))<<13)|0;f=((c=c+Math.imul(l,de)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(R,F)|0,c=Math.imul(R,z),r=r+Math.imul(M,W)|0,n=(n=n+Math.imul(M,V)|0)+Math.imul(H,W)|0,c=c+Math.imul(H,V)|0,r=r+Math.imul(E,G)|0,n=(n=n+Math.imul(E,Y)|0)+Math.imul(S,G)|0,c=c+Math.imul(S,Y)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(_,X)|0,c=c+Math.imul(_,Z)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0,r=r+Math.imul(m,ae)|0,n=(n=n+Math.imul(m,re)|0)+Math.imul(g,ae)|0,c=c+Math.imul(g,re)|0,r=r+Math.imul(h,ce)|0,n=(n=n+Math.imul(h,de)|0)+Math.imul(p,ce)|0,c=c+Math.imul(p,de)|0;var Ie=(f+(r=r+Math.imul(b,ie)|0)|0)+((8191&(n=(n=n+Math.imul(b,fe)|0)+Math.imul(l,ie)|0))<<13)|0;f=((c=c+Math.imul(l,fe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(O,F),n=(n=Math.imul(O,z))+Math.imul(D,F)|0,c=Math.imul(D,z),r=r+Math.imul(P,W)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(R,W)|0,c=c+Math.imul(R,V)|0,r=r+Math.imul(M,G)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(H,G)|0,c=c+Math.imul(H,Y)|0,r=r+Math.imul(E,X)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(S,X)|0,c=c+Math.imul(S,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,r=r+Math.imul(y,ae)|0,n=(n=n+Math.imul(y,re)|0)+Math.imul(w,ae)|0,c=c+Math.imul(w,re)|0,r=r+Math.imul(m,ce)|0,n=(n=n+Math.imul(m,de)|0)+Math.imul(g,ce)|0,c=c+Math.imul(g,de)|0,r=r+Math.imul(h,ie)|0,n=(n=n+Math.imul(h,fe)|0)+Math.imul(p,ie)|0,c=c+Math.imul(p,fe)|0;var _e=(f+(r=r+Math.imul(b,be)|0)|0)+((8191&(n=(n=n+Math.imul(b,le)|0)+Math.imul(l,be)|0))<<13)|0;f=((c=c+Math.imul(l,le)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,F),n=(n=Math.imul(L,z))+Math.imul(j,F)|0,c=Math.imul(j,z),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,V)|0)+Math.imul(D,W)|0,c=c+Math.imul(D,V)|0,r=r+Math.imul(P,G)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(R,G)|0,c=c+Math.imul(R,Y)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(H,X)|0,c=c+Math.imul(H,Z)|0,r=r+Math.imul(E,$)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(S,$)|0,c=c+Math.imul(S,ee)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(_,ae)|0,c=c+Math.imul(_,re)|0,r=r+Math.imul(y,ce)|0,n=(n=n+Math.imul(y,de)|0)+Math.imul(w,ce)|0,c=c+Math.imul(w,de)|0,r=r+Math.imul(m,ie)|0,n=(n=n+Math.imul(m,fe)|0)+Math.imul(g,ie)|0,c=c+Math.imul(g,fe)|0,r=r+Math.imul(h,be)|0,n=(n=n+Math.imul(h,le)|0)+Math.imul(p,be)|0,c=c+Math.imul(p,le)|0;var Ae=(f+(r=r+Math.imul(b,he)|0)|0)+((8191&(n=(n=n+Math.imul(b,pe)|0)+Math.imul(l,he)|0))<<13)|0;f=((c=c+Math.imul(l,pe)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,W),n=(n=Math.imul(L,V))+Math.imul(j,W)|0,c=Math.imul(j,V),r=r+Math.imul(O,G)|0,n=(n=n+Math.imul(O,Y)|0)+Math.imul(D,G)|0,c=c+Math.imul(D,Y)|0,r=r+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(R,X)|0,c=c+Math.imul(R,Z)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,ee)|0)+Math.imul(H,$)|0,c=c+Math.imul(H,ee)|0,r=r+Math.imul(E,ae)|0,n=(n=n+Math.imul(E,re)|0)+Math.imul(S,ae)|0,c=c+Math.imul(S,re)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,de)|0)+Math.imul(_,ce)|0,c=c+Math.imul(_,de)|0,r=r+Math.imul(y,ie)|0,n=(n=n+Math.imul(y,fe)|0)+Math.imul(w,ie)|0,c=c+Math.imul(w,fe)|0,r=r+Math.imul(m,be)|0,n=(n=n+Math.imul(m,le)|0)+Math.imul(g,be)|0,c=c+Math.imul(g,le)|0;var Ee=(f+(r=r+Math.imul(h,he)|0)|0)+((8191&(n=(n=n+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;f=((c=c+Math.imul(p,pe)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,G),n=(n=Math.imul(L,Y))+Math.imul(j,G)|0,c=Math.imul(j,Y),r=r+Math.imul(O,X)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(D,X)|0,c=c+Math.imul(D,Z)|0,r=r+Math.imul(P,$)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(R,$)|0,c=c+Math.imul(R,ee)|0,r=r+Math.imul(M,ae)|0,n=(n=n+Math.imul(M,re)|0)+Math.imul(H,ae)|0,c=c+Math.imul(H,re)|0,r=r+Math.imul(E,ce)|0,n=(n=n+Math.imul(E,de)|0)+Math.imul(S,ce)|0,c=c+Math.imul(S,de)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(_,ie)|0,c=c+Math.imul(_,fe)|0,r=r+Math.imul(y,be)|0,n=(n=n+Math.imul(y,le)|0)+Math.imul(w,be)|0,c=c+Math.imul(w,le)|0;var Se=(f+(r=r+Math.imul(m,he)|0)|0)+((8191&(n=(n=n+Math.imul(m,pe)|0)+Math.imul(g,he)|0))<<13)|0;f=((c=c+Math.imul(g,pe)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,X),n=(n=Math.imul(L,Z))+Math.imul(j,X)|0,c=Math.imul(j,Z),r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,r=r+Math.imul(P,ae)|0,n=(n=n+Math.imul(P,re)|0)+Math.imul(R,ae)|0,c=c+Math.imul(R,re)|0,r=r+Math.imul(M,ce)|0,n=(n=n+Math.imul(M,de)|0)+Math.imul(H,ce)|0,c=c+Math.imul(H,de)|0,r=r+Math.imul(E,ie)|0,n=(n=n+Math.imul(E,fe)|0)+Math.imul(S,ie)|0,c=c+Math.imul(S,fe)|0,r=r+Math.imul(I,be)|0,n=(n=n+Math.imul(I,le)|0)+Math.imul(_,be)|0,c=c+Math.imul(_,le)|0;var Ne=(f+(r=r+Math.imul(y,he)|0)|0)+((8191&(n=(n=n+Math.imul(y,pe)|0)+Math.imul(w,he)|0))<<13)|0;f=((c=c+Math.imul(w,pe)|0)+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,$),n=(n=Math.imul(L,ee))+Math.imul(j,$)|0,c=Math.imul(j,ee),r=r+Math.imul(O,ae)|0,n=(n=n+Math.imul(O,re)|0)+Math.imul(D,ae)|0,c=c+Math.imul(D,re)|0,r=r+Math.imul(P,ce)|0,n=(n=n+Math.imul(P,de)|0)+Math.imul(R,ce)|0,c=c+Math.imul(R,de)|0,r=r+Math.imul(M,ie)|0,n=(n=n+Math.imul(M,fe)|0)+Math.imul(H,ie)|0,c=c+Math.imul(H,fe)|0,r=r+Math.imul(E,be)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(S,be)|0,c=c+Math.imul(S,le)|0;var Me=(f+(r=r+Math.imul(I,he)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(_,he)|0))<<13)|0;f=((c=c+Math.imul(_,pe)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ae),n=(n=Math.imul(L,re))+Math.imul(j,ae)|0,c=Math.imul(j,re),r=r+Math.imul(O,ce)|0,n=(n=n+Math.imul(O,de)|0)+Math.imul(D,ce)|0,c=c+Math.imul(D,de)|0,r=r+Math.imul(P,ie)|0,n=(n=n+Math.imul(P,fe)|0)+Math.imul(R,ie)|0,c=c+Math.imul(R,fe)|0,r=r+Math.imul(M,be)|0,n=(n=n+Math.imul(M,le)|0)+Math.imul(H,be)|0,c=c+Math.imul(H,le)|0;var He=(f+(r=r+Math.imul(E,he)|0)|0)+((8191&(n=(n=n+Math.imul(E,pe)|0)+Math.imul(S,he)|0))<<13)|0;f=((c=c+Math.imul(S,pe)|0)+(n>>>13)|0)+(He>>>26)|0,He&=67108863,r=Math.imul(L,ce),n=(n=Math.imul(L,de))+Math.imul(j,ce)|0,c=Math.imul(j,de),r=r+Math.imul(O,ie)|0,n=(n=n+Math.imul(O,fe)|0)+Math.imul(D,ie)|0,c=c+Math.imul(D,fe)|0,r=r+Math.imul(P,be)|0,n=(n=n+Math.imul(P,le)|0)+Math.imul(R,be)|0,c=c+Math.imul(R,le)|0;var Te=(f+(r=r+Math.imul(M,he)|0)|0)+((8191&(n=(n=n+Math.imul(M,pe)|0)+Math.imul(H,he)|0))<<13)|0;f=((c=c+Math.imul(H,pe)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,ie),n=(n=Math.imul(L,fe))+Math.imul(j,ie)|0,c=Math.imul(j,fe),r=r+Math.imul(O,be)|0,n=(n=n+Math.imul(O,le)|0)+Math.imul(D,be)|0,c=c+Math.imul(D,le)|0;var Pe=(f+(r=r+Math.imul(P,he)|0)|0)+((8191&(n=(n=n+Math.imul(P,pe)|0)+Math.imul(R,he)|0))<<13)|0;f=((c=c+Math.imul(R,pe)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,be),n=(n=Math.imul(L,le))+Math.imul(j,be)|0,c=Math.imul(j,le);var Re=(f+(r=r+Math.imul(O,he)|0)|0)+((8191&(n=(n=n+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;f=((c=c+Math.imul(D,pe)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(f+(r=Math.imul(L,he))|0)+((8191&(n=(n=Math.imul(L,pe))+Math.imul(j,he)|0))<<13)|0;return f=((c=Math.imul(j,pe))+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i[0]=xe,i[1]=me,i[2]=ge,i[3]=ve,i[4]=ye,i[5]=we,i[6]=ke,i[7]=Ie,i[8]=_e,i[9]=Ae,i[10]=Ee,i[11]=Se,i[12]=Ne,i[13]=Me,i[14]=He,i[15]=Te,i[16]=Pe,i[17]=Re,i[18]=Ce,0!==f&&(i[19]=f,a.length++),a};function m(e,t,a){a.negative=t.negative^e.negative,a.length=e.length+t.length;for(var r=0,n=0,c=0;c>>26)|0)>>>26,d&=67108863}a.words[c]=o,r=d,d=n}return 0!==r?a.words[c]=r:a.length--,a._strip()}function g(e,t,a){return m(e,t,a)}function v(e,t){this.x=e,this.y=t}Math.imul||(x=p),c.prototype.mulTo=function(e,t){var a=this.length+e.length;return 10===this.length&&10===e.length?x(this,e,t):a<63?p(this,e,t):a<1024?m(this,e,t):g(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),a=c.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,a,r,n,c){for(var d=0;d>>=1)n++;return 1<>>=13,a[2*d+1]=8191&c,c>>>=13;for(d=2*t;d>=26,a+=c/67108864|0,a+=d>>>26,this.words[n]=67108863&d}return 0!==a&&(this.words[n]=a,this.length++),t?this.ineg():this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),a=0;a>>n&1}return t}(e);if(0===t.length)return new c(1);for(var a=this,r=0;r=0);var t,a=e%26,n=(e-a)/26,c=67108863>>>26-a<<26-a;if(0!==a){var d=0;for(t=0;t>>26-a}d&&(this.words[t]=d,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0),n=t?(t-t%26)/26:0;var c=e%26,d=Math.min((e-c)/26,this.length),o=67108863^67108863>>>c<d)for(this.length-=d,f=0;f=0&&(0!==s||f>=n);f--){var b=0|this.words[f];this.words[f]=s<<26-c|b>>>c,s=b&o}return i&&0!==s&&(i.words[i.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(e,t,a){return r(0===this.negative),this.iushrn(e,t,a)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,a=(e-t)/26,n=1<=0);var t=e%26,a=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=a)return this;if(0!==t&&a++,this.length=Math.min(a,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},c.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 t=0;t>26)-(i/67108864|0),this.words[n+a]=67108863&c}for(;n>26,this.words[n+a]=67108863&c;if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n>26,this.words[n]=67108863&c;return this.negative=1,this._strip()},c.prototype._wordDiv=function(e,t){var a=(this.length,e.length),r=this.clone(),n=e,d=0|n.words[n.length-1];0!==(a=26-this._countBits(d))&&(n=n.ushln(a),r.iushln(a),d=0|n.words[n.length-1]);var o,i=r.length-n.length;if("mod"!==t){(o=new c(null)).length=i+1,o.words=new Array(o.length);for(var f=0;f=0;b--){var l=67108864*(0|r.words[n.length+b])+(0|r.words[n.length+b-1]);for(l=Math.min(l/d|0,67108863),r._ishlnsubmul(n,l,b);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,b),r.isZero()||(r.negative^=1);o&&(o.words[b]=l)}return o&&o._strip(),r._strip(),"div"!==t&&0!==a&&r.iushrn(a),{div:o||null,mod:r}},c.prototype.divmod=function(e,t,a){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(n=o.div.neg()),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.iadd(e)),{div:n,mod:d}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(n=o.div.neg()),{div:n,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(d=o.mod.neg(),a&&0!==d.negative&&d.isub(e)),{div:o.div,mod:d}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,d,o},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var a=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),c=a.cmp(r);return c<0||1===n&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var a=(1<<26)%e,n=0,c=this.length-1;c>=0;c--)n=(a*n+(0|this.words[c]))%e;return t?-n:n},c.prototype.modn=function(e){return this.modrn(e)},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var a=0,n=this.length-1;n>=0;n--){var c=(0|this.words[n])+67108864*a;this.words[n]=c/e|0,a=c%e}return this._strip(),t?this.ineg():this},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new c(1),d=new c(0),o=new c(0),i=new c(1),f=0;t.isEven()&&a.isEven();)t.iushrn(1),a.iushrn(1),++f;for(var s=a.clone(),b=t.clone();!t.isZero();){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||d.isOdd())&&(n.iadd(s),d.isub(b)),n.iushrn(1),d.iushrn(1);for(var h=0,p=1;0===(a.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(a.iushrn(h);h-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(s),i.isub(b)),o.iushrn(1),i.iushrn(1);t.cmp(a)>=0?(t.isub(a),n.isub(o),d.isub(i)):(a.isub(t),o.isub(n),i.isub(d))}return{a:o,b:i,gcd:a.iushln(f)}},c.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,a=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,d=new c(1),o=new c(0),i=a.clone();t.cmpn(1)>0&&a.cmpn(1)>0;){for(var f=0,s=1;0===(t.words[0]&s)&&f<26;++f,s<<=1);if(f>0)for(t.iushrn(f);f-- >0;)d.isOdd()&&d.iadd(i),d.iushrn(1);for(var b=0,l=1;0===(a.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(a.iushrn(b);b-- >0;)o.isOdd()&&o.iadd(i),o.iushrn(1);t.cmp(a)>=0?(t.isub(a),d.isub(o)):(a.isub(t),o.isub(d))}return(n=0===t.cmpn(1)?d:o).cmpn(0)<0&&n.iadd(e),n},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),a=e.clone();t.negative=0,a.negative=0;for(var r=0;t.isEven()&&a.isEven();r++)t.iushrn(1),a.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;a.isEven();)a.iushrn(1);var n=t.cmp(a);if(n<0){var c=t;t=a,a=c}else if(0===n||0===a.cmpn(1))break;t.isub(a)}return a.iushln(r)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0===(1&this.words[0])},c.prototype.isOdd=function(){return 1===(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,a=(e-t)/26,n=1<>>26,o&=67108863,this.words[d]=o}return 0!==c&&(this.words[d]=c,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,a=e<0;if(0!==this.negative&&!a)return-1;if(0===this.negative&&a)return 1;if(this._strip(),this.length>1)t=1;else{a&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;a--){var r=0|this.words[a],n=0|e.words[a];if(r!==n){rn&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new E(e)},c.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)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.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 w(e,t){this.name=e,this.p=new c(t,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function I(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,a=e;do{this.split(a,this.tmp),t=(a=(a=this.imulK(a)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?a.isub(this.p):void 0!==a.strip?a.strip():a._strip(),a},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},n(k,w),k.prototype.split=function(e,t){for(var a=4194303,r=Math.min(e.length,9),n=0;n>>22,c=d}c>>>=22,e.words[n-10]=c,0===c&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,a=0;a>>=26,e.words[a]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new I;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return y[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var a=e.add(t);return a.cmp(this.m)>=0&&a.isub(this.m),a._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var a=e.iadd(t);return a.cmp(this.m)>=0&&a.isub(this.m),a},E.prototype.sub=function(e,t){this._verify2(e,t);var a=e.sub(t);return a.cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var a=e.isub(t);return a.cmpn(0)<0&&a.iadd(this.m),a},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var a=this.m.add(new c(1)).iushrn(2);return this.pow(e,a)}for(var n=this.m.subn(1),d=0;!n.isZero()&&0===n.andln(1);)d++,n.iushrn(1);r(!n.isZero());var o=new c(1).toRed(this),i=o.redNeg(),f=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new c(2*s*s).toRed(this);0!==this.pow(s,f).cmp(i);)s.redIAdd(i);for(var b=this.pow(s,n),l=this.pow(e,n.addn(1).iushrn(1)),u=this.pow(e,n),h=d;0!==u.cmp(o);){for(var p=u,x=0;0!==p.cmp(o);x++)p=p.redSqr();r(x=0;r--){for(var f=t.words[r],s=i-1;s>=0;s--){var b=f>>s&1;n!==a[0]&&(n=this.sqr(n)),0!==b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(n=this.mul(n,a[d]),o=0,d=0)):o=0}i=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new S(e)},n(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var a=e.imul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),c=n;return n.cmp(this.m)>=0?c=n.isub(this.m):n.cmpn(0)<0&&(c=n.iadd(this.m)),c._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new c(0)._forceRed(this);var a=e.mul(t),r=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=a.isub(r).iushrn(this.shift),d=n;return n.cmp(this.m)>=0?d=n.isub(this.m):n.cmpn(0)<0&&(d=n.iadd(this.m)),d._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=a.nmd(e),this)},58586:(e,t,a)=>{var r=a(26382).Buffer;e.exports=function(e,t){for(var a=Math.min(e.length,t.length),n=new r(a),c=0;c{"use strict";const r=a(34445),n=a(6900),c="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=i,t.SlowBuffer=function(e){+e!=e&&(e=0);return i.alloc(+e)},t.INSPECT_MAX_BYTES=50;const d=2147483647;function o(e){if(e>d)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,i.prototype),t}function i(e,t,a){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return b(e)}return f(e,t,a)}function f(e,t,a){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const a=0|p(e,t);let r=o(a);const n=r.write(e,t);n!==a&&(r=r.slice(0,n));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return u(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return u(e,t,a);if("undefined"!==typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return u(e,t,a);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return i.from(r,t,a);const n=function(e){if(i.isBuffer(e)){const t=0|h(e.length),a=o(t);return 0===a.length||e.copy(a,0,0,t),a}if(void 0!==e.length)return"number"!==typeof e.length||X(e.length)?o(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(n)return n;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),t,a);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function b(e){return s(e),o(e<0?0:0|h(e))}function l(e){const t=e.length<0?0:0|h(e.length),a=o(t);for(let r=0;r=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|e}function p(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const a=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===a)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*a;case"hex":return a>>>1;case"base64":return G(e).length;default:if(n)return r?-1:K(e).length;t=(""+t).toLowerCase(),n=!0}}function x(e,t,a){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===a||a>this.length)&&(a=this.length),a<=0)return"";if((a>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return H(this,t,a);case"utf8":case"utf-8":return E(this,t,a);case"ascii":return N(this,t,a);case"latin1":case"binary":return M(this,t,a);case"base64":return A(this,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,a);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,a){const r=e[t];e[t]=e[a],e[a]=r}function g(e,t,a,r,n){if(0===e.length)return-1;if("string"===typeof a?(r=a,a=0):a>2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),X(a=+a)&&(a=n?0:e.length-1),a<0&&(a=e.length+a),a>=e.length){if(n)return-1;a=e.length-1}else if(a<0){if(!n)return-1;a=0}if("string"===typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:v(e,t,a,r,n);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,a):Uint8Array.prototype.lastIndexOf.call(e,t,a):v(e,[t],a,r,n);throw new TypeError("val must be string, number or Buffer")}function v(e,t,a,r,n){let c,d=1,o=e.length,i=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;d=2,o/=2,i/=2,a/=2}function f(e,t){return 1===d?e[t]:e.readUInt16BE(t*d)}if(n){let r=-1;for(c=a;co&&(a=o-i),c=a;c>=0;c--){let a=!0;for(let r=0;rn&&(r=n):r=n;const c=t.length;let d;for(r>c/2&&(r=c/2),d=0;d>8,n=a%256,c.push(n),c.push(r);return c}(t,e.length-a),e,a,r)}function A(e,t,a){return 0===t&&a===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,a))}function E(e,t,a){a=Math.min(e.length,a);const r=[];let n=t;for(;n239?4:t>223?3:t>191?2:1;if(n+d<=a){let a,r,o,i;switch(d){case 1:t<128&&(c=t);break;case 2:a=e[n+1],128===(192&a)&&(i=(31&t)<<6|63&a,i>127&&(c=i));break;case 3:a=e[n+1],r=e[n+2],128===(192&a)&&128===(192&r)&&(i=(15&t)<<12|(63&a)<<6|63&r,i>2047&&(i<55296||i>57343)&&(c=i));break;case 4:a=e[n+1],r=e[n+2],o=e[n+3],128===(192&a)&&128===(192&r)&&128===(192&o)&&(i=(15&t)<<18|(63&a)<<12|(63&r)<<6|63&o,i>65535&&i<1114112&&(c=i))}}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),n+=d}return function(e){const t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);let a="",r=0;for(;rr.length?(i.isBuffer(t)||(t=i.from(t)),t.copy(r,n)):Uint8Array.prototype.set.call(r,t,n);else{if(!i.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,n)}n+=t.length}return r},i.byteLength=p,i.prototype._isBuffer=!0,i.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;ta&&(e+=" ... "),""},c&&(i.prototype[c]=i.prototype.inspect),i.prototype.compare=function(e,t,a,r,n){if(J(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===a&&(a=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||a>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=a)return 0;if(r>=n)return-1;if(t>=a)return 1;if(this===e)return 0;let c=(n>>>=0)-(r>>>=0),d=(a>>>=0)-(t>>>=0);const o=Math.min(c,d),f=this.slice(r,n),s=e.slice(t,a);for(let i=0;i>>=0,isFinite(a)?(a>>>=0,void 0===r&&(r="utf8")):(r=a,a=void 0)}const n=this.length-t;if((void 0===a||a>n)&&(a=n),e.length>0&&(a<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let c=!1;for(;;)switch(r){case"hex":return y(this,e,t,a);case"utf8":case"utf-8":return w(this,e,t,a);case"ascii":case"latin1":case"binary":return k(this,e,t,a);case"base64":return I(this,e,t,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,a);default:if(c)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),c=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function N(e,t,a){let r="";a=Math.min(e.length,a);for(let n=t;nr)&&(a=r);let n="";for(let c=t;ca)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,a,r,n,c){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}function C(e,t,a,r,n){z(t,r,n,e,a,7);let c=Number(t&BigInt(4294967295));e[a++]=c,c>>=8,e[a++]=c,c>>=8,e[a++]=c,c>>=8,e[a++]=c;let d=Number(t>>BigInt(32)&BigInt(4294967295));return e[a++]=d,d>>=8,e[a++]=d,d>>=8,e[a++]=d,d>>=8,e[a++]=d,a}function O(e,t,a,r,n){z(t,r,n,e,a,7);let c=Number(t&BigInt(4294967295));e[a+7]=c,c>>=8,e[a+6]=c,c>>=8,e[a+5]=c,c>>=8,e[a+4]=c;let d=Number(t>>BigInt(32)&BigInt(4294967295));return e[a+3]=d,d>>=8,e[a+2]=d,d>>=8,e[a+1]=d,d>>=8,e[a]=d,a+8}function D(e,t,a,r,n,c){if(a+r>e.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("Index out of range")}function B(e,t,a,r,c){return t=+t,a>>>=0,c||D(e,0,a,4),n.write(e,t,a,r,23,4),a+4}function L(e,t,a,r,c){return t=+t,a>>>=0,c||D(e,0,a,8),n.write(e,t,a,r,52,8),a+8}i.prototype.slice=function(e,t){const a=this.length;(e=~~e)<0?(e+=a)<0&&(e=0):e>a&&(e=a),(t=void 0===t?a:~~t)<0?(t+=a)<0&&(t=0):t>a&&(t=a),t>>=0,t>>>=0,a||P(e,t,this.length);let r=this[e],n=1,c=0;for(;++c>>=0,t>>>=0,a||P(e,t,this.length);let r=this[e+--t],n=1;for(;t>0&&(n*=256);)r+=this[e+--t]*n;return r},i.prototype.readUint8=i.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readBigUInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],a=this[e+7];void 0!==t&&void 0!==a||W(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,n=this[++e]+256*this[++e]+65536*this[++e]+a*2**24;return BigInt(r)+(BigInt(n)<>>=0,"offset");const t=this[e],a=this[e+7];void 0!==t&&void 0!==a||W(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],n=this[++e]*2**24+65536*this[++e]+256*this[++e]+a;return(BigInt(r)<>>=0,t>>>=0,a||P(e,t,this.length);let r=this[e],n=1,c=0;for(;++c=n&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,a){e>>>=0,t>>>=0,a||P(e,t,this.length);let r=t,n=1,c=this[e+--r];for(;r>0&&(n*=256);)c+=this[e+--r]*n;return n*=128,c>=n&&(c-=Math.pow(2,8*t)),c},i.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const a=this[e]|this[e+1]<<8;return 32768&a?4294901760|a:a},i.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const a=this[e+1]|this[e]<<8;return 32768&a?4294901760|a:a},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readBigInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],a=this[e+7];void 0!==t&&void 0!==a||W(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(a<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],a=this[e+7];void 0!==t&&void 0!==a||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||P(e,4,this.length),n.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,t,a,r){if(e=+e,t>>>=0,a>>>=0,!r){R(this,e,t,a,Math.pow(2,8*a)-1,0)}let n=1,c=0;for(this[t]=255&e;++c>>=0,a>>>=0,!r){R(this,e,t,a,Math.pow(2,8*a)-1,0)}let n=a-1,c=1;for(this[t+n]=255&e;--n>=0&&(c*=256);)this[t+n]=e/c&255;return t+a},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeBigUInt64LE=Q((function(e){return C(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),i.prototype.writeBigUInt64BE=Q((function(e){return O(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),i.prototype.writeIntLE=function(e,t,a,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*a-1);R(this,e,t,a,r-1,-r)}let n=0,c=1,d=0;for(this[t]=255&e;++n>>=0,!r){const r=Math.pow(2,8*a-1);R(this,e,t,a,r-1,-r)}let n=a-1,c=1,d=0;for(this[t+n]=255&e;--n>=0&&(c*=256);)e<0&&0===d&&0!==this[t+n+1]&&(d=1),this[t+n]=(e/c|0)-d&255;return t+a},i.prototype.writeInt8=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,a){return e=+e,t>>>=0,a||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeBigInt64LE=Q((function(e){return C(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),i.prototype.writeBigInt64BE=Q((function(e){return O(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),i.prototype.writeFloatLE=function(e,t,a){return B(this,e,t,!0,a)},i.prototype.writeFloatBE=function(e,t,a){return B(this,e,t,!1,a)},i.prototype.writeDoubleLE=function(e,t,a){return L(this,e,t,!0,a)},i.prototype.writeDoubleBE=function(e,t,a){return L(this,e,t,!1,a)},i.prototype.copy=function(e,t,a,r){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(a||(a=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,a=void 0===a?this.length:a>>>0,e||(e=0),"number"===typeof e)for(n=t;n=r+4;a-=3)t="_".concat(e.slice(a-3,a)).concat(t);return"".concat(e.slice(0,a)).concat(t)}function z(e,t,a,r,n,c){if(e>a||e3?0===t||t===BigInt(0)?">= 0".concat(r," and < 2").concat(r," ** ").concat(8*(c+1)).concat(r):">= -(2".concat(r," ** ").concat(8*(c+1)-1).concat(r,") and < 2 ** ")+"".concat(8*(c+1)-1).concat(r):">= ".concat(t).concat(r," and <= ").concat(a).concat(r),new j.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,a){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+a]||W(t,e.length-(a+1))}(r,n,c)}function q(e,t){if("number"!==typeof e)throw new j.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,a){if(Math.floor(e)!==e)throw q(e,a),new j.ERR_OUT_OF_RANGE(a||"offset","an integer",e);if(t<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(a||"offset",">= ".concat(a?1:0," and <= ").concat(t),e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,a){let r='The value of "'.concat(e,'" is out of range.'),n=a;return Number.isInteger(a)&&Math.abs(a)>2**32?n=F(String(a)):"bigint"===typeof a&&(n=String(a),(a>BigInt(2)**BigInt(32)||a<-(BigInt(2)**BigInt(32)))&&(n=F(n)),n+="n"),r+=" It must be ".concat(t,". Received ").concat(n),r}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function K(e,t){let a;t=t||1/0;const r=e.length;let n=null;const c=[];for(let d=0;d55295&&a<57344){if(!n){if(a>56319){(t-=3)>-1&&c.push(239,191,189);continue}if(d+1===r){(t-=3)>-1&&c.push(239,191,189);continue}n=a;continue}if(a<56320){(t-=3)>-1&&c.push(239,191,189),n=a;continue}a=65536+(n-55296<<10|a-56320)}else n&&(t-=3)>-1&&c.push(239,191,189);if(n=null,a<128){if((t-=1)<0)break;c.push(a)}else if(a<2048){if((t-=2)<0)break;c.push(a>>6|192,63&a|128)}else if(a<65536){if((t-=3)<0)break;c.push(a>>12|224,a>>6&63|128,63&a|128)}else{if(!(a<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;c.push(a>>18|240,a>>12&63|128,a>>6&63|128,63&a|128)}}return c}function G(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function Y(e,t,a,r){let n;for(n=0;n=t.length||n>=e.length);++n)t[n+a]=e[n];return n}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!==e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let a=0;a<16;++a){const r=16*a;for(let n=0;n<16;++n)t[r+n]=e[a]+e[n]}return t}();function Q(e){return"undefined"===typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},12028:(e,t,a)=>{"use strict";var r=a(60002),n=a(61712),c=n(r("String.prototype.indexOf"));e.exports=function(e,t){var a=r(e,!!t);return"function"===typeof a&&c(e,".prototype.")>-1?n(a):a}},61712:(e,t,a)=>{"use strict";var r=a(63864),n=a(60002),c=a(75438),d=a(54902),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),f=n("%Reflect.apply%",!0)||r.call(i,o),s=a(82090),b=n("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new d("a function is required");var t=f(r,i,arguments);return c(t,1+b(0,e.length-(arguments.length-1)),!0)};var l=function(){return f(r,o,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l},76518:function(e,t,a){e.exports=function(e){"use strict";function t(e,t){return e(t={exports:{}},t.exports),t.exports}function a(e){return e&&e.default||e}e=e&&e.hasOwnProperty("default")?e.default:e;var r={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=t((function(e){var t={};for(var a in r)r.hasOwnProperty(a)&&(t[r[a]]=a);var n=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var c in n)if(n.hasOwnProperty(c)){if(!("channels"in n[c]))throw new Error("missing channels property: "+c);if(!("labels"in n[c]))throw new Error("missing channel labels property: "+c);if(n[c].labels.length!==n[c].channels)throw new Error("channel and label counts mismatch: "+c);var d=n[c].channels,o=n[c].labels;delete n[c].channels,delete n[c].labels,Object.defineProperty(n[c],"channels",{value:d}),Object.defineProperty(n[c],"labels",{value:o})}function i(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}n.rgb.hsl=function(e){var t,a,r=e[0]/255,n=e[1]/255,c=e[2]/255,d=Math.min(r,n,c),o=Math.max(r,n,c),i=o-d;return o===d?t=0:r===o?t=(n-c)/i:n===o?t=2+(c-r)/i:c===o&&(t=4+(r-n)/i),(t=Math.min(60*t,360))<0&&(t+=360),a=(d+o)/2,[t,100*(o===d?0:a<=.5?i/(o+d):i/(2-o-d)),100*a]},n.rgb.hsv=function(e){var t,a,r,n,c,d=e[0]/255,o=e[1]/255,i=e[2]/255,f=Math.max(d,o,i),s=f-Math.min(d,o,i),b=function(e){return(f-e)/6/s+.5};return 0===s?n=c=0:(c=s/f,t=b(d),a=b(o),r=b(i),d===f?n=r-a:o===f?n=1/3+t-r:i===f&&(n=2/3+a-t),n<0?n+=1:n>1&&(n-=1)),[360*n,100*c,100*f]},n.rgb.hwb=function(e){var t=e[0],a=e[1],r=e[2];return[n.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(a,r))*100,100*(r=1-1/255*Math.max(t,Math.max(a,r)))]},n.rgb.cmyk=function(e){var t,a=e[0]/255,r=e[1]/255,n=e[2]/255;return[100*((1-a-(t=Math.min(1-a,1-r,1-n)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-n-t)/(1-t)||0),100*t]},n.rgb.keyword=function(e){var a=t[e];if(a)return a;var n,c=1/0;for(var d in r)if(r.hasOwnProperty(d)){var o=i(e,r[d]);o.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*a+.0722*r),100*(.0193*t+.1192*a+.9505*r)]},n.rgb.lab=function(e){var t=n.rgb.xyz(e),a=t[0],r=t[1],c=t[2];return r/=100,c/=108.883,a=(a/=95.047)>.008856?Math.pow(a,1/3):7.787*a+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(a-r),200*(r-(c=c>.008856?Math.pow(c,1/3):7.787*c+16/116))]},n.hsl.rgb=function(e){var t,a,r,n,c,d=e[0]/360,o=e[1]/100,i=e[2]/100;if(0===o)return[c=255*i,c,c];t=2*i-(a=i<.5?i*(1+o):i+o-i*o),n=[0,0,0];for(var f=0;f<3;f++)(r=d+1/3*-(f-1))<0&&r++,r>1&&r--,c=6*r<1?t+6*(a-t)*r:2*r<1?a:3*r<2?t+(a-t)*(2/3-r)*6:t,n[f]=255*c;return n},n.hsl.hsv=function(e){var t=e[0],a=e[1]/100,r=e[2]/100,n=a,c=Math.max(r,.01);return a*=(r*=2)<=1?r:2-r,n*=c<=1?c:2-c,[t,100*(0===r?2*n/(c+n):2*a/(r+a)),(r+a)/2*100]},n.hsv.rgb=function(e){var t=e[0]/60,a=e[1]/100,r=e[2]/100,n=Math.floor(t)%6,c=t-Math.floor(t),d=255*r*(1-a),o=255*r*(1-a*c),i=255*r*(1-a*(1-c));switch(r*=255,n){case 0:return[r,i,d];case 1:return[o,r,d];case 2:return[d,r,i];case 3:return[d,o,r];case 4:return[i,d,r];case 5:return[r,d,o]}},n.hsv.hsl=function(e){var t,a,r,n=e[0],c=e[1]/100,d=e[2]/100,o=Math.max(d,.01);return r=(2-c)*d,a=c*o,[n,100*(a=(a/=(t=(2-c)*o)<=1?t:2-t)||0),100*(r/=2)]},n.hwb.rgb=function(e){var t,a,r,n,c,d,o,i=e[0]/360,f=e[1]/100,s=e[2]/100,b=f+s;switch(b>1&&(f/=b,s/=b),r=6*i-(t=Math.floor(6*i)),0!==(1&t)&&(r=1-r),n=f+r*((a=1-s)-f),t){default:case 6:case 0:c=a,d=n,o=f;break;case 1:c=n,d=a,o=f;break;case 2:c=f,d=a,o=n;break;case 3:c=f,d=n,o=a;break;case 4:c=n,d=f,o=a;break;case 5:c=a,d=f,o=n}return[255*c,255*d,255*o]},n.cmyk.rgb=function(e){var t=e[0]/100,a=e[1]/100,r=e[2]/100,n=e[3]/100;return[255*(1-Math.min(1,t*(1-n)+n)),255*(1-Math.min(1,a*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n))]},n.xyz.rgb=function(e){var t,a,r,n=e[0]/100,c=e[1]/100,d=e[2]/100;return a=-.9689*n+1.8758*c+.0415*d,r=.0557*n+-.204*c+1.057*d,t=(t=3.2406*n+-1.5372*c+-.4986*d)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:12.92*a,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(a=Math.min(Math.max(0,a),1)),255*(r=Math.min(Math.max(0,r),1))]},n.xyz.lab=function(e){var t=e[0],a=e[1],r=e[2];return a/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(t-a),200*(a-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},n.lab.xyz=function(e){var t,a,r,n=e[0];t=e[1]/500+(a=(n+16)/116),r=a-e[2]/200;var c=Math.pow(a,3),d=Math.pow(t,3),o=Math.pow(r,3);return a=c>.008856?c:(a-16/116)/7.787,t=d>.008856?d:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,[t*=95.047,a*=100,r*=108.883]},n.lab.lch=function(e){var t,a=e[0],r=e[1],n=e[2];return(t=360*Math.atan2(n,r)/2/Math.PI)<0&&(t+=360),[a,Math.sqrt(r*r+n*n),t]},n.lch.lab=function(e){var t,a=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[a,r*Math.cos(t),r*Math.sin(t)]},n.rgb.ansi16=function(e){var t=e[0],a=e[1],r=e[2],c=1 in arguments?arguments[1]:n.rgb.hsv(e)[2];if(0===(c=Math.round(c/50)))return 30;var d=30+(Math.round(r/255)<<2|Math.round(a/255)<<1|Math.round(t/255));return 2===c&&(d+=60),d},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){var t=e[0],a=e[1],r=e[2];return t===a&&a===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(a/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var a=.5*(1+~~(e>50));return[(1&t)*a*255,(t>>1&1)*a*255,(t>>2&1)*a*255]},n.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var a;return e-=16,[Math.floor(e/36)/5*255,Math.floor((a=e%36)/6)/5*255,a%6/5*255]},n.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var a=t[0];3===t[0].length&&(a=a.split("").map((function(e){return e+e})).join(""));var r=parseInt(a,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){var t,a=e[0]/255,r=e[1]/255,n=e[2]/255,c=Math.max(Math.max(a,r),n),d=Math.min(Math.min(a,r),n),o=c-d;return t=o<=0?0:c===a?(r-n)/o%6:c===r?2+(n-a)/o:4+(a-r)/o+4,t/=6,[360*(t%=1),100*o,100*(o<1?d/(1-o):0)]},n.hsl.hcg=function(e){var t=e[1]/100,a=e[2]/100,r=1,n=0;return(r=a<.5?2*t*a:2*t*(1-a))<1&&(n=(a-.5*r)/(1-r)),[e[0],100*r,100*n]},n.hsv.hcg=function(e){var t=e[1]/100,a=e[2]/100,r=t*a,n=0;return r<1&&(n=(a-r)/(1-r)),[e[0],100*r,100*n]},n.hcg.rgb=function(e){var t=e[0]/360,a=e[1]/100,r=e[2]/100;if(0===a)return[255*r,255*r,255*r];var n=[0,0,0],c=t%1*6,d=c%1,o=1-d,i=0;switch(Math.floor(c)){case 0:n[0]=1,n[1]=d,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=d;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=d,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return i=(1-a)*r,[255*(a*n[0]+i),255*(a*n[1]+i),255*(a*n[2]+i)]},n.hcg.hsv=function(e){var t=e[1]/100,a=t+e[2]/100*(1-t),r=0;return a>0&&(r=t/a),[e[0],100*r,100*a]},n.hcg.hsl=function(e){var t=e[1]/100,a=e[2]/100*(1-t)+.5*t,r=0;return a>0&&a<.5?r=t/(2*a):a>=.5&&a<1&&(r=t/(2*(1-a))),[e[0],100*r,100*a]},n.hcg.hwb=function(e){var t=e[1]/100,a=t+e[2]/100*(1-t);return[e[0],100*(a-t),100*(1-a)]},n.hwb.hcg=function(e){var t=e[1]/100,a=1-e[2]/100,r=a-t,n=0;return r<1&&(n=(a-r)/(1-r)),[e[0],100*r,100*n]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=n.gray.hsv=function(e){return[0,0,e[0]]},n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),a=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(a.length)+a},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function c(){for(var e={},t=Object.keys(n),a=t.length,r=0;r1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function l(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var a=e(t);if("object"===typeof a)for(var r=a.length,n=0;n=0&&t<1?P(Math.round(255*t)):"")}function I(e,t){return t<1||e[3]&&e[3]<1?_(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"}function _(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function A(e,t){return t<1||e[3]&&e[3]<1?E(e,t):"rgb("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%)"}function E(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function S(e,t){return t<1||e[3]&&e[3]<1?N(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"}function N(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function M(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"}function H(e){return R[e.slice(0,3)]}function T(e,t,a){return Math.min(Math.max(t,e),a)}function P(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var R={};for(var C in h)R[h[C]]=C;var O=function(e){return e instanceof O?e:this instanceof O?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"===typeof e?(t=p.getRgba(e))?this.setValues("rgb",t):(t=p.getHsla(e))?this.setValues("hsl",t):(t=p.getHwb(e))&&this.setValues("hwb",t):"object"===typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new O(e);var t};O.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return p.hexString(this.values.rgb)},rgbString:function(){return p.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return p.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return p.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return p.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return p.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return p.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return p.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],a=0;aa?(t+.05)/(a+.05):(a+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,a=(t[0]+e)%360;return t[0]=a<0?360+a:a,this.setValues("hsl",t),this},mix:function(e,t){var a=this,r=e,n=void 0===t?.5:t,c=2*n-1,d=a.alpha()-r.alpha(),o=((c*d===-1?c:(c+d)/(1+c*d))+1)/2,i=1-o;return this.rgb(o*a.red()+i*r.red(),o*a.green()+i*r.green(),o*a.blue()+i*r.blue()).alpha(a.alpha()*n+r.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var e,t,a=new O,r=this.values,n=a.values;for(var c in r)r.hasOwnProperty(c)&&(e=r[c],"[object Array]"===(t={}.toString.call(e))?n[c]=e.slice(0):"[object Number]"===t?n[c]=e:console.error("unexpected color value:",e));return a}},O.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},O.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},O.prototype.getValues=function(e){for(var t=this.values,a={},r=0;r=0;n--)t.call(a,e[n],n);else for(n=0;n=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,a=0,r=1;return 0===e?0:1===e?1:(a||(a=.3),r<1?(r=1,t=a/4):t=a/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/a))},easeOutElastic:function(e){var t=1.70158,a=0,r=1;return 0===e?0:1===e?1:(a||(a=.3),r<1?(r=1,t=a/4):t=a/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/a)+1)},easeInOutElastic:function(e){var t=1.70158,a=0,r=1;return 0===e?0:2===(e/=.5)?1:(a||(a=.45),r<1?(r=1,t=a/4):t=a/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/a)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/a)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-U.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*U.easeInBounce(2*e):.5*U.easeOutBounce(2*e-1)+.5}},F={effects:U};j.easingEffects=U;var z=Math.PI,q=z/180,W=2*z,V=z/2,K=z/4,G=2*z/3,Y={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,a,r,n,c){if(c){var d=Math.min(c,n/2,r/2),o=t+d,i=a+d,f=t+r-d,s=a+n-d;e.moveTo(t,i),ot.left-a&&e.xt.top-a&&e.y0&&e.requestAnimationFrame()},advance:function(){for(var e,t,a,r,n=this.animations,c=0;c=a?(ce.callback(e.onAnimationComplete,[e],t),t.animating=!1,n.splice(c,1)):++c}},me=ce.options.resolve,ge=["push","pop","shift","splice","unshift"];function ve(e,t){e._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ge.forEach((function(t){var a="onData"+t.charAt(0).toUpperCase()+t.slice(1),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),n=r.apply(this,t);return ce.each(e._chartjs.listeners,(function(e){"function"===typeof e[a]&&e[a].apply(e,t)})),n}})})))}function ye(e,t){var a=e._chartjs;if(a){var r=a.listeners,n=r.indexOf(t);-1!==n&&r.splice(n,1),r.length>0||(ge.forEach((function(t){delete e[t]})),delete e._chartjs)}}var we=function(e,t){this.initialize(e,t)};ce.extend(we.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var a=this;a.chart=e,a.index=t,a.linkScales(),a.addElements(),a._type=a.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),a=e.chart,r=a.scales,n=e.getDataset(),c=a.options.scales;null!==t.xAxisID&&t.xAxisID in r&&!n.xAxisID||(t.xAxisID=n.xAxisID||c.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in r&&!n.yAxisID||(t.yAxisID=n.yAxisID||c.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ye(this._data,this)},createMetaDataset:function(){var e=this,t=e.datasetElementType;return t&&new t({_chart:e.chart,_datasetIndex:e.index})},createMetaData:function(e){var t=this,a=t.dataElementType;return a&&new a({_chart:t.chart,_datasetIndex:t.index,_index:e})},addElements:function(){var e,t,a=this,r=a.getMeta(),n=a.getDataset().data||[],c=r.data;for(e=0,t=n.length;er&&e.insertElements(r,n-r)},insertElements:function(e,t){for(var a=0;an?(c=n/t.innerRadius,e.arc(d,o,t.innerRadius-n,r+c,a-c,!0)):e.arc(d,o,n,r+Math.PI/2,a-Math.PI/2),e.closePath(),e.clip()}function Ae(e,t,a,r){var n,c=a.endAngle;for(r&&(a.endAngle=a.startAngle+Ie,_e(e,a),a.endAngle=c,a.endAngle===a.startAngle&&a.fullCircles&&(a.endAngle+=Ie,a.fullCircles--)),e.beginPath(),e.arc(a.x,a.y,a.innerRadius,a.startAngle+Ie,a.startAngle,!0),n=0;no;)n-=Ie;for(;n=d&&n<=o,f=c>=a.innerRadius&&c<=a.outerRadius;return i&&f}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,a=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*a,y:e.y+Math.sin(t)*a}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,a=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*a,y:e.y+Math.sin(t)*a}},draw:function(){var e,t=this._chart.ctx,a=this._view,r="inner"===a.borderAlign?.33:0,n={x:a.x,y:a.y,innerRadius:a.innerRadius,outerRadius:Math.max(a.outerRadius-r,0),pixelMargin:r,startAngle:a.startAngle,endAngle:a.endAngle,fullCircles:Math.floor(a.circumference/Ie)};if(t.save(),t.fillStyle=a.backgroundColor,t.strokeStyle=a.borderColor,n.fullCircles){for(n.endAngle=n.startAngle+Ie,t.beginPath(),t.arc(n.x,n.y,n.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),e=0;ee.x&&(t=je(t,"left","right")):e.basea?a:r,r:i.right||n<0?0:n>t?t:n,b:i.bottom||c<0?0:c>a?a:c,l:i.left||d<0?0:d>t?t:d}}function ze(e){var t=Le(e),a=t.right-t.left,r=t.bottom-t.top,n=Fe(e,a/2,r/2);return{outer:{x:t.left,y:t.top,w:a,h:r},inner:{x:t.left+n.l,y:t.top+n.t,w:a-n.l-n.r,h:r-n.t-n.b}}}function qe(e,t,a){var r=null===t,n=null===a,c=!(!e||r&&n)&&Le(e);return c&&(r||t>=c.left&&t<=c.right)&&(n||a>=c.top&&a<=c.bottom)}Z._set("global",{elements:{rectangle:{backgroundColor:De,borderColor:De,borderSkipped:"bottom",borderWidth:0}}});var We=ue.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,a=ze(t),r=a.outer,n=a.inner;e.fillStyle=t.backgroundColor,e.fillRect(r.x,r.y,r.w,r.h),r.w===n.w&&r.h===n.h||(e.save(),e.beginPath(),e.rect(r.x,r.y,r.w,r.h),e.clip(),e.fillStyle=t.borderColor,e.rect(n.x,n.y,n.w,n.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return qe(this._view,e,t)},inLabelRange:function(e,t){var a=this._view;return Be(a)?qe(a,e,null):qe(a,null,t)},inXRange:function(e){return qe(this._view,e,null)},inYRange:function(e){return qe(this._view,null,e)},getCenterPoint:function(){var e,t,a=this._view;return Be(a)?(e=a.x,t=(a.y+a.base)/2):(e=(a.x+a.base)/2,t=a.y),{x:e,y:t}},getArea:function(){var e=this._view;return Be(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),Ve={},Ke=Se,Ge=He,Ye=Oe,Je=We;Ve.Arc=Ke,Ve.Line=Ge,Ve.Point=Ye,Ve.Rectangle=Je;var Xe=ce._deprecated,Ze=ce.valueOrDefault;function Qe(e,t){var a,r,n,c,d=e._length;for(n=1,c=t.length;n0?Math.min(d,Math.abs(r-a)):d,a=r;return d}function $e(e,t,a){var r,n,c=a.barThickness,d=t.stackCount,o=t.pixels[e],i=ce.isNullOrUndef(c)?Qe(t.scale,t.pixels):-1;return ce.isNullOrUndef(c)?(r=i*a.categoryPercentage,n=a.barPercentage):(r=c*d,n=1),{chunk:r/d,ratio:n,start:o-r/2}}function et(e,t,a){var r,n=t.pixels,c=n[e],d=e>0?n[e-1]:null,o=e=0&&x.min>=0?x.min:x.max,w=void 0===x.start?x.end:x.max>=0&&x.min>=0?x.max-x.min:x.min-x.max,k=p.length;if(g||void 0===g&&void 0!==v)for(r=0;r=0&&f.max>=0?f.max:f.min,(x.min<0&&c<0||x.max>=0&&c>0)&&(y+=c));return d=l.getPixelForValue(y),i=(o=l.getPixelForValue(y+w))-d,void 0!==m&&Math.abs(i)=0&&!u||w<0&&u?d-m:d+m),{size:i,base:d,head:o,center:o+i/2}},calculateBarIndexPixels:function(e,t,a,r){var n=this,c="flex"===r.barThickness?et(t,a,r):$e(t,a,r),d=n.getStackIndex(e,n.getMeta().stack),o=c.start+c.chunk*d+c.chunk/2,i=Math.min(Ze(r.maxBarThickness,1/0),c.chunk*c.ratio);return{base:o-i/2,head:o+i/2,center:o,size:i}},draw:function(){var e=this,t=e.chart,a=e._getValueScale(),r=e.getMeta().data,n=e.getDataset(),c=r.length,d=0;for(ce.canvas.clipArea(t.ctx,t.chartArea);d=dt?-ot:g<-dt?ot:0)+x,y=Math.cos(g),w=Math.sin(g),k=Math.cos(v),I=Math.sin(v),_=g<=0&&v>=0||v>=ot,A=g<=it&&v>=it||v>=ot+it,E=g<=-it&&v>=-it||v>=dt+it,S=g===-dt||v>=dt?-1:Math.min(y,y*p,k,k*p),N=E?-1:Math.min(w,w*p,I,I*p),M=_?1:Math.max(y,y*p,k,k*p),H=A?1:Math.max(w,w*p,I,I*p);f=(M-S)/2,s=(H-N)/2,b=-(M+S)/2,l=-(H+N)/2}for(r=0,n=h.length;r0&&!isNaN(e)?ot*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,a,r,n,c,d,o,i,f=this,s=0,b=f.chart;if(!e)for(t=0,a=b.data.datasets.length;t(s=o>s?o:s)?i:s);return s},setHoverStyle:function(e){var t=e._model,a=e._options,r=ce.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=ct(a.hoverBackgroundColor,r(a.backgroundColor)),t.borderColor=ct(a.hoverBorderColor,r(a.borderColor)),t.borderWidth=ct(a.hoverBorderWidth,a.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,a=0;a0&&ut(f[e-1]._model,i)&&(a.controlPointPreviousX=s(a.controlPointPreviousX,i.left,i.right),a.controlPointPreviousY=s(a.controlPointPreviousY,i.top,i.bottom)),e0&&(c=e.getDatasetMeta(c[0]._datasetIndex).data),c},"x-axis":function(e,t){return Mt(e,t,{intersect:!1})},point:function(e,t){return Et(e,_t(t,e))},nearest:function(e,t,a){var r=_t(t,e);a.axis=a.axis||"xy";var n=Nt(a.axis);return St(e,r,a.intersect,n)},x:function(e,t,a){var r=_t(t,e),n=[],c=!1;return At(e,(function(e){e.inXRange(r.x)&&n.push(e),e.inRange(r.x,r.y)&&(c=!0)})),a.intersect&&!c&&(n=[]),n},y:function(e,t,a){var r=_t(t,e),n=[],c=!1;return At(e,(function(e){e.inYRange(r.y)&&n.push(e),e.inRange(r.x,r.y)&&(c=!0)})),a.intersect&&!c&&(n=[]),n}}},Tt=ce.extend;function Pt(e,t){return ce.where(e,(function(e){return e.pos===t}))}function Rt(e,t){return e.sort((function(e,a){var r=t?a:e,n=t?e:a;return r.weight===n.weight?r.index-n.index:r.weight-n.weight}))}function Ct(e){var t,a,r,n=[];for(t=0,a=(e||[]).length;t div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n",Kt=a(Object.freeze({__proto__:null,default:Vt})),Gt="$chartjs",Yt="chartjs-",Jt=Yt+"size-monitor",Xt=Yt+"render-monitor",Zt=Yt+"render-animation",Qt=["animationstart","webkitAnimationStart"],$t={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ea(e,t){var a=ce.getStyle(e,t),r=a&&a.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}function ta(e,t){var a=e.style,r=e.getAttribute("height"),n=e.getAttribute("width");if(e[Gt]={initial:{height:r,width:n,style:{display:a.display,height:a.height,width:a.width}}},a.display=a.display||"block",null===n||""===n){var c=ea(e,"width");void 0!==c&&(e.width=c)}if(null===r||""===r)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var d=ea(e,"height");void 0!==c&&(e.height=d)}return e}var aa=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(a){}return e}()&&{passive:!0};function ra(e,t,a){e.addEventListener(t,a,aa)}function na(e,t,a){e.removeEventListener(t,a,aa)}function ca(e,t,a,r,n){return{type:e,chart:t,native:n||null,x:void 0!==a?a:null,y:void 0!==r?r:null}}function da(e,t){var a=$t[e.type]||e.type,r=ce.getRelativePosition(e,t);return ca(a,t,r.x,r.y,e)}function oa(e,t){var a=!1,r=[];return function(){r=Array.prototype.slice.call(arguments),t=t||this,a||(a=!0,ce.requestAnimFrame.call(window,(function(){a=!1,e.apply(t,r)})))}}function ia(e){var t=document.createElement("div");return t.className=e||"",t}function fa(e){var t=1e6,a=ia(Jt),r=ia(Jt+"-expand"),n=ia(Jt+"-shrink");r.appendChild(ia()),n.appendChild(ia()),a.appendChild(r),a.appendChild(n),a._reset=function(){r.scrollLeft=t,r.scrollTop=t,n.scrollLeft=t,n.scrollTop=t};var c=function(){a._reset(),e()};return ra(r,"scroll",c.bind(r,"expand")),ra(n,"scroll",c.bind(n,"shrink")),a}function sa(e,t){var a=e[Gt]||(e[Gt]={}),r=a.renderProxy=function(e){e.animationName===Zt&&t()};ce.each(Qt,(function(t){ra(e,t,r)})),a.reflow=!!e.offsetParent,e.classList.add(Xt)}function ba(e){var t=e[Gt]||{},a=t.renderProxy;a&&(ce.each(Qt,(function(t){na(e,t,a)})),delete t.renderProxy),e.classList.remove(Xt)}function la(e,t,a){var r=e[Gt]||(e[Gt]={}),n=r.resizer=fa(oa((function(){if(r.resizer){var n=a.options.maintainAspectRatio&&e.parentNode,c=n?n.clientWidth:0;t(ca("resize",a)),n&&n.clientWidth0){var c=e[0];c.label?a=c.label:c.xLabel?a=c.xLabel:n>0&&c.index-1?e.split("\n"):e}function Aa(e){var t=e._xScale,a=e._yScale||e._scale,r=e._index,n=e._datasetIndex,c=e._chart.getDatasetMeta(n).controller,d=c._getIndexScale(),o=c._getValueScale();return{xLabel:t?t.getLabelForIndex(r,n):"",yLabel:a?a.getLabelForIndex(r,n):"",label:d?""+d.getLabelForIndex(r,n):"",value:o?""+o.getLabelForIndex(r,n):"",index:r,datasetIndex:n,x:e._model.x,y:e._model.y}}function Ea(e){var t=Z.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:ya(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:ya(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:ya(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:ya(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:ya(e.titleFontStyle,t.defaultFontStyle),titleFontSize:ya(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:ya(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:ya(e.footerFontStyle,t.defaultFontStyle),footerFontSize:ya(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Sa(e,t){var a=e._chart.ctx,r=2*t.yPadding,n=0,c=t.body,d=c.reduce((function(e,t){return e+t.before.length+t.lines.length+t.after.length}),0);d+=t.beforeBody.length+t.afterBody.length;var o=t.title.length,i=t.footer.length,f=t.titleFontSize,s=t.bodyFontSize,b=t.footerFontSize;r+=o*f,r+=o?(o-1)*t.titleSpacing:0,r+=o?t.titleMarginBottom:0,r+=d*s,r+=d?(d-1)*t.bodySpacing:0,r+=i?t.footerMarginTop:0,r+=i*b,r+=i?(i-1)*t.footerSpacing:0;var l=0,u=function(e){n=Math.max(n,a.measureText(e).width+l)};return a.font=ce.fontString(f,t._titleFontStyle,t._titleFontFamily),ce.each(t.title,u),a.font=ce.fontString(s,t._bodyFontStyle,t._bodyFontFamily),ce.each(t.beforeBody.concat(t.afterBody),u),l=t.displayColors?s+2:0,ce.each(c,(function(e){ce.each(e.before,u),ce.each(e.lines,u),ce.each(e.after,u)})),l=0,a.font=ce.fontString(b,t._footerFontStyle,t._footerFontFamily),ce.each(t.footer,u),{width:n+=2*t.xPadding,height:r}}function Na(e,t){var a,r,n,c,d,o=e._model,i=e._chart,f=e._chart.chartArea,s="center",b="center";o.yi.height-t.height&&(b="bottom");var l=(f.left+f.right)/2,u=(f.top+f.bottom)/2;"center"===b?(a=function(e){return e<=l},r=function(e){return e>l}):(a=function(e){return e<=t.width/2},r=function(e){return e>=i.width-t.width/2}),n=function(e){return e+t.width+o.caretSize+o.caretPadding>i.width},c=function(e){return e-t.width-o.caretSize-o.caretPadding<0},d=function(e){return e<=u?"top":"bottom"},a(o.x)?(s="left",n(o.x)&&(s="center",b=d(o.y))):r(o.x)&&(s="right",c(o.x)&&(s="center",b=d(o.y)));var h=e._options;return{xAlign:h.xAlign?h.xAlign:s,yAlign:h.yAlign?h.yAlign:b}}function Ma(e,t,a,r){var n=e.x,c=e.y,d=e.caretSize,o=e.caretPadding,i=e.cornerRadius,f=a.xAlign,s=a.yAlign,b=d+o,l=i+o;return"right"===f?n-=t.width:"center"===f&&((n-=t.width/2)+t.width>r.width&&(n=r.width-t.width),n<0&&(n=0)),"top"===s?c+=b:c-="bottom"===s?t.height+b:t.height/2,"center"===s?"left"===f?n+=b:"right"===f&&(n-=b):"left"===f?n-=l:"right"===f&&(n+=l),{x:n,y:c}}function Ha(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Ta(e){return Ia([],_a(e))}var Pa=ue.extend({initialize:function(){this._model=Ea(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options.callbacks,a=t.beforeTitle.apply(e,arguments),r=t.title.apply(e,arguments),n=t.afterTitle.apply(e,arguments),c=[];return c=Ia(c,_a(a)),c=Ia(c,_a(r)),c=Ia(c,_a(n))},getBeforeBody:function(){return Ta(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var a=this,r=a._options.callbacks,n=[];return ce.each(e,(function(e){var c={before:[],lines:[],after:[]};Ia(c.before,_a(r.beforeLabel.call(a,e,t))),Ia(c.lines,r.label.call(a,e,t)),Ia(c.after,_a(r.afterLabel.call(a,e,t))),n.push(c)})),n},getAfterBody:function(){return Ta(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,a=t.beforeFooter.apply(e,arguments),r=t.footer.apply(e,arguments),n=t.afterFooter.apply(e,arguments),c=[];return c=Ia(c,_a(a)),c=Ia(c,_a(r)),c=Ia(c,_a(n))},update:function(e){var t,a,r=this,n=r._options,c=r._model,d=r._model=Ea(n),o=r._active,i=r._data,f={xAlign:c.xAlign,yAlign:c.yAlign},s={x:c.x,y:c.y},b={width:c.width,height:c.height},l={x:c.caretX,y:c.caretY};if(o.length){d.opacity=1;var u=[],h=[];l=ka[n.position].call(r,o,r._eventPosition);var p=[];for(t=0,a=o.length;t0&&a.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var a={width:t.width,height:t.height},r={x:t.x,y:t.y},n=Math.abs(t.opacity<.001)?0:t.opacity,c=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&c&&(e.save(),e.globalAlpha=n,this.drawBackground(r,t,e,a),r.y+=t.yPadding,ce.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),ce.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t=this,a=t._options,r=!1;return t._lastActive=t._lastActive||[],"mouseout"===e.type?t._active=[]:(t._active=t._chart.getElementsAtEventForMode(e,a.mode,a),a.reverse&&t._active.reverse()),(r=!ce.arrayEquals(t._active,t._lastActive))&&(t._lastActive=t._active,(a.enabled||a.custom)&&(t._eventPosition={x:e.x,y:e.y},t.update(!0),t.pivot())),r}}),Ra=ka,Ca=Pa;Ca.positioners=Ra;var Oa=ce.valueOrDefault;function Da(){return ce.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,a,r){if("xAxes"===e||"yAxes"===e){var n,c,d,o=a[e].length;for(t[e]||(t[e]=[]),n=0;n=t[e].length&&t[e].push({}),!t[e][n].type||d.type&&d.type!==t[e][n].type?ce.merge(t[e][n],[va.getScaleDefaults(c),d]):ce.merge(t[e][n],d)}else ce._merger(e,t,a,r)}})}function Ba(){return ce.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,a,r){var n=t[e]||Object.create(null),c=a[e];"scales"===e?t[e]=Da(n,c):"scale"===e?t[e]=ce.merge(n,[va.getScaleDefaults(c.type),c]):ce._merger(e,t,a,r)}})}function La(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Ba(Z.global,Z[e.type],e.options||{}),e}function ja(e){var t=e.options;ce.each(e.scales,(function(t){qt.removeBox(e,t)})),t=Ba(Z.global,Z[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Ua(e,t,a){var r,n=function(e){return e.id===r};do{r=t+a++}while(ce.findIndex(e,n)>=0);return r}function Fa(e){return"top"===e||"bottom"===e}function za(e,t){return function(a,r){return a[e]===r[e]?a[t]-r[t]:a[e]-r[e]}}Z._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var qa=function(e,t){return this.construct(e,t),this};ce.extend(qa.prototype,{construct:function(e,t){var a=this;t=La(t);var r=ma.acquireContext(e,t),n=r&&r.canvas,c=n&&n.height,d=n&&n.width;a.id=ce.uid(),a.ctx=r,a.canvas=n,a.config=t,a.width=d,a.height=c,a.aspectRatio=c?d/c:null,a.options=t.options,a._bufferedRender=!1,a._layers=[],a.chart=a,a.controller=a,qa.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(e){a.config.data=e}}),r&&n?(a.initialize(),a.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return ga.notify(e,"beforeInit"),ce.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),ga.notify(e,"afterInit"),e},clear:function(){return ce.canvas.clear(this),this},stop:function(){return xe.cancelAnimation(this),this},resize:function(e){var t=this,a=t.options,r=t.canvas,n=a.maintainAspectRatio&&t.aspectRatio||null,c=Math.max(0,Math.floor(ce.getMaximumWidth(r))),d=Math.max(0,Math.floor(n?c/n:ce.getMaximumHeight(r)));if((t.width!==c||t.height!==d)&&(r.width=t.width=c,r.height=t.height=d,r.style.width=c+"px",r.style.height=d+"px",ce.retinaScale(t,a.devicePixelRatio),!e)){var o={width:c,height:d};ga.notify(t,"resize",[o]),a.onResize&&a.onResize(t,o),t.stop(),t.update({duration:a.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},a=e.scale;ce.each(t.xAxes,(function(e,a){e.id||(e.id=Ua(t.xAxes,"x-axis-",a))})),ce.each(t.yAxes,(function(e,a){e.id||(e.id=Ua(t.yAxes,"y-axis-",a))})),a&&(a.id=a.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,a=e.scales||{},r=[],n=Object.keys(a).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(r=r.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&r.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ce.each(r,(function(t){var r=t.options,c=r.id,d=Oa(r.type,t.dtype);Fa(r.position)!==Fa(t.dposition)&&(r.position=t.dposition),n[c]=!0;var o=null;if(c in a&&a[c].type===d)(o=a[c]).options=r,o.ctx=e.ctx,o.chart=e;else{var i=va.getScaleConstructor(d);if(!i)return;o=new i({id:c,type:d,options:r,ctx:e.ctx,chart:e}),a[o.id]=o}o.mergeTicksOptions(),t.isDefault&&(e.scale=o)})),ce.each(n,(function(e,t){e||delete a[t]})),e.scales=a,va.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,a=this,r=[],n=a.data.datasets;for(e=0,t=n.length;e=0;--a)r.drawDataset(t[a],e);ga.notify(r,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var a=this,r={meta:e,index:e.index,easingValue:t};!1!==ga.notify(a,"beforeDatasetDraw",[r])&&(e.controller.draw(t),ga.notify(a,"afterDatasetDraw",[r]))},_drawTooltip:function(e){var t=this,a=t.tooltip,r={tooltip:a,easingValue:e};!1!==ga.notify(t,"beforeTooltipDraw",[r])&&(a.draw(),ga.notify(t,"afterTooltipDraw",[r]))},getElementAtEvent:function(e){return Ht.modes.single(this,e)},getElementsAtEvent:function(e){return Ht.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return Ht.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,a){var r=Ht.modes[t];return"function"===typeof r?r(this,e,a):[]},getDatasetAtEvent:function(e){return Ht.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this,a=t.data.datasets[e];a._meta||(a._meta={});var r=a._meta[t.id];return r||(r=a._meta[t.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:a.order||0,index:e}),r},getVisibleDatasetCount:function(){for(var e=0,t=0,a=this.data.datasets.length;t=0;r--){var n=e[r];if(t(n))return n}},ce.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ce.almostEquals=function(e,t,a){return Math.abs(e-t)=e},ce.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},ce.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},ce.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},ce.toRadians=function(e){return e*(Math.PI/180)},ce.toDegrees=function(e){return e*(180/Math.PI)},ce._decimalPlaces=function(e){if(ce.isFinite(e)){for(var t=1,a=0;Math.round(e*t)/t!==e;)t*=10,a++;return a}},ce.getAngleFromPoint=function(e,t){var a=t.x-e.x,r=t.y-e.y,n=Math.sqrt(a*a+r*r),c=Math.atan2(r,a);return c<-.5*Math.PI&&(c+=2*Math.PI),{angle:c,distance:n}},ce.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},ce.aliasPixel=function(e){return e%2===0?0:.5},ce._alignPixel=function(e,t,a){var r=e.currentDevicePixelRatio,n=a/2;return Math.round((t-n)*r)/r+n},ce.splineCurve=function(e,t,a,r){var n=e.skip?t:e,c=t,d=a.skip?t:a,o=Math.sqrt(Math.pow(c.x-n.x,2)+Math.pow(c.y-n.y,2)),i=Math.sqrt(Math.pow(d.x-c.x,2)+Math.pow(d.y-c.y,2)),f=o/(o+i),s=i/(o+i),b=r*(f=isNaN(f)?0:f),l=r*(s=isNaN(s)?0:s);return{previous:{x:c.x-b*(d.x-n.x),y:c.y-b*(d.y-n.y)},next:{x:c.x+l*(d.x-n.x),y:c.y+l*(d.y-n.y)}}},ce.EPSILON=Number.EPSILON||1e-14,ce.splineCurveMonotone=function(e){var t,a,r,n,c,d,o,i,f,s=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),b=s.length;for(t=0;t0?s[t-1]:null,(n=t0?s[t-1]:null,n=t=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},ce.previousItem=function(e,t,a){return a?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},ce.niceNum=function(e,t){var a=Math.floor(ce.log10(e)),r=e/Math.pow(10,a);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,a)},ce.requestAnimFrame="undefined"===typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},ce.getRelativePosition=function(e,t){var a,r,n=e.originalEvent||e,c=e.target||e.srcElement,d=c.getBoundingClientRect(),o=n.touches;o&&o.length>0?(a=o[0].clientX,r=o[0].clientY):(a=n.clientX,r=n.clientY);var i=parseFloat(ce.getStyle(c,"padding-left")),f=parseFloat(ce.getStyle(c,"padding-top")),s=parseFloat(ce.getStyle(c,"padding-right")),b=parseFloat(ce.getStyle(c,"padding-bottom")),l=d.right-d.left-i-s,u=d.bottom-d.top-f-b;return{x:a=Math.round((a-d.left-i)/l*c.width/t.currentDevicePixelRatio),y:r=Math.round((r-d.top-f)/u*c.height/t.currentDevicePixelRatio)}},ce.getConstraintWidth=function(e){return a(e,"max-width","clientWidth")},ce.getConstraintHeight=function(e){return a(e,"max-height","clientHeight")},ce._calculatePadding=function(e,t,a){return(t=ce.getStyle(e,t)).indexOf("%")>-1?a*parseInt(t,10)/100:parseInt(t,10)},ce._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},ce.getMaximumWidth=function(e){var t=ce._getParentNode(e);if(!t)return e.clientWidth;var a=t.clientWidth,r=a-ce._calculatePadding(t,"padding-left",a)-ce._calculatePadding(t,"padding-right",a),n=ce.getConstraintWidth(e);return isNaN(n)?r:Math.min(r,n)},ce.getMaximumHeight=function(e){var t=ce._getParentNode(e);if(!t)return e.clientHeight;var a=t.clientHeight,r=a-ce._calculatePadding(t,"padding-top",a)-ce._calculatePadding(t,"padding-bottom",a),n=ce.getConstraintHeight(e);return isNaN(n)?r:Math.min(r,n)},ce.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},ce.retinaScale=function(e,t){var a=e.currentDevicePixelRatio=t||"undefined"!==typeof window&&window.devicePixelRatio||1;if(1!==a){var r=e.canvas,n=e.height,c=e.width;r.height=n*a,r.width=c*a,e.ctx.scale(a,a),r.style.height||r.style.width||(r.style.height=n+"px",r.style.width=c+"px")}},ce.fontString=function(e,t,a){return t+" "+e+"px "+a},ce.longestText=function(e,t,a,r){var n=(r=r||{}).data=r.data||{},c=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(n=r.data={},c=r.garbageCollect=[],r.font=t),e.font=t;var d,o,i,f,s,b=0,l=a.length;for(d=0;da.length){for(d=0;dr&&(r=c),r},ce.numberOfLabelLines=function(e){var t=1;return ce.each(e,(function(e){ce.isArray(e)&&e.length>t&&(t=e.length)})),t},ce.color=D?function(e){return e instanceof CanvasGradient&&(e=Z.global.defaultColor),D(e)}:function(e){return console.error("Color.js not found!"),e},ce.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:ce.color(e).saturate(.5).darken(.1).rgbString()}};function Ka(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Ga(e){this.options=e||{}}ce.extend(Ga.prototype,{formats:Ka,parse:Ka,format:Ka,add:Ka,diff:Ka,startOf:Ka,endOf:Ka,_create:function(e){return e}}),Ga.override=function(e){ce.extend(Ga.prototype,e)};var Ya={_date:Ga},Ja={formatters:{values:function(e){return ce.isArray(e)?e:""+e},linear:function(e,t,a){var r=a.length>3?a[2]-a[1]:a[1]-a[0];Math.abs(r)>1&&e!==Math.floor(e)&&(r=e-Math.floor(e));var n=ce.log10(Math.abs(r)),c="";if(0!==e)if(Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]))<1e-4){var d=ce.log10(Math.abs(e)),o=Math.floor(d)-Math.floor(n);o=Math.max(Math.min(o,20),0),c=e.toExponential(o)}else{var i=-1*Math.floor(n);i=Math.max(Math.min(i,20),0),c=e.toFixed(i)}else c="0";return c},logarithmic:function(e,t,a){var r=e/Math.pow(10,Math.floor(ce.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===a.length-1?e.toExponential():""}}},Xa=ce.isArray,Za=ce.isNullOrUndef,Qa=ce.valueOrDefault,$a=ce.valueAtIndexOrDefault;function er(e,t){for(var a=[],r=e.length/t,n=0,c=e.length;ni+f)))return d}function ar(e,t){ce.each(e,(function(e){var a,r=e.gc,n=r.length/2;if(n>t){for(a=0;af)return c;return Math.max(f,1)}function br(e){var t,a,r=[];for(t=0,a=e.length;t=l||s<=1||!o.isHorizontal()?o.labelRotation=b:(t=(e=o._getLabelSizes()).widest.width,a=e.highest.height-e.highest.offset,r=Math.min(o.maxWidth,o.chart.width-t),t+6>(n=i.offset?o.maxWidth/s:r/(s-1))&&(n=r/(s-(i.offset?.5:1)),c=o.maxHeight-nr(i.gridLines)-f.padding-cr(i.scaleLabel),d=Math.sqrt(t*t+a*a),u=ce.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/n,1)),Math.asin(Math.min(c/d,1))-Math.asin(a/d))),u=Math.max(b,Math.min(l,u))),o.labelRotation=u)},afterCalculateTickRotation:function(){ce.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ce.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},a=e.chart,r=e.options,n=r.ticks,c=r.scaleLabel,d=r.gridLines,o=e._isVisible(),i="bottom"===r.position,f=e.isHorizontal();if(f?t.width=e.maxWidth:o&&(t.width=nr(d)+cr(c)),f?o&&(t.height=nr(d)+cr(c)):t.height=e.maxHeight,n.display&&o){var s=or(n),b=e._getLabelSizes(),l=b.first,u=b.last,h=b.widest,p=b.highest,x=.4*s.minor.lineHeight,m=n.padding;if(f){var g=0!==e.labelRotation,v=ce.toRadians(e.labelRotation),y=Math.cos(v),w=Math.sin(v),k=w*h.width+y*(p.height-(g?p.offset:0))+(g?0:x);t.height=Math.min(e.maxHeight,t.height+k+m);var I,_,A=e.getPixelForTick(0)-e.left,E=e.right-e.getPixelForTick(e.getTicks().length-1);g?(I=i?y*l.width+w*l.offset:w*(l.height-l.offset),_=i?w*(u.height-u.offset):y*u.width+w*u.offset):(I=l.width/2,_=u.width/2),e.paddingLeft=Math.max((I-A)*e.width/(e.width-A),0)+3,e.paddingRight=Math.max((_-E)*e.width/(e.width-E),0)+3}else{var S=n.mirror?0:h.width+m+x;t.width=Math.min(e.maxWidth,t.width+S),e.paddingTop=l.height/2,e.paddingBottom=u.height/2}}e.handleMargins(),f?(e.width=e._length=a.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=a.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){ce.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(Za(e))return NaN;if(("number"===typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,a,r,n=this;for(n.ticks=e.map((function(e){return e.value})),n.beforeTickToLabelConversion(),t=n.convertTicksToLabels(e)||n.ticks,n.afterTickToLabelConversion(),a=0,r=e.length;ar-1?null:t.getPixelForDecimal(e*n+(a?n/2:0))},getPixelForDecimal:function(e){var t=this;return t._reversePixels&&(e=1-e),t._startPixel+e*t._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this,t=e.min,a=e.max;return e.beginAtZero?0:t<0&&a<0?a:t>0&&a>0?t:0},_autoSkip:function(e){var t,a,r,n,c=this,d=c.options.ticks,o=c._length,i=d.maxTicksLimit||o/c._tickSize()+1,f=d.major.enabled?br(e):[],s=f.length,b=f[0],l=f[s-1];if(s>i)return lr(e,f,s/i),ir(e);if(r=sr(f,e,o,i),s>0){for(t=0,a=s-1;t1?(l-b)/(s-1):null,ur(e,r,ce.isNullOrUndef(n)?0:b-n,b),ur(e,r,l,ce.isNullOrUndef(n)?e.length:l+n),ir(e)}return ur(e,r),ir(e)},_tickSize:function(){var e=this,t=e.options.ticks,a=ce.toRadians(e.labelRotation),r=Math.abs(Math.cos(a)),n=Math.abs(Math.sin(a)),c=e._getLabelSizes(),d=t.autoSkipPadding||0,o=c?c.widest.width+d:0,i=c?c.highest.height+d:0;return e.isHorizontal()?i*r>o*n?o/r:i/n:i*n=0&&(d=e),void 0!==c&&(e=a.indexOf(c))>=0&&(o=e),t.minIndex=d,t.maxIndex=o,t.min=a[d],t.max=a[o]},buildTicks:function(){var e=this,t=e._getLabels(),a=e.minIndex,r=e.maxIndex;e.ticks=0===a&&r===t.length-1?t:t.slice(a,r+1)},getLabelForIndex:function(e,t){var a=this,r=a.chart;return r.getDatasetMeta(t).controller._getValueScaleId()===a.id?a.getRightValue(r.data.datasets[t].data[e]):a._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,a=e.ticks;pr.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),a&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(a.length-(t?0:1),1))},getPixelForValue:function(e,t,a){var r,n,c,d=this;return xr(t)||xr(a)||(e=d.chart.data.datasets[a].data[t]),xr(e)||(r=d.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(n=d._getLabels(),e=ce.valueOrDefault(r,e),t=-1!==(c=n.indexOf(e))?c:t,isNaN(t)&&(t=e)),d.getPixelForDecimal((t-d._startValue)/d._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=this,a=Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange);return Math.min(Math.max(a,0),t.ticks.length-1)},getBasePixel:function(){return this.bottom}}),vr=mr;gr._defaults=vr;var yr=ce.noop,wr=ce.isNullOrUndef;function kr(e,t){var a,r,n,c,d=[],o=1e-14,i=e.stepSize,f=i||1,s=e.maxTicks-1,b=e.min,l=e.max,u=e.precision,h=t.min,p=t.max,x=ce.niceNum((p-h)/s/f)*f;if(xs&&(x=ce.niceNum(c*x/s/f)*f),i||wr(u)?a=Math.pow(10,ce._decimalPlaces(x)):(a=Math.pow(10,u),x=Math.ceil(x*a)/a),r=Math.floor(h/x)*x,n=Math.ceil(p/x)*x,i&&(!wr(b)&&ce.almostWhole(b/x,x/1e3)&&(r=b),!wr(l)&&ce.almostWhole(l/x,x/1e3)&&(n=l)),c=(n-r)/x,c=ce.almostEquals(c,Math.round(c),x/1e3)?Math.round(c):Math.ceil(c),r=Math.round(r*a)/a,n=Math.round(n*a)/a,d.push(wr(b)?r:b);for(var m=1;m0&&r>0&&(e.min=0)}var n=void 0!==t.min||void 0!==t.suggestedMin,c=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),n!==c&&e.min>=e.max&&(n?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this,a=t.options.ticks,r=a.stepSize,n=a.maxTicksLimit;return r?e=Math.ceil(t.max/r)-Math.floor(t.min/r)+1:(e=t._computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:yr,buildTicks:function(){var e=this,t=e.options.ticks,a=e.getTickLimit(),r={maxTicks:a=Math.max(2,a),min:t.min,max:t.max,precision:t.precision,stepSize:ce.valueOrDefault(t.fixedStepSize,t.stepSize)},n=e.ticks=kr(r,e);e.handleDirectionalChanges(),e.max=ce.max(n),e.min=ce.min(n),t.reverse?(n.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),pr.prototype.convertTicksToLabels.call(e)},_configure:function(){var e,t=this,a=t.getTicks(),r=t.min,n=t.max;pr.prototype._configure.call(t),t.options.offset&&a.length&&(r-=e=(n-r)/Math.max(a.length-1,1)/2,n+=e),t._startValue=r,t._endValue=n,t._valueRange=n-r}}),_r={position:"left",ticks:{callback:Ja.formatters.linear}},Ar=0,Er=1;function Sr(e,t,a){var r=[a.type,void 0===t&&void 0===a.stack?a.index:"",a.stack].join(".");return void 0===e[r]&&(e[r]={pos:[],neg:[]}),e[r]}function Nr(e,t,a,r){var n,c,d=e.options,o=Sr(t,d.stacked,a),i=o.pos,f=o.neg,s=r.length;for(n=0;nt.length-1?null:this.getPixelForValue(t[e])}}),Tr=_r;Hr._defaults=Tr;var Pr=ce.valueOrDefault,Rr=ce.math.log10;function Cr(e,t){var a,r,n=[],c=Pr(e.min,Math.pow(10,Math.floor(Rr(t.min)))),d=Math.floor(Rr(t.max)),o=Math.ceil(t.max/Math.pow(10,d));0===c?(a=Math.floor(Rr(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,a)),n.push(c),c=r*Math.pow(10,a)):(a=Math.floor(Rr(c)),r=Math.floor(c/Math.pow(10,a)));var i=a<0?Math.pow(10,Math.abs(a)):1;do{n.push(c),10===++r&&(r=1,i=++a>=0?1:i),c=Math.round(r*Math.pow(10,a)*i)/i}while(a=0?e:t}var Br=pr.extend({determineDataLimits:function(){var e,t,a,r,n,c,d=this,o=d.options,i=d.chart,f=i.data.datasets,s=d.isHorizontal();function b(e){return s?e.xAxisID===d.id:e.yAxisID===d.id}d.min=Number.POSITIVE_INFINITY,d.max=Number.NEGATIVE_INFINITY,d.minNotZero=Number.POSITIVE_INFINITY;var l=o.stacked;if(void 0===l)for(e=0;e0){var t=ce.min(e),a=ce.max(e);d.min=Math.min(d.min,t),d.max=Math.max(d.max,a)}}))}else for(e=0;e0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Rr(e.max))):e.minNotZero=a)},buildTicks:function(){var e=this,t=e.options.ticks,a=!e.isHorizontal(),r={min:Dr(t.min),max:Dr(t.max)},n=e.ticks=Cr(r,e);e.max=ce.max(n),e.min=ce.min(n),t.reverse?(a=!a,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),a&&n.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),pr.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Rr(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,a=0;pr.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),a=Pr(e.options.ticks.fontSize,Z.global.defaultFontSize)/e._length),e._startValue=Rr(t),e._valueOffset=a,e._valueRange=(Rr(e.max)-Rr(t))/(1-a)},getPixelForValue:function(e){var t=this,a=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(a=(Rr(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(a)},getValueForPixel:function(e){var t=this,a=t.getDecimalForPixel(e);return 0===a&&0===t.min?0:Math.pow(10,t._startValue+(a-t._valueOffset)*t._valueRange)}}),Lr=Or;Br._defaults=Lr;var jr=ce.valueOrDefault,Ur=ce.valueAtIndexOrDefault,Fr=ce.options.resolve,zr={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Ja.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function qr(e){var t=e.ticks;return t.display&&e.display?jr(t.fontSize,Z.global.defaultFontSize)+2*t.backdropPaddingY:0}function Wr(e,t,a){return ce.isArray(a)?{w:ce.longestText(e,e.font,a),h:a.length*t}:{w:e.measureText(a).width,h:t}}function Vr(e,t,a,r,n){return e===r||e===n?{start:t-a/2,end:t+a/2}:en?{start:t-a,end:t}:{start:t,end:t+a}}function Kr(e){var t,a,r,n=ce.options._parseFont(e.options.pointLabels),c={l:0,r:e.width,t:0,b:e.height-e.paddingTop},d={};e.ctx.font=n.string,e._pointLabelSizes=[];var o=e.chart.data.labels.length;for(t=0;tc.r&&(c.r=s.end,d.r=i),b.startc.b&&(c.b=b.end,d.b=i)}e.setReductions(e.drawingArea,c,d)}function Gr(e){return 0===e||180===e?"center":e<180?"left":"right"}function Yr(e,t,a,r){var n,c,d=a.y+r/2;if(ce.isArray(t))for(n=0,c=t.length;n270||e<90)&&(a.y-=t.h)}function Xr(e){var t=e.ctx,a=e.options,r=a.pointLabels,n=qr(a),c=e.getDistanceFromCenterForValue(a.ticks.reverse?e.min:e.max),d=ce.options._parseFont(r);t.save(),t.font=d.string,t.textBaseline="middle";for(var o=e.chart.data.labels.length-1;o>=0;o--){var i=0===o?n/2:0,f=e.getPointPosition(o,c+i+5),s=Ur(r.fontColor,o,Z.global.defaultFontColor);t.fillStyle=s;var b=e.getIndexAngle(o),l=ce.toDegrees(b);t.textAlign=Gr(l),Jr(l,e._pointLabelSizes[o],f),Yr(t,e.pointLabels[o],f,d.lineHeight)}t.restore()}function Zr(e,t,a,r){var n,c=e.ctx,d=t.circular,o=e.chart.data.labels.length,i=Ur(t.color,r-1),f=Ur(t.lineWidth,r-1);if((d||o)&&i&&f){if(c.save(),c.strokeStyle=i,c.lineWidth=f,c.setLineDash&&(c.setLineDash(t.borderDash||[]),c.lineDashOffset=t.borderDashOffset||0),c.beginPath(),d)c.arc(e.xCenter,e.yCenter,a,0,2*Math.PI);else{n=e.getPointPosition(0,a),c.moveTo(n.x,n.y);for(var s=1;s0&&r>0?a:0)},_drawGrid:function(){var e,t,a,r=this,n=r.ctx,c=r.options,d=c.gridLines,o=c.angleLines,i=jr(o.lineWidth,d.lineWidth),f=jr(o.color,d.color);if(c.pointLabels.display&&Xr(r),d.display&&ce.each(r.ticks,(function(e,a){0!==a&&(t=r.getDistanceFromCenterForValue(r.ticksAsNumbers[a]),Zr(r,d,t,a))})),o.display&&i&&f){for(n.save(),n.lineWidth=i,n.strokeStyle=f,n.setLineDash&&(n.setLineDash(Fr([o.borderDash,d.borderDash,[]])),n.lineDashOffset=Fr([o.borderDashOffset,d.borderDashOffset,0])),e=r.chart.data.labels.length-1;e>=0;e--)t=r.getDistanceFromCenterForValue(c.ticks.reverse?r.min:r.max),a=r.getPointPosition(e,t),n.beginPath(),n.moveTo(r.xCenter,r.yCenter),n.lineTo(a.x,a.y),n.stroke();n.restore()}},_drawLabels:function(){var e=this,t=e.ctx,a=e.options.ticks;if(a.display){var r,n,c=e.getIndexAngle(0),d=ce.options._parseFont(a),o=jr(a.fontColor,Z.global.defaultFontColor);t.save(),t.font=d.string,t.translate(e.xCenter,e.yCenter),t.rotate(c),t.textAlign="center",t.textBaseline="middle",ce.each(e.ticks,(function(c,i){(0!==i||a.reverse)&&(r=e.getDistanceFromCenterForValue(e.ticksAsNumbers[i]),a.showLabelBackdrop&&(n=t.measureText(c).width,t.fillStyle=a.backdropColor,t.fillRect(-n/2-a.backdropPaddingX,-r-d.size/2-a.backdropPaddingY,n+2*a.backdropPaddingX,d.size+2*a.backdropPaddingY)),t.fillStyle=o,t.fillText(c,0,-r))})),t.restore()}},_drawTitle:ce.noop}),en=zr;$r._defaults=en;var tn=ce._deprecated,an=ce.options.resolve,rn=ce.valueOrDefault,nn=Number.MIN_SAFE_INTEGER||-9007199254740991,cn=Number.MAX_SAFE_INTEGER||9007199254740991,dn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},on=Object.keys(dn);function fn(e,t){return e-t}function sn(e){var t,a,r,n={},c=[];for(t=0,a=e.length;tt&&o=0&&d<=o;){if(n=e[(r=d+o>>1)-1]||null,c=e[r],!n)return{lo:null,hi:c};if(c[t]a))return{lo:n,hi:c};o=r-1}}return{lo:c,hi:null}}function pn(e,t,a,r){var n=hn(e,t,a),c=n.lo?n.hi?n.lo:e[e.length-2]:e[0],d=n.lo?n.hi?n.hi:e[e.length-1]:e[1],o=d[t]-c[t],i=o?(a-c[t])/o:0,f=(d[r]-c[r])*i;return c[r]+f}function xn(e,t){var a=e._adapter,r=e.options.time,n=r.parser,c=n||r.format,d=t;return"function"===typeof n&&(d=n(d)),ce.isFinite(d)||(d="string"===typeof c?a.parse(d,c):a.parse(d)),null!==d?+d:(n||"function"!==typeof c||(d=c(t),ce.isFinite(d)||(d=a.parse(d))),d)}function mn(e,t){if(ce.isNullOrUndef(t))return null;var a=e.options.time,r=xn(e,e.getRightValue(t));return null===r||a.round&&(r=+e._adapter.startOf(r,a.round)),r}function gn(e,t,a,r){var n,c,d,o=on.length;for(n=on.indexOf(e);n=on.indexOf(a);c--)if(d=on[c],dn[d].common&&e._adapter.diff(n,r,d)>=t-1)return d;return on[a?on.indexOf(a):0]}function yn(e){for(var t=on.indexOf(e)+1,a=on.length;t1e5*f)throw t+" and "+a+" are too far apart with stepSize of "+f+" "+i;for(n=b;n=0&&(t[c].major=!0);return t}function _n(e,t,a){var r,n,c=[],d={},o=t.length;for(r=0;r1?sn(h).sort(fn):h.sort(fn),l=Math.min(l,h[0]),u=Math.max(u,h[h.length-1])),l=mn(o,bn(s))||l,u=mn(o,ln(s))||u,l=l===cn?+f.startOf(Date.now(),b):l,u=u===nn?+f.endOf(Date.now(),b)+1:u,o.min=Math.min(l,u),o.max=Math.max(l+1,u),o._table=[],o._timestamps={data:h,datasets:p,labels:x}},buildTicks:function(){var e,t,a,r=this,n=r.min,c=r.max,d=r.options,o=d.ticks,i=d.time,f=r._timestamps,s=[],b=r.getLabelCapacity(n),l=o.source,u=d.distribution;for(f="data"===l||"auto"===l&&"series"===u?f.data:"labels"===l?f.labels:wn(r,n,c,b),"ticks"===d.bounds&&f.length&&(n=f[0],c=f[f.length-1]),n=mn(r,bn(d))||n,c=mn(r,ln(d))||c,e=0,t=f.length;e=n&&a<=c&&s.push(a);return r.min=n,r.max=c,r._unit=i.unit||(o.autoSkip?gn(i.minUnit,r.min,r.max,b):vn(r,s.length,i.minUnit,r.min,r.max)),r._majorUnit=o.major.enabled&&"year"!==r._unit?yn(r._unit):void 0,r._table=un(r._timestamps.data,n,c,u),r._offsets=kn(r._table,s,n,c,d),o.reverse&&s.reverse(),_n(r,s,r._majorUnit)},getLabelForIndex:function(e,t){var a=this,r=a._adapter,n=a.chart.data,c=a.options.time,d=n.labels&&e=0&&e0?o:1}}),Sn=An;En._defaults=Sn;var Nn={category:gr,linear:Hr,logarithmic:Br,radialLinear:$r,time:En},Mn={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Ya._date.override("function"===typeof e?{_id:"moment",formats:function(){return Mn},parse:function(t,a){return"string"===typeof t&&"string"===typeof a?t=e(t,a):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,a){return e(t).format(a)},add:function(t,a,r){return e(t).add(a,r).valueOf()},diff:function(t,a,r){return e(t).diff(e(a),r)},startOf:function(t,a,r){return t=e(t),"isoWeek"===a?t.isoWeekday(r).valueOf():t.startOf(a).valueOf()},endOf:function(t,a){return e(t).endOf(a).valueOf()},_create:function(t){return e(t)}}:{}),Z._set("global",{plugins:{filler:{propagate:!0}}});var Hn={dataset:function(e){var t=e.fill,a=e.chart,r=a.getDatasetMeta(t),n=r&&a.isDatasetVisible(t)&&r.dataset._children||[],c=n.length||0;return c?function(e,t){return t=a)&&r;switch(c){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return c;default:return!1}}function Pn(e){var t,a=e.el._model||{},r=e.el._scale||{},n=e.fill,c=null;if(isFinite(n))return null;if("start"===n?c=void 0===a.scaleBottom?r.bottom:a.scaleBottom:"end"===n?c=void 0===a.scaleTop?r.top:a.scaleTop:void 0!==a.scaleZero?c=a.scaleZero:r.getBasePixel&&(c=r.getBasePixel()),void 0!==c&&null!==c){if(void 0!==c.x&&void 0!==c.y)return c;if(ce.isFinite(c))return{x:(t=r.isHorizontal())?c:null,y:t?null:c}}return null}function Rn(e){var t,a,r,n,c,d=e.el._scale,o=d.options,i=d.chart.data.labels.length,f=e.fill,s=[];if(!i)return null;for(t=o.ticks.reverse?d.max:d.min,a=o.ticks.reverse?d.min:d.max,r=d.getPointPositionForValue(0,t),n=0;n0;--c)ce.canvas.lineTo(e,a[c],a[c-1],!0);else for(d=a[0].cx,o=a[0].cy,i=Math.sqrt(Math.pow(a[0].x-d,2)+Math.pow(a[0].y-o,2)),c=n-1;c>0;--c)e.arc(d,o,i,a[c].angle,a[c-1].angle,!0)}}function jn(e,t,a,r,n,c){var d,o,i,f,s,b,l,u,h=t.length,p=r.spanGaps,x=[],m=[],g=0,v=0;for(e.beginPath(),d=0,o=h;d=0;--a)(t=i[a].$filler)&&t.visible&&(n=(r=t.el)._view,c=r._children||[],d=t.mapper,o=n.backgroundColor||Z.global.defaultColor,d&&o&&c.length&&(ce.canvas.clipArea(f,e.chartArea),jn(f,c,d,n,o,r._loop),ce.canvas.unclipArea(f)))}},Fn=ce.rtl.getRtlAdapter,zn=ce.noop,qn=ce.valueOrDefault;function Wn(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}Z._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var a=t.datasetIndex,r=this.chart,n=r.getDatasetMeta(a);n.hidden=null===n.hidden?!r.data.datasets[a].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,a=e.options.legend||{},r=a.labels&&a.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(a){var n=a.controller.getStyle(r?0:void 0);return{text:t[a.index].label,fillStyle:n.backgroundColor,hidden:!e.isDatasetVisible(a.index),lineCap:n.borderCapStyle,lineDash:n.borderDash,lineDashOffset:n.borderDashOffset,lineJoin:n.borderJoinStyle,lineWidth:n.borderWidth,strokeStyle:n.borderColor,pointStyle:n.pointStyle,rotation:n.rotation,datasetIndex:a.index}}),this)}}},legendCallback:function(e){var t,a,r,n=document.createElement("ul"),c=e.data.datasets;for(n.setAttribute("class",e.id+"-legend"),t=0,a=c.length;ti.width)&&(b+=d+a.padding,s[s.length-(t>0?0:1)]=0),o[t]={left:0,top:0,width:r,height:d},s[s.length-1]+=r+a.padding})),i.height+=b}else{var l=a.padding,u=e.columnWidths=[],h=e.columnHeights=[],p=a.padding,x=0,m=0;ce.each(e.legendItems,(function(e,t){var r=Wn(a,d)+d/2+n.measureText(e.text).width;t>0&&m+d+2*l>i.height&&(p+=x+a.padding,u.push(x),h.push(m),x=0,m=0),x=Math.max(x,r),m+=d+l,o[t]={left:0,top:0,width:r,height:d}})),p+=x,u.push(x),h.push(m),i.width+=p}e.width=i.width,e.height=i.height}else e.width=i.width=e.height=i.height=0},afterFit:zn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,a=t.labels,r=Z.global,n=r.defaultColor,c=r.elements.line,d=e.height,o=e.columnHeights,i=e.width,f=e.lineWidths;if(t.display){var s,b=Fn(t.rtl,e.left,e.minSize.width),l=e.ctx,u=qn(a.fontColor,r.defaultFontColor),h=ce.options._parseFont(a),p=h.size;l.textAlign=b.textAlign("left"),l.textBaseline="middle",l.lineWidth=.5,l.strokeStyle=u,l.fillStyle=u,l.font=h.string;var x=Wn(a,p),m=e.legendHitBoxes,g=function(e,t,r){if(!(isNaN(x)||x<=0)){l.save();var d=qn(r.lineWidth,c.borderWidth);if(l.fillStyle=qn(r.fillStyle,n),l.lineCap=qn(r.lineCap,c.borderCapStyle),l.lineDashOffset=qn(r.lineDashOffset,c.borderDashOffset),l.lineJoin=qn(r.lineJoin,c.borderJoinStyle),l.lineWidth=d,l.strokeStyle=qn(r.strokeStyle,n),l.setLineDash&&l.setLineDash(qn(r.lineDash,c.borderDash)),a&&a.usePointStyle){var o=x*Math.SQRT2/2,i=b.xPlus(e,x/2),f=t+p/2;ce.canvas.drawPoint(l,r.pointStyle,o,i,f,r.rotation)}else l.fillRect(b.leftForLtr(e,x),t,x,p),0!==d&&l.strokeRect(b.leftForLtr(e,x),t,x,p);l.restore()}},v=function(e,t,a,r){var n=p/2,c=b.xPlus(e,x+n),d=t+n;l.fillText(a.text,c,d),a.hidden&&(l.beginPath(),l.lineWidth=2,l.moveTo(c,d),l.lineTo(b.xPlus(c,r),d),l.stroke())},y=function(e,r){switch(t.align){case"start":return a.padding;case"end":return e-r;default:return(e-r+a.padding)/2}},w=e.isHorizontal();s=w?{x:e.left+y(i,f[0]),y:e.top+a.padding,line:0}:{x:e.left+a.padding,y:e.top+y(d,o[0]),line:0},ce.rtl.overrideTextDirection(e.ctx,t.textDirection);var k=p+a.padding;ce.each(e.legendItems,(function(t,r){var n=l.measureText(t.text).width,c=x+p/2+n,u=s.x,h=s.y;b.setWidth(e.minSize.width),w?r>0&&u+c+a.padding>e.left+e.minSize.width&&(h=s.y+=k,s.line++,u=s.x=e.left+y(i,f[s.line])):r>0&&h+k>e.top+e.minSize.height&&(u=s.x=u+e.columnWidths[s.line]+a.padding,s.line++,h=s.y=e.top+y(d,o[s.line]));var I=b.x(u);g(I,h,t),m[r].left=b.leftForLtr(I,m[r].width),m[r].top=h,v(I,h,t,n),w?s.x+=c+a.padding:s.y+=k})),ce.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var a,r,n,c=this;if(e>=c.left&&e<=c.right&&t>=c.top&&t<=c.bottom)for(n=c.legendHitBoxes,a=0;a=(r=n[a]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return c.legendItems[a];return null},handleEvent:function(e){var t,a=this,r=a.options,n="mouseup"===e.type?"click":e.type;if("mousemove"===n){if(!r.onHover&&!r.onLeave)return}else{if("click"!==n)return;if(!r.onClick)return}t=a._getLegendItemAt(e.x,e.y),"click"===n?t&&r.onClick&&r.onClick.call(a,e.native,t):(r.onLeave&&t!==a._hoveredItem&&(a._hoveredItem&&r.onLeave.call(a,e.native,a._hoveredItem),a._hoveredItem=t),r.onHover&&t&&r.onHover.call(a,e.native,t))}});function Kn(e,t){var a=new Vn({ctx:e.ctx,options:t,chart:e});qt.configure(e,a,t),qt.addBox(e,a),e.legend=a}var Gn={id:"legend",_element:Vn,beforeInit:function(e){var t=e.options.legend;t&&Kn(e,t)},beforeUpdate:function(e){var t=e.options.legend,a=e.legend;t?(ce.mergeIf(t,Z.global.legend),a?(qt.configure(e,a,t),a.options=t):Kn(e,t)):a&&(qt.removeBox(e,a),delete e.legend)},afterEvent:function(e,t){var a=e.legend;a&&a.handleEvent(t)}},Yn=ce.noop;Z._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Jn=ue.extend({initialize:function(e){var t=this;ce.extend(t,e),t.legendHitBoxes=[]},beforeUpdate:Yn,update:function(e,t,a){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=a,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:Yn,beforeSetDimensions:Yn,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:Yn,beforeBuildLabels:Yn,buildLabels:Yn,afterBuildLabels:Yn,beforeFit:Yn,fit:function(){var e,t=this,a=t.options,r=t.minSize={},n=t.isHorizontal();a.display?(e=(ce.isArray(a.text)?a.text.length:1)*ce.options._parseFont(a).lineHeight+2*a.padding,t.width=r.width=n?t.maxWidth:e,t.height=r.height=n?e:t.maxHeight):t.width=r.width=t.height=r.height=0},afterFit:Yn,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,a=e.options;if(a.display){var r,n,c,d=ce.options._parseFont(a),o=d.lineHeight,i=o/2+a.padding,f=0,s=e.top,b=e.left,l=e.bottom,u=e.right;t.fillStyle=ce.valueOrDefault(a.fontColor,Z.global.defaultFontColor),t.font=d.string,e.isHorizontal()?(n=b+(u-b)/2,c=s+i,r=u-b):(n="left"===a.position?b+i:u-i,c=s+(l-s)/2,r=l-s,f=Math.PI*("left"===a.position?-.5:.5)),t.save(),t.translate(n,c),t.rotate(f),t.textAlign="center",t.textBaseline="middle";var h=a.text;if(ce.isArray(h))for(var p=0,x=0;x{var r=a(59966).Buffer,n=a(61781).Transform,c=a(42238).I;function d(e){n.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}a(56329)(d,n),d.prototype.update=function(e,t,a){"string"===typeof e&&(e=r.from(e,t));var n=this._update(e);return this.hashMode?this:(a&&(n=this._toString(n,a)),n)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(e,t,a){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(n){r=n}finally{a(r)}},d.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(a){t=a}e(t)},d.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},d.prototype._toString=function(e,t,a){if(this._decoder||(this._decoder=new c(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return a&&(r+=this._decoder.end()),r},e.exports=d},80224:(e,t,a)=>{var r=a(26382).Buffer,n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,a,n;try{t=Map}catch(i){t=function(){}}try{a=Set}catch(i){a=function(){}}try{n=Promise}catch(i){n=function(){}}function c(d,i,f,s,b){"object"===typeof i&&(f=i.depth,s=i.prototype,b=i.includeNonEnumerable,i=i.circular);var l=[],u=[],h="undefined"!=typeof r;return"undefined"==typeof i&&(i=!0),"undefined"==typeof f&&(f=1/0),function d(f,p){if(null===f)return null;if(0===p)return f;var x,m;if("object"!=typeof f)return f;if(e(f,t))x=new t;else if(e(f,a))x=new a;else if(e(f,n))x=new n((function(e,t){f.then((function(t){e(d(t,p-1))}),(function(e){t(d(e,p-1))}))}));else if(c.__isArray(f))x=[];else if(c.__isRegExp(f))x=new RegExp(f.source,o(f)),f.lastIndex&&(x.lastIndex=f.lastIndex);else if(c.__isDate(f))x=new Date(f.getTime());else{if(h&&r.isBuffer(f))return x=r.allocUnsafe?r.allocUnsafe(f.length):new r(f.length),f.copy(x),x;e(f,Error)?x=Object.create(f):"undefined"==typeof s?(m=Object.getPrototypeOf(f),x=Object.create(m)):(x=Object.create(s),m=s)}if(i){var g=l.indexOf(f);if(-1!=g)return u[g];l.push(f),u.push(x)}for(var v in e(f,t)&&f.forEach((function(e,t){var a=d(t,p-1),r=d(e,p-1);x.set(a,r)})),e(f,a)&&f.forEach((function(e){var t=d(e,p-1);x.add(t)})),f){var y;m&&(y=Object.getOwnPropertyDescriptor(m,v)),y&&null==y.set||(x[v]=d(f[v],p-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(f);for(v=0;v{"use strict";function r(e){var t,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;tn});const n=function(){for(var e,t,a=0,n="";a{var r=a(26382).Buffer,n=a(44946),c=a(36059);function d(e,t){var a;(Array.isArray(e)||e instanceof Uint8Array)&&(e=new r(e)),null!=t?("number"===typeof t&&(t=new r([t])),a=r.concat([t,e])):a=e;var c=f(a).slice(0,4),d=r.concat([a,c]);return n.encode(d)}function o(e,t){var a,c=n.decode(e),d=new r(c);if(null==t)a=0;else if("number"===typeof t&&(t=new r([t])),a=t.length,d.slice(0,a).toString("hex")!==t.toString("hex"))throw new Error("Invalid version");var o=d.slice(-4),i=d.length-4,s=d.slice(0,i),b=f(s).slice(0,4);if(o.toString("hex")!==b.toString("hex"))throw new Error("Invalid checksum");return s.slice(a)}function i(e,t){try{o(e,t)}catch(a){return!1}return!0}function f(e){var t=c("sha256").update(e).digest();return c("sha256").update(t).digest()}e.exports={encode:d,decode:o,isValid:i,createEncoder:function(e){return function(t){return d(t,e)}},createDecoder:function(e){return function(t){return o(t,e)}},createValidator:function(e){return function(t){return i(t,e)}}}},44946:e=>{for(var t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",a={},r=0;r<58;r++)a[t.charAt(r)]=r;e.exports={encode:function(e){if(0===e.length)return"";var a,r=[0];for(d=0;d=0;d--)c+=t[r[d]];return c},decode:function(e){if(0===e.length)return[];var t,r,n=[0];for(t=0;t>8,n[r]&=255;for(;d;)n.push(255&d),d>>=8}for(t=0;"1"===e[t]&&t{var r=a(85884),n={};for(var c in r)r.hasOwnProperty(c)&&(n[r[c]]=c);var d=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in d)if(d.hasOwnProperty(o)){if(!("channels"in d[o]))throw new Error("missing channels property: "+o);if(!("labels"in d[o]))throw new Error("missing channel labels property: "+o);if(d[o].labels.length!==d[o].channels)throw new Error("channel and label counts mismatch: "+o);var i=d[o].channels,f=d[o].labels;delete d[o].channels,delete d[o].labels,Object.defineProperty(d[o],"channels",{value:i}),Object.defineProperty(d[o],"labels",{value:f})}d.rgb.hsl=function(e){var t,a,r=e[0]/255,n=e[1]/255,c=e[2]/255,d=Math.min(r,n,c),o=Math.max(r,n,c),i=o-d;return o===d?t=0:r===o?t=(n-c)/i:n===o?t=2+(c-r)/i:c===o&&(t=4+(r-n)/i),(t=Math.min(60*t,360))<0&&(t+=360),a=(d+o)/2,[t,100*(o===d?0:a<=.5?i/(o+d):i/(2-o-d)),100*a]},d.rgb.hsv=function(e){var t,a,r,n,c,d=e[0]/255,o=e[1]/255,i=e[2]/255,f=Math.max(d,o,i),s=f-Math.min(d,o,i),b=function(e){return(f-e)/6/s+.5};return 0===s?n=c=0:(c=s/f,t=b(d),a=b(o),r=b(i),d===f?n=r-a:o===f?n=1/3+t-r:i===f&&(n=2/3+a-t),n<0?n+=1:n>1&&(n-=1)),[360*n,100*c,100*f]},d.rgb.hwb=function(e){var t=e[0],a=e[1],r=e[2];return[d.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(a,r))),100*(r=1-1/255*Math.max(t,Math.max(a,r)))]},d.rgb.cmyk=function(e){var t,a=e[0]/255,r=e[1]/255,n=e[2]/255;return[100*((1-a-(t=Math.min(1-a,1-r,1-n)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-n-t)/(1-t)||0),100*t]},d.rgb.keyword=function(e){var t=n[e];if(t)return t;var a,c,d,o=1/0;for(var i in r)if(r.hasOwnProperty(i)){var f=r[i],s=(c=e,d=f,Math.pow(c[0]-d[0],2)+Math.pow(c[1]-d[1],2)+Math.pow(c[2]-d[2],2));s.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*a+.0722*r),100*(.0193*t+.1192*a+.9505*r)]},d.rgb.lab=function(e){var t=d.rgb.xyz(e),a=t[0],r=t[1],n=t[2];return r/=100,n/=108.883,a=(a/=95.047)>.008856?Math.pow(a,1/3):7.787*a+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(a-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},d.hsl.rgb=function(e){var t,a,r,n,c,d=e[0]/360,o=e[1]/100,i=e[2]/100;if(0===o)return[c=255*i,c,c];t=2*i-(a=i<.5?i*(1+o):i+o-i*o),n=[0,0,0];for(var f=0;f<3;f++)(r=d+1/3*-(f-1))<0&&r++,r>1&&r--,c=6*r<1?t+6*(a-t)*r:2*r<1?a:3*r<2?t+(a-t)*(2/3-r)*6:t,n[f]=255*c;return n},d.hsl.hsv=function(e){var t=e[0],a=e[1]/100,r=e[2]/100,n=a,c=Math.max(r,.01);return a*=(r*=2)<=1?r:2-r,n*=c<=1?c:2-c,[t,100*(0===r?2*n/(c+n):2*a/(r+a)),100*((r+a)/2)]},d.hsv.rgb=function(e){var t=e[0]/60,a=e[1]/100,r=e[2]/100,n=Math.floor(t)%6,c=t-Math.floor(t),d=255*r*(1-a),o=255*r*(1-a*c),i=255*r*(1-a*(1-c));switch(r*=255,n){case 0:return[r,i,d];case 1:return[o,r,d];case 2:return[d,r,i];case 3:return[d,o,r];case 4:return[i,d,r];case 5:return[r,d,o]}},d.hsv.hsl=function(e){var t,a,r,n=e[0],c=e[1]/100,d=e[2]/100,o=Math.max(d,.01);return r=(2-c)*d,a=c*o,[n,100*(a=(a/=(t=(2-c)*o)<=1?t:2-t)||0),100*(r/=2)]},d.hwb.rgb=function(e){var t,a,r,n,c,d,o,i=e[0]/360,f=e[1]/100,s=e[2]/100,b=f+s;switch(b>1&&(f/=b,s/=b),r=6*i-(t=Math.floor(6*i)),0!==(1&t)&&(r=1-r),n=f+r*((a=1-s)-f),t){default:case 6:case 0:c=a,d=n,o=f;break;case 1:c=n,d=a,o=f;break;case 2:c=f,d=a,o=n;break;case 3:c=f,d=n,o=a;break;case 4:c=n,d=f,o=a;break;case 5:c=a,d=f,o=n}return[255*c,255*d,255*o]},d.cmyk.rgb=function(e){var t=e[0]/100,a=e[1]/100,r=e[2]/100,n=e[3]/100;return[255*(1-Math.min(1,t*(1-n)+n)),255*(1-Math.min(1,a*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n))]},d.xyz.rgb=function(e){var t,a,r,n=e[0]/100,c=e[1]/100,d=e[2]/100;return a=-.9689*n+1.8758*c+.0415*d,r=.0557*n+-.204*c+1.057*d,t=(t=3.2406*n+-1.5372*c+-.4986*d)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:12.92*a,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(a=Math.min(Math.max(0,a),1)),255*(r=Math.min(Math.max(0,r),1))]},d.xyz.lab=function(e){var t=e[0],a=e[1],r=e[2];return a/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(t-a),200*(a-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},d.lab.xyz=function(e){var t,a,r,n=e[0];t=e[1]/500+(a=(n+16)/116),r=a-e[2]/200;var c=Math.pow(a,3),d=Math.pow(t,3),o=Math.pow(r,3);return a=c>.008856?c:(a-16/116)/7.787,t=d>.008856?d:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,[t*=95.047,a*=100,r*=108.883]},d.lab.lch=function(e){var t,a=e[0],r=e[1],n=e[2];return(t=360*Math.atan2(n,r)/2/Math.PI)<0&&(t+=360),[a,Math.sqrt(r*r+n*n),t]},d.lch.lab=function(e){var t,a=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[a,r*Math.cos(t),r*Math.sin(t)]},d.rgb.ansi16=function(e){var t=e[0],a=e[1],r=e[2],n=1 in arguments?arguments[1]:d.rgb.hsv(e)[2];if(0===(n=Math.round(n/50)))return 30;var c=30+(Math.round(r/255)<<2|Math.round(a/255)<<1|Math.round(t/255));return 2===n&&(c+=60),c},d.hsv.ansi16=function(e){return d.rgb.ansi16(d.hsv.rgb(e),e[2])},d.rgb.ansi256=function(e){var t=e[0],a=e[1],r=e[2];return t===a&&a===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(a/255*5)+Math.round(r/255*5)},d.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var a=.5*(1+~~(e>50));return[(1&t)*a*255,(t>>1&1)*a*255,(t>>2&1)*a*255]},d.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var a;return e-=16,[Math.floor(e/36)/5*255,Math.floor((a=e%36)/6)/5*255,a%6/5*255]},d.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},d.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var a=t[0];3===t[0].length&&(a=a.split("").map((function(e){return e+e})).join(""));var r=parseInt(a,16);return[r>>16&255,r>>8&255,255&r]},d.rgb.hcg=function(e){var t,a=e[0]/255,r=e[1]/255,n=e[2]/255,c=Math.max(Math.max(a,r),n),d=Math.min(Math.min(a,r),n),o=c-d;return t=o<=0?0:c===a?(r-n)/o%6:c===r?2+(n-a)/o:4+(a-r)/o+4,t/=6,[360*(t%=1),100*o,100*(o<1?d/(1-o):0)]},d.hsl.hcg=function(e){var t=e[1]/100,a=e[2]/100,r=1,n=0;return(r=a<.5?2*t*a:2*t*(1-a))<1&&(n=(a-.5*r)/(1-r)),[e[0],100*r,100*n]},d.hsv.hcg=function(e){var t=e[1]/100,a=e[2]/100,r=t*a,n=0;return r<1&&(n=(a-r)/(1-r)),[e[0],100*r,100*n]},d.hcg.rgb=function(e){var t=e[0]/360,a=e[1]/100,r=e[2]/100;if(0===a)return[255*r,255*r,255*r];var n,c=[0,0,0],d=t%1*6,o=d%1,i=1-o;switch(Math.floor(d)){case 0:c[0]=1,c[1]=o,c[2]=0;break;case 1:c[0]=i,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=o;break;case 3:c[0]=0,c[1]=i,c[2]=1;break;case 4:c[0]=o,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=i}return n=(1-a)*r,[255*(a*c[0]+n),255*(a*c[1]+n),255*(a*c[2]+n)]},d.hcg.hsv=function(e){var t=e[1]/100,a=t+e[2]/100*(1-t),r=0;return a>0&&(r=t/a),[e[0],100*r,100*a]},d.hcg.hsl=function(e){var t=e[1]/100,a=e[2]/100*(1-t)+.5*t,r=0;return a>0&&a<.5?r=t/(2*a):a>=.5&&a<1&&(r=t/(2*(1-a))),[e[0],100*r,100*a]},d.hcg.hwb=function(e){var t=e[1]/100,a=t+e[2]/100*(1-t);return[e[0],100*(a-t),100*(1-a)]},d.hwb.hcg=function(e){var t=e[1]/100,a=1-e[2]/100,r=a-t,n=0;return r<1&&(n=(a-r)/(1-r)),[e[0],100*r,100*n]},d.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},d.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},d.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},d.gray.hsl=d.gray.hsv=function(e){return[0,0,e[0]]},d.gray.hwb=function(e){return[0,100,e[0]]},d.gray.cmyk=function(e){return[0,0,0,e[0]]},d.gray.lab=function(e){return[e[0],0,0]},d.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),a=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(a.length)+a},d.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},90053:(e,t,a)=>{var r=a(63532),n=a(60444),c={};Object.keys(r).forEach((function(e){c[e]={},Object.defineProperty(c[e],"channels",{value:r[e].channels}),Object.defineProperty(c[e],"labels",{value:r[e].labels});var t=n(e);Object.keys(t).forEach((function(a){var r=t[a];c[e][a]=function(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var a=e(t);if("object"===typeof a)for(var r=a.length,n=0;n1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=c},85884:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},60444:(e,t,a)=>{var r=a(63532);function n(e){var t=function(){for(var e={},t=Object.keys(r),a=t.length,n=0;n{"use strict";var r=a(40139),n={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var a,c,d,o,i,f,s=!1;t||(t={}),a=t.debug||!1;try{if(d=r(),o=document.createRange(),i=document.getSelection(),(f=document.createElement("span")).textContent=e,f.ariaHidden="true",f.style.all="unset",f.style.position="fixed",f.style.top=0,f.style.clip="rect(0, 0, 0, 0)",f.style.whiteSpace="pre",f.style.webkitUserSelect="text",f.style.MozUserSelect="text",f.style.msUserSelect="text",f.style.userSelect="text",f.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var c=n[t.format]||n.default;window.clipboardData.setData(c,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(f),o.selectNodeContents(f),i.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");s=!0}catch(b){a&&console.error("unable to copy using execCommand: ",b),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),s=!0}catch(b){a&&console.error("unable to copy using clipboardData: ",b),a&&console.error("falling back to prompt"),c=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(c,e)}}finally{i&&("function"==typeof i.removeRange?i.removeRange(o):i.removeAllRanges()),f&&document.body.removeChild(f),d()}return s}},10614:(e,t,a)=>{a(40096);var r=a(74353).Object;e.exports=function(e,t){return r.create(e,t)}},12015:(e,t,a)=>{a(15449);var r=a(74353).Object;e.exports=function(e,t,a){return r.defineProperty(e,t,a)}},1217:(e,t,a)=>{a(27403),e.exports=a(74353).Object.getPrototypeOf},96429:(e,t,a)=>{a(52015),e.exports=a(74353).Object.setPrototypeOf},65127:(e,t,a)=>{a(96819),a(40020),a(65471),a(36098),a(61040),a(51398),e.exports=a(74353).Promise},52079:(e,t,a)=>{a(81827),a(96819),a(8987),a(3655),e.exports=a(74353).Symbol},96921:(e,t,a)=>{a(40020),a(65471),e.exports=a(57705).f("iterator")},35080:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},42395:e=>{e.exports=function(){}},48953:e=>{e.exports=function(e,t,a,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(a+": incorrect invocation!");return e}},78321:(e,t,a)=>{var r=a(31084);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},83255:(e,t,a)=>{var r=a(11774),n=a(68312),c=a(13204);e.exports=function(e){return function(t,a,d){var o,i=r(t),f=n(i.length),s=c(d,f);if(e&&a!=a){for(;f>s;)if((o=i[s++])!=o)return!0}else for(;f>s;s++)if((e||s in i)&&i[s]===a)return e||s||0;return!e&&-1}}},80285:(e,t,a)=>{var r=a(74008),n=a(64027)("toStringTag"),c="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,a,d;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(a){}}(t=Object(e),n))?a:c?r(t):"Object"==(d=r(t))&&"function"==typeof t.callee?"Arguments":d}},74008:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},74353:e=>{var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},55089:(e,t,a)=>{var r=a(35080);e.exports=function(e,t,a){if(r(e),void 0===t)return e;switch(a){case 1:return function(a){return e.call(t,a)};case 2:return function(a,r){return e.call(t,a,r)};case 3:return function(a,r,n){return e.call(t,a,r,n)}}return function(){return e.apply(t,arguments)}}},25429:e=>{e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},4098:(e,t,a)=>{e.exports=!a(95949)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},32721:(e,t,a)=>{var r=a(31084),n=a(85761).document,c=r(n)&&r(n.createElement);e.exports=function(e){return c?n.createElement(e):{}}},48721:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},28212:(e,t,a)=>{var r=a(68198),n=a(69729),c=a(93350);e.exports=function(e){var t=r(e),a=n.f;if(a)for(var d,o=a(e),i=c.f,f=0;o.length>f;)i.call(e,d=o[f++])&&t.push(d);return t}},7832:(e,t,a)=>{var r=a(85761),n=a(74353),c=a(55089),d=a(32374),o=a(1496),i="prototype",f=function(e,t,a){var s,b,l,u=e&f.F,h=e&f.G,p=e&f.S,x=e&f.P,m=e&f.B,g=e&f.W,v=h?n:n[t]||(n[t]={}),y=v[i],w=h?r:p?r[t]:(r[t]||{})[i];for(s in h&&(a=t),a)(b=!u&&w&&void 0!==w[s])&&o(v,s)||(l=b?w[s]:a[s],v[s]=h&&"function"!=typeof w[s]?a[s]:m&&b?c(l,r):g&&w[s]==l?function(e){var t=function(t,a,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,a)}return new e(t,a,r)}return e.apply(this,arguments)};return t[i]=e[i],t}(l):x&&"function"==typeof l?c(Function.call,l):l,x&&((v.virtual||(v.virtual={}))[s]=l,e&f.R&&y&&!y[s]&&d(y,s,l)))};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},95949:e=>{e.exports=function(e){try{return!!e()}catch(t){return!0}}},8701:(e,t,a)=>{var r=a(55089),n=a(21693),c=a(92849),d=a(78321),o=a(68312),i=a(74727),f={},s={},b=e.exports=function(e,t,a,b,l){var u,h,p,x,m=l?function(){return e}:i(e),g=r(a,b,t?2:1),v=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(c(m)){for(u=o(e.length);u>v;v++)if((x=t?g(d(h=e[v])[0],h[1]):g(e[v]))===f||x===s)return x}else for(p=m.call(e);!(h=p.next()).done;)if((x=n(p,g,h.value,t))===f||x===s)return x};b.BREAK=f,b.RETURN=s},85761:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},1496:e=>{var t={}.hasOwnProperty;e.exports=function(e,a){return t.call(e,a)}},32374:(e,t,a)=>{var r=a(9066),n=a(99885);e.exports=a(4098)?function(e,t,a){return r.f(e,t,n(1,a))}:function(e,t,a){return e[t]=a,e}},34943:(e,t,a)=>{var r=a(85761).document;e.exports=r&&r.documentElement},75419:(e,t,a)=>{e.exports=!a(4098)&&!a(95949)((function(){return 7!=Object.defineProperty(a(32721)("div"),"a",{get:function(){return 7}}).a}))},72886:e=>{e.exports=function(e,t,a){var r=void 0===a;switch(t.length){case 0:return r?e():e.call(a);case 1:return r?e(t[0]):e.call(a,t[0]);case 2:return r?e(t[0],t[1]):e.call(a,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(a,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(a,t[0],t[1],t[2],t[3])}return e.apply(a,t)}},18544:(e,t,a)=>{var r=a(74008);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},92849:(e,t,a)=>{var r=a(60859),n=a(64027)("iterator"),c=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||c[n]===e)}},62294:(e,t,a)=>{var r=a(74008);e.exports=Array.isArray||function(e){return"Array"==r(e)}},31084:e=>{e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},21693:(e,t,a)=>{var r=a(78321);e.exports=function(e,t,a,n){try{return n?t(r(a)[0],a[1]):t(a)}catch(d){var c=e.return;throw void 0!==c&&r(c.call(e)),d}}},84301:(e,t,a)=>{"use strict";var r=a(75478),n=a(99885),c=a(33193),d={};a(32374)(d,a(64027)("iterator"),(function(){return this})),e.exports=function(e,t,a){e.prototype=r(d,{next:n(1,a)}),c(e,t+" Iterator")}},3914:(e,t,a)=>{"use strict";var r=a(79799),n=a(7832),c=a(43384),d=a(32374),o=a(60859),i=a(84301),f=a(33193),s=a(55436),b=a(64027)("iterator"),l=!([].keys&&"next"in[].keys()),u="keys",h="values",p=function(){return this};e.exports=function(e,t,a,x,m,g,v){i(a,t,x);var y,w,k,I=function(e){if(!l&&e in S)return S[e];switch(e){case u:case h:return function(){return new a(this,e)}}return function(){return new a(this,e)}},_=t+" Iterator",A=m==h,E=!1,S=e.prototype,N=S[b]||S["@@iterator"]||m&&S[m],M=N||I(m),H=m?A?I("entries"):M:void 0,T="Array"==t&&S.entries||N;if(T&&(k=s(T.call(new e)))!==Object.prototype&&k.next&&(f(k,_,!0),r||"function"==typeof k[b]||d(k,b,p)),A&&N&&N.name!==h&&(E=!0,M=function(){return N.call(this)}),r&&!v||!l&&!E&&S[b]||d(S,b,M),o[t]=M,o[_]=p,m)if(y={values:A?M:I(h),keys:g?M:I(u),entries:H},v)for(w in y)w in S||c(S,w,y[w]);else n(n.P+n.F*(l||E),t,y);return y}},54098:(e,t,a)=>{var r=a(64027)("iterator"),n=!1;try{var c=[7][r]();c.return=function(){n=!0},Array.from(c,(function(){throw 2}))}catch(d){}e.exports=function(e,t){if(!t&&!n)return!1;var a=!1;try{var c=[7],o=c[r]();o.next=function(){return{done:a=!0}},c[r]=function(){return o},e(c)}catch(d){}return a}},67323:e=>{e.exports=function(e,t){return{value:t,done:!!e}}},60859:e=>{e.exports={}},79799:e=>{e.exports=!0},87367:(e,t,a)=>{var r=a(61422)("meta"),n=a(31084),c=a(1496),d=a(9066).f,o=0,i=Object.isExtensible||function(){return!0},f=!a(95949)((function(){return i(Object.preventExtensions({}))})),s=function(e){d(e,r,{value:{i:"O"+ ++o,w:{}}})},b=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!n(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!c(e,r)){if(!i(e))return"F";if(!t)return"E";s(e)}return e[r].i},getWeak:function(e,t){if(!c(e,r)){if(!i(e))return!0;if(!t)return!1;s(e)}return e[r].w},onFreeze:function(e){return f&&b.NEED&&i(e)&&!c(e,r)&&s(e),e}}},38965:(e,t,a)=>{var r=a(85761),n=a(75187).set,c=r.MutationObserver||r.WebKitMutationObserver,d=r.process,o=r.Promise,i="process"==a(74008)(d);e.exports=function(){var e,t,a,f=function(){var r,n;for(i&&(r=d.domain)&&r.exit();e;){n=e.fn,e=e.next;try{n()}catch(c){throw e?a():t=void 0,c}}t=void 0,r&&r.enter()};if(i)a=function(){d.nextTick(f)};else if(!c||r.navigator&&r.navigator.standalone)if(o&&o.resolve){var s=o.resolve(void 0);a=function(){s.then(f)}}else a=function(){n.call(r,f)};else{var b=!0,l=document.createTextNode("");new c(f).observe(l,{characterData:!0}),a=function(){l.data=b=!b}}return function(r){var n={fn:r,next:void 0};t&&(t.next=n),e||(e=n,a()),t=n}}},40609:(e,t,a)=>{"use strict";var r=a(35080);function n(e){var t,a;this.promise=new e((function(e,r){if(void 0!==t||void 0!==a)throw TypeError("Bad Promise constructor");t=e,a=r})),this.resolve=r(t),this.reject=r(a)}e.exports.f=function(e){return new n(e)}},75478:(e,t,a)=>{var r=a(78321),n=a(54425),c=a(48721),d=a(14397)("IE_PROTO"),o=function(){},i="prototype",f=function(){var e,t=a(32721)("iframe"),r=c.length;for(t.style.display="none",a(34943).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("