diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 16573462..2bbb26c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,6 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - cache: yarn node-version: "16" - name: Install run: yarn install --frozen-lockfile @@ -26,7 +25,12 @@ jobs: - name: Lint run: yarn run lint - name: Tests - run: xvfb-run --auto-servernum yarn run test + run: xvfb-run --auto-servernum yarn run test --timeout 50000 + - uses: actions/upload-artifact@v3 + if: always() + with: + name: debug_screenshots + path: ./*.png maybe-release: name: release diff --git a/.gitignore b/.gitignore index 865307b4..b718560e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ dist /metamask .idea *.log -test/dapp/data.js \ No newline at end of file +test/dapp/data.js +*.png \ No newline at end of file diff --git a/.mocharc.yml b/.mocharc.yml new file mode 100644 index 00000000..31b24d9a --- /dev/null +++ b/.mocharc.yml @@ -0,0 +1,10 @@ +parallel: false +recursive: true +color: true +timeout: 20000 +exit: true +require: + - 'ts-node/register' + - 'test/global.ts' +spec: + - 'test/**/*.spec.ts' \ No newline at end of file diff --git a/package.json b/package.json index feab7ca5..1a85ba62 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "devDependencies": { "@jest/types": "^27.1.1", "@types/chai": "^4.2.22", - "@types/mocha": "^7.0.2", + "@types/mocha": "^9.1.1", "@typescript-eslint/eslint-plugin": "^4.15.0", "@typescript-eslint/parser": "^4.15.0", "chai": "^4.3.4", @@ -55,7 +55,7 @@ "eslint-plugin-prettier": "^3.3.1", "ganache": "^7.4.3", "jest-environment-node": "^27.1.1", - "mocha": "7.2.0", + "mocha": "^10.0.0", "prettier": "^2.2.1", "puppeteer": "14.0.0", "serve-handler": "5.0.8", diff --git a/src/helpers/selectors.ts b/src/helpers/selectors.ts index 34f499b8..bc542a5b 100644 --- a/src/helpers/selectors.ts +++ b/src/helpers/selectors.ts @@ -2,7 +2,7 @@ import { ElementHandle, Page } from 'puppeteer'; // TODO: change text() with '.'; export const getElementByContent = (page: Page, text: string, type = '*'): Promise => - page.waitForXPath(`//${type}[contains(text(), '${text}')]`); + page.waitForXPath(`//${type}[contains(text(), '${text}')]`, { timeout: 20000 }); export const getInputByLabel = ( page: Page, diff --git a/src/metamask/confirmTransaction.ts b/src/metamask/confirmTransaction.ts index 365815fc..4cdc6a2b 100644 --- a/src/metamask/confirmTransaction.ts +++ b/src/metamask/confirmTransaction.ts @@ -33,6 +33,5 @@ export const confirmTransaction = (page: Page, getSingedIn: GetSingedIn, version await clickOnButton(page, 'Save'); } - await clickOnButton(page, 'Confirm'); }; diff --git a/src/metamask/helpers/deleteAccount.ts b/src/metamask/helpers/deleteAccount.ts index 7fca795e..bf6f68b0 100644 --- a/src/metamask/helpers/deleteAccount.ts +++ b/src/metamask/helpers/deleteAccount.ts @@ -12,4 +12,5 @@ export const deleteAccount = (page: Page, version?: string) => async (accountNum await openAccountDropdown(page); await clickOnElement(page, 'Remove account'); await clickOnButton(page, 'Remove'); + await page.reload(); }; diff --git a/src/metamask/helpers/getTokenBalance.ts b/src/metamask/helpers/getTokenBalance.ts index 1763a7c0..a7506384 100644 --- a/src/metamask/helpers/getTokenBalance.ts +++ b/src/metamask/helpers/getTokenBalance.ts @@ -1,9 +1,11 @@ import { Page } from 'puppeteer'; +import { clickOnButton } from '../../helpers'; + export const getTokenBalance = (page: Page) => async (tokenSymbol: string): Promise => { await page.bringToFront(); - await page.waitForTimeout(1000); - + await clickOnButton(page, 'Assets'); + await page.waitForSelector('.asset-list-item__token-button'); const assetListItems = await page.$$('.asset-list-item__token-button'); for (let index = 0; index < assetListItems.length; index++) { diff --git a/src/metamask/sign.ts b/src/metamask/sign.ts index 670bd3f1..87a3eb35 100644 --- a/src/metamask/sign.ts +++ b/src/metamask/sign.ts @@ -10,6 +10,8 @@ export const sign = (page: Page, getSingedIn: GetSingedIn, version?: string) => if (!(await getSingedIn())) { throw new Error("You haven't signed in yet"); } + + await page.waitForTimeout(500); await page.reload(); await clickOnButton(page, 'Sign'); diff --git a/src/metamask/switchNetwork.ts b/src/metamask/switchNetwork.ts index 7468af22..7dd6f6f5 100644 --- a/src/metamask/switchNetwork.ts +++ b/src/metamask/switchNetwork.ts @@ -26,6 +26,6 @@ export const switchNetwork = (page: Page, version?: string) => async (network = const networkButton = (await page.$$('li.dropdown-menu-item'))[networkIndex]; await networkButton.click(); - + await page.reload(); await page.waitForXPath(`//*[text() = '${networkFullName}']`); }; diff --git a/src/setup/setupMetaMask.ts b/src/setup/setupMetaMask.ts index 7869ba1e..54e21b60 100644 --- a/src/setup/setupMetaMask.ts +++ b/src/setup/setupMetaMask.ts @@ -1,4 +1,4 @@ -import { Browser, Page } from 'puppeteer'; +import { Browser, BrowserContext, Page } from 'puppeteer'; import { getMetaMask } from '../metamask'; import { Dappeteer, MetaMaskOptions } from '../types'; @@ -12,12 +12,12 @@ type Step = (page: Page, options?: Options) => void; const defaultMetaMaskSteps: Step[] = [confirmWelcomeScreen, importAccount, closePopup, showTestNets]; export async function setupMetaMask( - browser: Browser, + browser: Browser | BrowserContext, options?: Options, steps: Step[] = defaultMetaMaskSteps, ): Promise { const page = await closeHomeScreen(browser); - + page.setViewport({ height: 1200, width: 800 }); // goes through the installation steps required by MetaMask for (const step of steps) { await step(page, options); @@ -26,7 +26,7 @@ export async function setupMetaMask( return getMetaMask(page); } -async function closeHomeScreen(browser: Browser): Promise { +async function closeHomeScreen(browser: Browser | BrowserContext): Promise { return new Promise((resolve, reject) => { browser.on('targetcreated', async (target) => { if (target.url().match('chrome-extension://[a-z]+/home.html')) { diff --git a/test/basic.spec.ts b/test/basic.spec.ts new file mode 100644 index 00000000..1c1115c4 --- /dev/null +++ b/test/basic.spec.ts @@ -0,0 +1,126 @@ +import { expect, use } from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Page } from 'puppeteer'; + +import * as dappeteer from '../src'; +import { clickOnLogo, openProfileDropdown } from '../src/helpers'; + +import { PASSWORD, TestContext } from './global'; +import { clickElement } from './utils/utils'; + +use(chaiAsPromised); + +describe('basic interactions', async function () { + let metamask: dappeteer.Dappeteer; + let testPage: Page; + + before(async function (this: TestContext) { + testPage = await this.browser.newPage(); + await testPage.goto('http://localhost:8080/', { waitUntil: 'networkidle0' }); + metamask = this.metamask; + try { + await clickElement(testPage, '.connect-button'); + await metamask.approve(); + } catch (e) { + //ignored + } + }); + + after(async function () { + await testPage.close(); + }); + + it('should be able to sign', async () => { + await clickElement(testPage, '.sign-button'); + + await metamask.sign(); + + await testPage.waitForSelector('#signed'); + }); + + it('should switch network', async () => { + await metamask.switchNetwork('localhost'); + + const selectedNetwork = await metamask.page.evaluate( + () => (document.querySelector('.network-display > span:nth-child(2)') as HTMLSpanElement).innerHTML, + ); + expect(selectedNetwork).to.be.equal('Localhost 8545'); + }); + + it('should return eth balance', async () => { + await metamask.switchNetwork('localhost'); + const tokenBalance: number = await metamask.helpers.getTokenBalance('ETH'); + expect(tokenBalance).to.be.greaterThan(0); + }); + + it('should return 0 token balance when token not found', async () => { + const tokenBalance: number = await metamask.helpers.getTokenBalance('FARTBUCKS'); + expect(tokenBalance).to.be.equal(0); + }); + + // TODO: cover more cases + it('should add token', async () => { + await metamask.switchNetwork('kovan'); + await metamask.addToken({ + tokenAddress: '0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa', + symbol: 'KAKI', + }); + await metamask.switchNetwork('local'); + }); + + it('should add network with required params', async () => { + await metamask.addNetwork({ + networkName: 'Binance Smart Chain', + rpc: 'https://data-seed-prebsc-1-s1.binance.org:8545/', + chainId: 97, + symbol: 'BNB', + }); + + const selectedNetwork = await metamask.page.evaluate( + () => (document.querySelector('.network-display > span:nth-child(2)') as HTMLSpanElement).innerHTML, + ); + expect(selectedNetwork).to.be.equal('Binance Smart Chain'); + await metamask.switchNetwork('local'); + }); + + it('should fail to add network with wrong chain ID', async () => { + await expect( + metamask.addNetwork({ + networkName: 'Optimistic Ethereum Testnet Kovan', + rpc: 'https://kovan.optimism.io/', + chainId: 420, + symbol: 'KUR', + }), + ).to.be.rejectedWith(SyntaxError); + + await clickOnLogo(metamask.page); + }); + + it('should import private key', async () => { + const countAccounts = async (): Promise => { + await openProfileDropdown(metamask.page); + const container = await metamask.page.$('.account-menu__accounts'); + const count = (await container.$$('.account-menu__account')).length; + await openProfileDropdown(metamask.page); + return count; + }; + + const beforeImport = await countAccounts(); + await metamask.importPK('4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b10'); + const afterImport = await countAccounts(); + + expect(beforeImport + 1).to.be.equal(afterImport); + await metamask.helpers.deleteAccount(2); + }); + + it('should throw error on wrong key', async () => { + await expect( + metamask.importPK('4f3edf983ac636a65a$@!ce7c78d9aa706d3b113bce9c46f30d7d21715b23b10'), + ).to.be.rejectedWith(SyntaxError); + }); + + it('should lock and unlock', async () => { + await metamask.lock(); + await metamask.unlock(PASSWORD); + }); +}); diff --git a/test/contract.spec.ts b/test/contract.spec.ts new file mode 100644 index 00000000..eea1c766 --- /dev/null +++ b/test/contract.spec.ts @@ -0,0 +1,60 @@ +import { expect } from 'chai'; +import { Page } from 'puppeteer'; + +import { Dappeteer } from '../src'; + +import { Contract } from './deploy'; +import { TestContext } from './global'; +import { clickElement, pause } from './utils/utils'; + +describe('contract interactions', async function () { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let contract: Contract; + let testPage: Page; + let metamask: Dappeteer; + + before(async function (this: TestContext) { + testPage = await this.browser.newPage(); + await testPage.goto('http://localhost:8080/', { waitUntil: 'load' }); + metamask = this.metamask; + contract = this.contract; + try { + await clickElement(testPage, '.connect-button'); + await metamask.approve(); + } catch (e) { + //ignored + } + }); + + after(async function (this: TestContext) { + await testPage.close(); + }); + + it('should have increased count', async () => { + await metamask.switchAccount(1); + await metamask.switchNetwork('local'); + await pause(1); + const counterBefore = await getCounterNumber(contract); + // click increase button + await clickElement(testPage, '.increase-button'); + await pause(1); + // submit tx + await metamask.confirmTransaction(); + await testPage.waitForSelector('#txSent'); + await pause(1); + + const counterAfter = await getCounterNumber(contract); + + expect(counterAfter).to.be.equal(counterBefore + 1); + await metamask.switchNetwork('main'); + }); +}); + +function getCounterNumber(contract): Promise { + return contract.methods + .count() + .call() + .then((res) => { + return Number(res); + }); +} diff --git a/test/dapp/main.js b/test/dapp/main.js index 9ddbda58..e0ec49ca 100644 --- a/test/dapp/main.js +++ b/test/dapp/main.js @@ -1,11 +1,12 @@ async function start() { - const web3 = new Web3(window.web3.currentProvider); + let accounts = []; + + const web3 = new Web3(window.ethereum); console.log(web3); const counterContract = new web3.eth.Contract(ContractInfo.abi, ContractInfo.address); const increaseButton = document.querySelector('.increase-button'); increaseButton.addEventListener('click', async function () { - const accounts = await web3.eth.getAccounts(); await counterContract.methods.increase().send({ from: accounts[0] }); const txSent = document.createElement('div'); txSent.id = 'txSent'; @@ -14,7 +15,6 @@ async function start() { const increaseFeesButton = document.querySelector('.increase-fees-button'); increaseFeesButton.addEventListener('click', async function () { - const accounts = await web3.eth.getAccounts(); await counterContract.methods.increase().send({ from: accounts[0] }); const txSent = document.createElement('div'); txSent.id = 'feesTxSent'; @@ -23,7 +23,7 @@ async function start() { const connectButton = document.querySelector('.connect-button'); connectButton.addEventListener('click', async function () { - await ethereum.enable(); + accounts = await web3.eth.requestAccounts(); const connected = document.createElement('div'); connected.id = 'connected'; document.body.appendChild(connected); @@ -31,8 +31,8 @@ async function start() { const signButton = document.querySelector('.sign-button'); signButton.addEventListener('click', async function () { - const accounts = await web3.eth.getAccounts(); - await web3.eth.personal.sign('TEST', accounts[0]); + const message = web3.utils.sha3('TEST'); + await web3.eth.sign(message, accounts[0]); const signed = document.createElement('div'); signed.id = 'signed'; document.body.appendChild(signed); @@ -40,7 +40,6 @@ async function start() { const transferButton = document.querySelector('.transfer-button'); transferButton.addEventListener('click', async function () { - const accounts = await web3.eth.getAccounts(); await web3.eth.sendTransaction({ to: accounts[0], from: accounts[0], value: web3.utils.toWei('0.01') }); const transfer = document.createElement('div'); transfer.id = 'transferred'; diff --git a/test/dapp/web3.min.js b/test/dapp/web3.min.js index eeb73ee8..e9d2a9d1 100644 --- a/test/dapp/web3.min.js +++ b/test/dapp/web3.min.js @@ -1 +1,74 @@ -"use strict";var _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(t){return void 0===t?"undefined":_typeof2(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":_typeof2(t)};!function(t){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Web3=t()}}(function(){var define,module,exports;return function(){return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var c=r[a]={exports:{}};e[a][0].call(c.exports,function(t){var r=e[a][1][t];return i(r||t)},c,c.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function h(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=s.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var u=1,f=n.length;f>=256;f>>=8)u++;(o=new i(2+u))[0]=a,o[1]=128|u;f=1+u;for(var c=n.length;c>0;f--,c>>=8)o[f]=255&c;return this._createEncoderBuffer([o,n])},f.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new i(2*t.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(n=0;n=128;a>>=7)o++}var s=new i(o),u=s.length-1;for(n=t.length-1;n>=0;n--){a=t[n];for(s[u--]=127&a;(a>>=7)>0;)s[u--]=128|127&a}return this._createEncoderBuffer(s)},f.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[c(n.getFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[c(n.getFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new i(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=new i(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);n=1;for(var a=t;a>=256;a>>=8)n++;for(a=(o=new Array(n)).length-1;a>=0;a--)o[a]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},f.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},f.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},f.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n0?u-4:u;var c=0;for(e=0;e>16&255,s[c++]=n>>8&255,s[c++]=255&n;2===a?(n=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,s[c++]=255&n):1===a&&(n=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,s[c++]=n>>8&255,s[c++]=255&n);return s},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o="",a=[],s=0,u=r-i;su?u:s+16383));1===i?(e=t[r-1],o+=n[e>>2],o+=n[e<<4&63],o+="=="):2===i&&(e=(t[r-2]<<8)+t[r-1],o+=n[e>>10],o+=n[e>>4&63],o+=n[e<<2&63],o+="=");return a.push(o),a.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function c(t,e,r){for(var i,o,a=[],s=e;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],16:[function(t,e,r){var n;function i(t){this.rand=t}if(e.exports=function(t){return n||(n=new i(null)),n.generate(t)},e.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r>>24]^c[p>>>16&255]^h[b>>>8&255]^d[255&m]^e[y++],a=f[p>>>24]^c[b>>>16&255]^h[m>>>8&255]^d[255&l]^e[y++],s=f[b>>>24]^c[m>>>16&255]^h[l>>>8&255]^d[255&p]^e[y++],u=f[m>>>24]^c[l>>>16&255]^h[p>>>8&255]^d[255&b]^e[y++],l=o,p=a,b=s,m=u;return o=(n[l>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&m])^e[y++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[m>>>8&255]<<8|n[255&l])^e[y++],s=(n[b>>>24]<<24|n[m>>>16&255]<<16|n[l>>>8&255]<<8|n[255&p])^e[y++],u=(n[m>>>24]<<24|n[l>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^e[y++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var f=s^s<<1^s<<2^s<<3^s<<4;f=f>>>8^255&f^99,r[a]=f,n[f]=a;var c=t[a],h=t[c],d=t[h],l=257*t[f]^16843008*f;i[0][a]=l<<24|l>>>8,i[1][a]=l<<16|l>>>16,i[2][a]=l<<8|l>>>24,i[3][a]=l,l=16843009*d^65537*h^257*c^16843008*a,o[0][f]=l<<24|l>>>8,o[1][f]=l<<16|l>>>16,o[2][f]=l<<8|l>>>24,o[3][f]=l,0===a?a=s=1:(a=c^t[t[t[d^c]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function f(t){this._key=i(t),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var f=[],c=0;c>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},f.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},f.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},f.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=f},{"safe-buffer":147}],19:[function(t,e,r){var n=t("./aes"),i=t("safe-buffer").Buffer,o=t("cipher-base"),a=t("inherits"),s=t("./ghash"),u=t("buffer-xor"),f=t("./incr32");function c(t,e,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var c=this._cipher.encryptBlock(u);this._ghash=new s(c),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new s(r),o=e.length,a=o%16;n.update(e),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,c=i.alloc(8);c.writeUIntBE(u,0,8),n.update(c),t._finID=n.state;var h=i.from(t._finID);return f(h),h}(this,r,c),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}a(c,o),c.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=f(e,!1,r.key,r.iv);return d(t,n.key,n.iv)},r.createDecipheriv=d},{"./aes":18,"./authCipher":19,"./modes":31,"./streamCipher":34,"cipher-base":48,evp_bytestokey:84,inherits:101,"safe-buffer":147}],22:[function(t,e,r){var n=t("./modes"),i=t("./authCipher"),o=t("safe-buffer").Buffer,a=t("./streamCipher"),s=t("cipher-base"),u=t("./aes"),f=t("evp_bytestokey");function c(t,e,r){s.call(this),this._cache=new d,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}t("inherits")(c,s),c.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var h=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function l(t,e,r){var s=n[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,e,r):"auth"===s.type?new i(s.module,e,r):new c(s.module,e,r)}c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},d.prototype.add=function(t){this.cache=o.concat([this.cache,t])},d.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},d.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},e.exports=a},{"safe-buffer":147}],24:[function(t,e,r){e.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},{}],25:[function(t,e,r){var n=t("buffer-xor");r.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},r.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},{"buffer-xor":46}],26:[function(t,e,r){var n=t("safe-buffer").Buffer,i=t("buffer-xor");function o(t,e,r){var o=e.length,a=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:a]),a}r.encrypt=function(t,e,r){for(var i,a=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){a=n.concat([a,o(t,e,r)]);break}i=t._cache.length,a=n.concat([a,o(t,e.slice(0,i),r)]),e=e.slice(i)}return a}},{"buffer-xor":46,"safe-buffer":147}],27:[function(t,e,r){var n=t("safe-buffer").Buffer;function i(t,e,r){for(var n,i,a=-1,s=0;++a<8;)n=e&1<<7-a?128:0,s+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>a%8,t._prev=o(t._prev,r?n:i);return s}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i>7;return o}r.encrypt=function(t,e,r){for(var o=e.length,a=n.allocUnsafe(o),s=-1;++s=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new n(i(e));return r}e.exports=o,o.getr=a}).call(this,t("buffer").Buffer)},{"bn.js":"BN",buffer:47,randombytes:131}],39:[function(t,e,r){e.exports=t("./browser/algorithms.json")},{"./browser/algorithms.json":40}],40:[function(t,e,r){e.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],41:[function(t,e,r){e.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],42:[function(t,e,r){(function(r){var n=t("create-hash"),i=t("stream"),o=t("inherits"),a=t("./sign"),s=t("./verify"),u=t("./algorithms.json");function f(t){i.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function c(t){i.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){return new f(t)}function d(t){return new c(t)}Object.keys(u).forEach(function(t){u[t].id=new r(u[t].id,"hex"),u[t.toLowerCase()]=u[t]}),o(f,i.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return"string"==typeof t&&(t=new r(t,e)),this._hash.update(t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=a(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},o(c,i.Writable),c.prototype._write=function(t,e,r){this._hash.update(t),r()},c.prototype.update=function(t,e){return"string"==typeof t&&(t=new r(t,e)),this._hash.update(t),this},c.prototype.verify=function(t,e,n){"string"==typeof e&&(e=new r(e,n)),this.end();var i=this._hash.digest();return s(e,i,t,this._signType,this._tag)},e.exports={Sign:h,Verify:d,createSign:h,createVerify:d}}).call(this,t("buffer").Buffer)},{"./algorithms.json":40,"./sign":43,"./verify":44,buffer:47,"create-hash":51,inherits:101,stream:156}],43:[function(t,e,r){(function(r){var n=t("create-hmac"),i=t("browserify-rsa"),o=t("elliptic").ec,a=t("bn.js"),s=t("parse-asn1"),u=t("./curves.json");function f(t,e,i,o){if((t=new r(t.toArray())).length0&&r.ishrn(n),r}function h(t,e,i){var o,a;do{for(o=new r(0);8*o.length=e)throw new Error("invalid sig")}e.exports=function(t,e,u,f,c){var h=o(u);if("ec"===h.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(t,e,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new i(n),s=r.data.subjectPrivateKey.data;return o.verify(e,t,s)}(t,e,h)}if("dsa"===h.type){if("dsa"!==f)throw new Error("wrong public key type");return function(t,e,r){var i=r.data.p,a=r.data.q,u=r.data.g,f=r.data.pub_key,c=o.signature.decode(t,"der"),h=c.s,d=c.r;s(h,a),s(d,a);var l=n.mont(i),p=h.invm(a);return 0===u.toRed(l).redPow(new n(e).mul(p).mod(a)).fromRed().mul(f.toRed(l).redPow(d.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(d)}(t,e,h)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");e=r.concat([c,e]);for(var d=h.modulus.byteLength(),l=[1],p=0;e.length+l.length+2o)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=s.prototype,e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(t)}return u(t,e,r)}function u(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return N(t)?function(t,e,r){if(e<0||t.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function l(t,e){if(s.isBuffer(t))return t.length;if(L(t)||N(t))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return P(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(t).length;default:if(n)return P(t).length;e=(""+e).toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),F(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function f(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var h=!0,d=0;di&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:f>223?3:f>191?2:1;if(i+h<=r)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(t){var e=t.length;if(e<=_)return String.fromCharCode.apply(String,t);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return w(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return g(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},s.prototype.compare=function(t,e,r,n,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),u=Math.min(o,a),f=this.slice(n,i),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o,a,s,u,f,c,h,d,l,p=!1;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return d=e,l=r,O(P(t,(h=this).length-d),h,d,l);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return v(this,t,e,r);case"base64":return u=this,f=e,c=r,O(R(t),u,f,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=e,s=r,O(function(t,e){for(var r,n,i,o=[],a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,(o=this).length-a),o,a,s);default:if(p)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function A(t,e,r,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||A(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n)||A(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function R(t){return n.toByteArray(function(t){if((t=t.trim().replace(T,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function O(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function N(t){return t instanceof ArrayBuffer||null!=t&&null!=t.constructor&&"ArrayBuffer"===t.constructor.name&&"number"==typeof t.byteLength}function L(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function F(t){return t!=t}},{"base64-js":15,ieee754:99}],48:[function(t,e,r){var n=t("safe-buffer").Buffer,i=t("stream").Transform,o=t("string_decoder").StringDecoder;function a(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}t("inherits")(a,i),a.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},e.exports=a},{inherits:101,"safe-buffer":147,stream:156,string_decoder:157}],49:[function(t,e,r){(function(t){function e(t){return Object.prototype.toString.call(t)}r.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},r.isBoolean=function(t){return"boolean"==typeof t},r.isNull=function(t){return null===t},r.isNullOrUndefined=function(t){return null==t},r.isNumber=function(t){return"number"==typeof t},r.isString=function(t){return"string"==typeof t},r.isSymbol=function(t){return"symbol"===(void 0===t?"undefined":_typeof(t))},r.isUndefined=function(t){return void 0===t},r.isRegExp=function(t){return"[object RegExp]"===e(t)},r.isObject=function(t){return"object"===(void 0===t?"undefined":_typeof(t))&&null!==t},r.isDate=function(t){return"[object Date]"===e(t)},r.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},r.isFunction=function(t){return"function"==typeof t},r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"===(void 0===t?"undefined":_typeof(t))||void 0===t},r.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":102}],50:[function(t,e,r){(function(r){var n=t("elliptic"),i=t("bn.js");e.exports=function(t){return new a(t)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(t){this.curveType=o[t],this.curveType||(this.curveType={name:t}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function s(t,e,n){Array.isArray(t)||(t=t.toArray());var i=new r(t);if(n&&i.length>>2),a=0,s=0;a>5]|=128<>>9<<4)]=e;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,h=0;h>>32-s,r);var a,s}function a(t,e,r,n,i,a,s){return o(e&r|~e&n,t,e,i,a,s)}function s(t,e,r,n,i,a,s){return o(e&n|r&~n,t,e,i,a,s)}function u(t,e,r,n,i,a,s){return o(e^r^n,t,e,i,a,s)}function f(t,e,r,n,i,a,s){return o(r^(e|~n),t,e,i,a,s)}function c(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}e.exports=function(t){return n(t,i)}},{"./make-hash":52}],54:[function(t,e,r){var n=t("inherits"),i=t("./legacy"),o=t("cipher-base"),a=t("safe-buffer").Buffer,s=t("create-hash/md5"),u=t("ripemd160"),f=t("sha.js"),c=a.alloc(128);function h(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:f(t)).update(e).digest():e.lengths?e=t(e):e.length0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];r=a.r28shl(r,s),i=a.r28shl(i,s),a.pc2(r,i,t.keys,o)}},u.prototype._update=function(t,e,r,n){var i=this._desState,o=a.readUInt32BE(t,e),s=a.readUInt32BE(t,e+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(r,o,n),a.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n>>0,o=d}a.rip(s,o,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var o=r,s=e,u=t.keys.length-2;u>=0;u-=2){var f=t.keys[u],c=t.keys[u+1];a.expand(o,t.tmp,0),f^=t.tmp[0],c^=t.tmp[1];var h=a.substitute(f,c),d=o;o=(s^a.permute(h))>>>0,s=d}a.rip(o,s,n,i)}},{"../des":57,inherits:101,"minimalistic-assert":107}],61:[function(t,e,r){var n=t("minimalistic-assert"),i=t("inherits"),o=t("../des"),a=o.Cipher,s=o.DES;function u(t){a.call(this,t);var e=new function(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}(this.type,this.options.key);this._edeState=e}i(u,a),e.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},{"../des":57,inherits:101,"minimalistic-assert":107}],62:[function(t,e,r){r.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},r.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},r.ip=function(t,e,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},r.rip=function(t,e,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.pc1=function(t,e,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.r28shl=function(t,e){return t<>>28-e};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(t,e,r,i){for(var o=0,a=0,s=n.length>>>1,u=0;u>>n[u]&1;for(u=s;u>>n[u]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},r.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(t,e){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(t>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(e>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(t){for(var e=0,r=0;r>>o[r]&1;return e>>>0},r.padSplit=function(t,e,r){for(var n=t.toString(2);n.lengtht;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(f))for(;r.mod(c).cmp(h);)r.iadd(l)}else for(;r.mod(o).cmp(d);)r.iadd(l);if(b(p=r.shrn(1))&&b(r)&&m(p)&&m(r)&&a.test(p)&&a.test(r))return r}}},{"bn.js":"BN","miller-rabin":106,randombytes:131}],66:[function(t,e,r){e.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],67:[function(t,e,r){var n=r;n.version=t("../package.json").version,n.utils=t("./elliptic/utils"),n.rand=t("brorand"),n.curve=t("./elliptic/curve"),n.curves=t("./elliptic/curves"),n.ec=t("./elliptic/ec"),n.eddsa=t("./elliptic/eddsa")},{"../package.json":82,"./elliptic/curve":70,"./elliptic/curves":73,"./elliptic/ec":74,"./elliptic/eddsa":77,"./elliptic/utils":81,brorand:16}],68:[function(t,e,r){var n=t("bn.js"),i=t("../../elliptic").utils,o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(t,e){this.curve=t,this.type=e,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),n=o(e,1),i=(1<=u;e--)f=(f<<1)+n[e];a.push(f)}for(var c=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(u=0;u=0;f--){for(e=0;f>=0&&0===a[f];f--)e++;if(f>=0&&e++,u=u.dblp(e),f<0)break;var c=a[f];s(0!==c),u="affine"===t.type?c>0?u.mixedAdd(i[c-1>>1]):u.mixedAdd(i[-c-1>>1].neg()):c>0?u.add(i[c-1>>1]):u.add(i[-c-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,f=this._wnafT3,c=0,h=0;h=1;h-=2){var l=h-1,p=h;if(1===s[l]&&1===s[p]){var b=[e[l],null,null,e[p]];0===e[l].y.cmp(e[p].y)?(b[1]=e[l].add(e[p]),b[2]=e[l].toJ().mixedAdd(e[p].neg())):0===e[l].y.cmp(e[p].y.redNeg())?(b[1]=e[l].toJ().mixedAdd(e[p]),b[2]=e[l].add(e[p].neg())):(b[1]=e[l].toJ().mixedAdd(e[p]),b[2]=e[l].toJ().mixedAdd(e[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],y=a(r[l],r[p]);c=Math.max(y[0].length,c),f[l]=new Array(c),f[p]=new Array(c);for(var v=0;v=0;h--){for(var x=0;h>=0;){var k=!0;for(v=0;v=0&&x++,_=_.dblp(x),h<0)break;for(v=0;v0?S=u[v][E-1>>1]:E<0&&(S=u[v][-E-1>>1].neg()),_="affine"===S.type?_.mixedAdd(S):_.add(S))}}for(h=0;h=Math.ceil((t.bitLength()+1)/e.step)},f.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),a=o.redSub(r),s=n.redSub(e),u=i.redMul(a),f=o.redMul(s),c=i.redMul(s),h=a.redMul(o);return this.curve.point(u,f,h,c)},c.prototype._projDbl=function(){var t,e,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(f=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),e=a.redMul(f.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);t=n.redSub(i).redISub(o).redMul(u),e=a.redMul(f.redSub(o)),r=a.redMul(u)}}else{var f=i.redAdd(o);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=f.redSub(s).redSub(s);t=this.curve._mulC(n.redISub(f)).redMul(u),e=this.curve._mulC(f).redMul(i.redISub(o)),r=f.redMul(u)}return this.curve.point(t,e,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(e),f=o.redMul(a),c=s.redMul(u),h=o.redMul(u),d=a.redMul(s);return this.curve.point(f,c,d,h)},c.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),f=i.redAdd(s),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),h=n.redMul(u).redMul(c);return this.curve.twisted?(e=n.redMul(f).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(f)):(e=n.redMul(f).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(f)),this.curve.point(h,e,r)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},c.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}return!1},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},{"../../elliptic":67,"../curve":70,"bn.js":"BN",inherits:101}],70:[function(t,e,r){var n=r;n.base=t("./base"),n.short=t("./short"),n.mont=t("./mont"),n.edwards=t("./edwards")},{"./base":68,"./edwards":69,"./mont":71,"./short":72}],71:[function(t,e,r){var n=t("../curve"),i=t("bn.js"),o=t("inherits"),a=n.base,s=t("../../elliptic").utils;function u(t){a.call(this,"mont",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(t,e,r){a.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(e,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(u,a),e.exports=u,u.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},o(f,a.BasePoint),u.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},u.prototype.point=function(t,e){return new f(this,t,e)},u.prototype.pointFromJSON=function(t){return f.fromJSON(this,t)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(t,e){return new f(t,e[0],e[1]||t.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=i.redMul(n),s=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},f.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":67,"../curve":70,"bn.js":"BN",inherits:101}],72:[function(t,e,r){var n=t("../curve"),i=t("../../elliptic"),o=t("bn.js"),a=t("inherits"),s=n.base,u=i.utils.assert;function f(t){s.call(this,"short",t),this.a=new o(t.a,16).toRed(this.red),this.b=new o(t.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(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(e,16),this.y=new o(r,16),n&&(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 h(t,e,r,n){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(e,16),this.y=new o(r,16),this.z=new o(n,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}a(f,s),e.exports=f,f.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new o(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new o(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],u(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map(function(t){return{a:new o(t.a,16),b:new o(t.b,16)}}):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:o.mont(t),r=new o(2).toRed(e).redInvm(),n=r.redNeg(),i=new o(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},f.prototype._getEndoBasis=function(t){for(var e,r,n,i,a,s,u,f,c,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,l=this.n.clone(),p=new o(1),b=new o(0),m=new o(0),y=new o(1),v=0;0!==d.cmpn(0);){var g=l.div(d);f=l.sub(g.mul(d)),c=m.sub(g.mul(p));var w=y.sub(g.mul(b));if(!n&&f.cmp(h)<0)e=u.neg(),r=p,n=f.neg(),i=c;else if(n&&2==++v)break;u=f,l=d,d=f,m=p,p=c,y=b,b=w}a=f.neg(),s=c;var _=n.sqr().add(i.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=e,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},f.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),f=o.mul(n.b);return{k1:t.sub(a).sub(s),k2:u.add(f).neg()}},f.prototype.pointFromX=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},f.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},f.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new o(t,16),this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(h,s.BasePoint),f.prototype.jpoint=function(t,e,r){return new h(this,t,e,r)},h.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},h.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},h.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=s.redSqr(),c=f.redMul(s),h=n.redMul(f),d=u.redSqr().redIAdd(c).redISub(h).redISub(h),l=u.redMul(h.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(d,l,p)},h.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),f=u.redMul(a),c=r.redMul(u),h=s.redSqr().redIAdd(f).redISub(c).redISub(c),d=s.redMul(c.redISub(h)).redISub(i.redMul(f)),l=this.z.redMul(a);return this.curve.jpoint(h,d,l)},h.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":67,"../curve":70,"bn.js":"BN",inherits:101}],73:[function(t,e,r){var n,i=r,o=t("hash.js"),a=t("../elliptic"),s=a.utils.assert;function u(t){"short"===t.type?this.curve=new a.curve.short(t):"edwards"===t.type?this.curve=new a.curve.edwards(t):this.curve=new a.curve.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,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:o.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:o.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:o.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:o.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:o.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:o.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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=t("./precomputed/secp256k1")}catch(t){n=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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"../elliptic":67,"./precomputed/secp256k1":80,"hash.js":86}],74:[function(t,e,r){var n=t("bn.js"),i=t("hmac-drbg"),o=t("../../elliptic"),a=o.utils.assert,s=t("./key"),u=t("./signature");function f(t){if(!(this instanceof f))return new f(t);"string"==typeof t&&(a(o.curves.hasOwnProperty(t),"Unknown curve "+t),t=o.curves[t]),t instanceof o.curves.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}e.exports=f,f.prototype.keyPair=function(t){return new s(this,t)},f.prototype.keyFromPrivate=function(t,e){return s.fromPrivate(this,t,e)},f.prototype.keyFromPublic=function(t,e){return s.fromPublic(this,t,e)},f.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||o.rand(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},f.prototype.sign=function(t,e,r,o){"object"===(void 0===r?"undefined":_typeof(r))&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),f=t.toArray("be",a),c=new i({hash:this.hash,entropy:s,nonce:f,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),d=0;;d++){var l=o.k?o.k(d):new n(c.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(h)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var b=p.getX(),m=b.umod(this.n);if(0!==m.cmpn(0)){var y=l.invm(this.n).mul(m.mul(e.getPrivate()).iadd(t));if(0!==(y=y.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==b.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),v^=1),new u({r:m,s:y,recoveryParam:v})}}}}}},f.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new u(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,f=a.invm(this.n),c=f.mul(t).umod(this.n),h=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(t,e,r,i){a((3&r)===r,"The recovery param is more than two bits"),e=new u(e,i);var o=this.n,s=new n(t),f=e.r,c=e.s,h=1&r,d=r>>1;if(f.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");f=d?this.curve.pointFromX(f.add(this.curve.n),h):this.curve.pointFromX(f,h);var l=e.r.invm(o),p=o.sub(s).mul(l).umod(o),b=c.mul(l).umod(o);return this.g.mulAdd(p,f,b)},f.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new u(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":67,"./key":75,"./signature":76,"bn.js":"BN","hmac-drbg":98}],75:[function(t,e,r){var n=t("bn.js"),i=t("../../elliptic").utils.assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}e.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.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"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return""}},{"../../elliptic":67,"bn.js":"BN"}],76:[function(t,e,r){var n=t("bn.js"),i=t("../../elliptic").utils,o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(t,e){var r=t[e.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,a=e.place;o>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}e.exports=a,a.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new function(){this.place=0};if(48!==t[r.place++])return!1;if(s(t,r)+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var o=s(t,r),a=t.slice(r.place,o+r.place);if(r.place+=o,2!==t[r.place++])return!1;var u=s(t,r);if(t.length!==u+r.place)return!1;var f=t.slice(r.place,u+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new n(a),this.s=new n(f),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=u(e),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,e.length),(n=n.concat(e)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,t)}},{"../../elliptic":67,"bn.js":"BN"}],77:[function(t,e,r){var n=t("hash.js"),i=t("../../elliptic"),o=i.utils,a=o.assert,s=o.parseBytes,u=t("./key"),f=t("./signature");function c(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof c))return new c(t);t=i.curves[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(t,e){t=s(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},c.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var t=this.hash(),e=0;e=0;){var o;if(i.isOdd()){var a=i.andln(n-1);o=a>(n>>1)-1?(n>>1)-a:a,i.isubn(o)}else o=0;r.push(o);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?e+1:1,u=1;u0||e.cmpn(-i)>0;){var o,a,s,u=t.andln(3)+n&3,f=e.andln(3)+i&3;3===u&&(u=-1),3===f&&(f=-1),o=0==(1&u)?0:3!=(s=t.andln(7)+n&7)&&5!==s||2!==f?u:-u,r[0].push(o),a=0==(1&f)?0:3!=(s=e.andln(7)+i&7)&&5!==s||2!==u?f:-f,r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},{"bn.js":"BN","minimalistic-assert":107,"minimalistic-crypto-utils":108}],82:[function(t,e,r){e.exports={_args:[[{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},"/Users/frozeman/Sites/_ethereum/web3/node_modules/browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.4.0",_inCache:!0,_location:"/elliptic",_nodeVersion:"7.0.0",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"},_npmUser:{name:"indutny",email:"fedor@indutny.com"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh","/secp256k1"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"/Users/frozeman/Sites/_ethereum/web3/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"},files:["lib"],gitHead:"6b0d2b76caae91471649c8e21f0b1d3ba0f96090",homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],83:[function(t,e,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"object"===(void 0===t?"undefined":_typeof(t))&&null!==t}function a(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,r,n,s,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(a(r=this._events[t]))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),n=(f=r.slice()).length,u=0;u0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){if(!i(e))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var r,n,a,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(a=(r=this._events[t]).length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],84:[function(t,e,r){var n=t("safe-buffer").Buffer,i=t("md5.js");e.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),f=n.alloc(0);a>0||o>0;){var c=new i;c.update(f),c.update(t),e&&c.update(e),f=c.digest();var h=0;if(a>0){var d=s.length-a;h=Math.min(a,f.length),f.copy(s,d,0,h),a-=h}if(h0){var l=u.length-o,p=Math.min(o,f.length-h);f.copy(u,l,h,h+p),o-=p}}return f.fill(0),{key:s,iv:u}}},{"md5.js":104,"safe-buffer":147}],85:[function(t,e,r){(function(r){var n=t("stream").Transform;function i(t){n.call(this),this._block=new r(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t("inherits")(i,n),i.prototype._transform=function(t,e,n){var i=null;try{"buffer"!==e&&(t=new r(t,e)),this.update(t)}catch(t){i=t}n(i)},i.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},i.prototype.update=function(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=new r(t,e||"binary"));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},i.prototype._update=function(t){throw new Error("_update is not implemented")},i.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();return void 0!==t&&(e=e.toString(t)),e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i}).call(this,t("buffer").Buffer)},{buffer:47,inherits:101,stream:156}],86:[function(t,e,r){var n=r;n.utils=t("./hash/utils"),n.common=t("./hash/common"),n.sha=t("./hash/sha"),n.ripemd=t("./hash/ripemd"),n.hmac=t("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":87,"./hash/hmac":88,"./hash/ripemd":89,"./hash/sha":90,"./hash/utils":97}],87:[function(t,e,r){var n=t("./utils"),i=t("minimalistic-assert");function o(){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}r.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e>>3},r.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},{"../utils":97}],97:[function(t,e,r){var n=t("minimalistic-assert"),i=t("inherits");function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function s(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}r.inherits=i,r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n>8,a=255&i;o?r.push(o,a):r.push(a)}else for(n=0;n>>0}return a},r.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(t,e){return t>>>e|t<<32-e},r.rotl32=function(t,e){return t<>>32-e},r.sum32=function(t,e){return t+e>>>0},r.sum32_3=function(t,e,r){return t+e+r>>>0},r.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},r.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},r.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o>>0,t[e+1]=o},r.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},r.sum64_lo=function(t,e,r,n){return e+n>>>0},r.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,f=e;return u+=(f=f+n>>>0)>>0)>>0)>>0},r.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},r.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,f){var c=0,h=e;return c+=(h=h+n>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,f){return e+n+o+s+f>>>0},r.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},r.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},r.shr64_hi=function(t,e,r){return t>>>r},r.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},{inherits:101,"minimalistic-assert":107}],98:[function(t,e,r){var n=t("hash.js"),i=t("minimalistic-crypto-utils"),o=t("minimalistic-assert");function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}e.exports=a,a.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length>1,c=-7,h=r?i-1:0,d=r?-1:1,l=t[e+h];for(h+=d,o=l&(1<<-c)-1,l>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+h],h+=d,c-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(l?-1:1);a+=Math.pow(2,n),o-=f}return(l?-1:1)*a*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var a,s,u,f=8*o-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+l]=255&s,l+=p,s/=256,i-=8);for(a=a<0;t[r+l]=255&a,l+=p,a/=256,f-=8);t[r+l-p]|=128*b}},{}],100:[function(t,e,r){var n=[].indexOf;e.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r>>32-e}function u(t,e,r,n,i,o,a){return s(t+(e&r|~e&n)+i+o|0,a)+e|0}function f(t,e,r,n,i,o,a){return s(t+(e&n|r&~n)+i+o|0,a)+e|0}function c(t,e,r,n,i,o,a){return s(t+(e^r^n)+i+o|0,a)+e|0}function h(t,e,r,n,i,o,a){return s(t+(r^(e|~n))+i+o|0,a)+e|0}n(a,i),a.prototype._update=function(){for(var t=o,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,a=this._d;n=h(n=h(n=h(n=h(n=c(n=c(n=c(n=c(n=f(n=f(n=f(n=f(n=u(n=u(n=u(n=u(n,i=u(i,a=u(a,r=u(r,n,i,a,t[0],3614090360,7),n,i,t[1],3905402710,12),r,n,t[2],606105819,17),a,r,t[3],3250441966,22),i=u(i,a=u(a,r=u(r,n,i,a,t[4],4118548399,7),n,i,t[5],1200080426,12),r,n,t[6],2821735955,17),a,r,t[7],4249261313,22),i=u(i,a=u(a,r=u(r,n,i,a,t[8],1770035416,7),n,i,t[9],2336552879,12),r,n,t[10],4294925233,17),a,r,t[11],2304563134,22),i=u(i,a=u(a,r=u(r,n,i,a,t[12],1804603682,7),n,i,t[13],4254626195,12),r,n,t[14],2792965006,17),a,r,t[15],1236535329,22),i=f(i,a=f(a,r=f(r,n,i,a,t[1],4129170786,5),n,i,t[6],3225465664,9),r,n,t[11],643717713,14),a,r,t[0],3921069994,20),i=f(i,a=f(a,r=f(r,n,i,a,t[5],3593408605,5),n,i,t[10],38016083,9),r,n,t[15],3634488961,14),a,r,t[4],3889429448,20),i=f(i,a=f(a,r=f(r,n,i,a,t[9],568446438,5),n,i,t[14],3275163606,9),r,n,t[3],4107603335,14),a,r,t[8],1163531501,20),i=f(i,a=f(a,r=f(r,n,i,a,t[13],2850285829,5),n,i,t[2],4243563512,9),r,n,t[7],1735328473,14),a,r,t[12],2368359562,20),i=c(i,a=c(a,r=c(r,n,i,a,t[5],4294588738,4),n,i,t[8],2272392833,11),r,n,t[11],1839030562,16),a,r,t[14],4259657740,23),i=c(i,a=c(a,r=c(r,n,i,a,t[1],2763975236,4),n,i,t[4],1272893353,11),r,n,t[7],4139469664,16),a,r,t[10],3200236656,23),i=c(i,a=c(a,r=c(r,n,i,a,t[13],681279174,4),n,i,t[0],3936430074,11),r,n,t[3],3572445317,16),a,r,t[6],76029189,23),i=c(i,a=c(a,r=c(r,n,i,a,t[9],3654602809,4),n,i,t[12],3873151461,11),r,n,t[15],530742520,16),a,r,t[2],3299628645,23),i=h(i,a=h(a,r=h(r,n,i,a,t[0],4096336452,6),n,i,t[7],1126891415,10),r,n,t[14],2878612391,15),a,r,t[5],4237533241,21),i=h(i,a=h(a,r=h(r,n,i,a,t[12],1700485571,6),n,i,t[3],2399980690,10),r,n,t[10],4293915773,15),a,r,t[1],2240044497,21),i=h(i,a=h(a,r=h(r,n,i,a,t[8],1873313359,6),n,i,t[15],4264355552,10),r,n,t[6],2734768916,15),a,r,t[13],1309151649,21),i=h(i,a=h(a,r=h(r,n,i,a,t[4],4149444226,6),n,i,t[11],3174756917,10),r,n,t[2],718787259,15),a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new r(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},e.exports=a}).call(this,t("buffer").Buffer)},{buffer:47,"hash-base":105,inherits:101}],105:[function(t,e,r){var n=t("safe-buffer").Buffer,i=t("stream").Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t("inherits")(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},{inherits:101,"safe-buffer":147,stream:156}],106:[function(t,e,r){var n=t("bn.js"),i=t("brorand");function o(t){this.rand=t||new i.Rand}e.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),a=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var f=t.shrn(u),c=s.toRed(o);e>0;e--){var h=this._randrange(new n(2),s);r&&r(h);var d=h.toRed(o).redPow(f);if(0!==d.cmp(a)&&0!==d.cmp(c)){for(var l=1;l0;e--){var c=this._randrange(new n(2),a),h=t.gcd(c);if(0!==h.cmpn(1))return h;var d=c.toRed(i).redPow(u);if(0!==d.cmp(o)&&0!==d.cmp(f)){for(var l=1;l>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(t,e){return"hex"===e?o(t):t}},{}],109:[function(t,e,r){e.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],110:[function(t,e,r){var n=t("asn1.js");r.certificate=t("./certificate");var i=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=a;var s=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),u=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=u;var f=n.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=f;var c=n.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=c,r.DSAparam=n.define("DSAparam",function(){this.int()});var h=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=h;var d=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":111,"asn1.js":1}],111:[function(t,e,r){var n=t("asn1.js"),i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),u=n.define("RelativeDistinguishedName",function(){this.setof(o)}),f=n.define("RDNSequence",function(){this.seqof(u)}),c=n.define("Name",function(){this.choice({rdnSequence:this.use(f)})}),h=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),d=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),l=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(c),this.key("validity").use(h),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(d).optional())}),p=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});e.exports=p},{"asn1.js":1}],112:[function(t,e,r){(function(r){var n=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,o=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,a=t("evp_bytestokey"),s=t("browserify-aes");e.exports=function(t,e){var u,f=t.toString(),c=f.match(n);if(c){var h="aes"+c[1],d=new r(c[2],"hex"),l=new r(c[3].replace(/\r?\n/g,""),"base64"),p=a(e,d.slice(0,8),parseInt(c[1],10)).key,b=[],m=s.createDecipheriv(h,p,d);b.push(m.update(l)),b.push(m.final()),u=r.concat(b)}else{var y=f.match(o);u=new r(y[2].replace(/\r?\n/g,""),"base64")}return{tag:f.match(i)[1],data:u}}}).call(this,t("buffer").Buffer)},{"browserify-aes":20,buffer:47,evp_bytestokey:84}],113:[function(t,e,r){(function(r){var n=t("./asn1"),i=t("./aesid.json"),o=t("./fixProc"),a=t("browserify-aes"),s=t("pbkdf2");function u(t){var e;"object"!==(void 0===t?"undefined":_typeof(t))||r.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=new r(t));var u,f,c,h,d,l,p,b,m,y,v,g,w,_=o(t,e),M=_.tag,x=_.data;switch(M){case"CERTIFICATE":f=n.certificate.decode(x,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=n.PublicKey.decode(x,"der")),u=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=n.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+M);case"ENCRYPTED PRIVATE KEY":x=n.EncryptedPrivateKey.decode(x,"der"),h=e,d=(c=x).algorithm.decrypt.kde.kdeparams.salt,l=parseInt(c.algorithm.decrypt.kde.kdeparams.iters.toString(),10),p=i[c.algorithm.decrypt.cipher.algo.join(".")],b=c.algorithm.decrypt.cipher.iv,m=c.subjectPrivateKey,y=parseInt(p.split("-")[1],10)/8,v=s.pbkdf2Sync(h,d,l,y),g=a.createDecipheriv(p,v,b),(w=[]).push(g.update(m)),w.push(g.final()),x=r.concat(w);case"PRIVATE KEY":switch(u=(f=n.PrivateKey.decode(x,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:n.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=n.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+M);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(x,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(x,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(x,"der")};case"EC PRIVATE KEY":return{curve:(x=n.ECPrivateKey.decode(x,"der")).parameters.value,privateKey:x.privateKey};default:throw new Error("unknown key type "+M)}}e.exports=u,u.signature=n.signature}).call(this,t("buffer").Buffer)},{"./aesid.json":109,"./asn1":110,"./fixProc":112,"browserify-aes":20,buffer:47,pbkdf2:114}],114:[function(t,e,r){r.pbkdf2=t("./lib/async"),r.pbkdf2Sync=t("./lib/sync")},{"./lib/async":115,"./lib/sync":118}],115:[function(t,e,r){(function(r,n){var i,o=t("./precondition"),a=t("./default-encoding"),s=t("./sync"),u=t("safe-buffer").Buffer,f=n.crypto&&n.crypto.subtle,c={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function d(t,e,r,n,i){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)}).then(function(t){return u.from(t)})}e.exports=function(t,e,l,p,b,m){if(u.isBuffer(t)||(t=u.from(t,a)),u.isBuffer(e)||(e=u.from(e,a)),o(l,p),"function"==typeof b&&(m=b,b=void 0),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");var y,v,g=c[(b=b||"sha1").toLowerCase()];if(!g||"function"!=typeof n.Promise)return r.nextTick(function(){var r;try{r=s(t,e,l,p,b)}catch(t){return m(t)}m(null,r)});y=function(t){if(n.process&&!n.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==h[t])return h[t];var e=d(i=i||u.alloc(8),i,10,128,t).then(function(){return!0}).catch(function(){return!1});return h[t]=e,e}(g).then(function(r){return r?d(t,e,l,p,g):s(t,e,l,p,b)}),v=m,y.then(function(t){r.nextTick(function(){v(null,t)})},function(t){r.nextTick(function(){v(t)})})}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":116,"./precondition":117,"./sync":118,_process:120,"safe-buffer":147}],116:[function(t,e,r){(function(t){var r;t.browser?r="utf-8":r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=r}).call(this,t("_process"))},{_process:120}],117:[function(t,e,r){var n=Math.pow(2,30)-1;e.exports=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>n||e!=e)throw new TypeError("Bad key length")}},{}],118:[function(t,e,r){var n=t("create-hash/md5"),i=t("ripemd160"),o=t("sha.js"),a=t("./precondition"),s=t("./default-encoding"),u=t("safe-buffer").Buffer,f=u.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(t,e,r){var a=function(t){return"rmd160"===t||"ripemd160"===t?i:"md5"===t?n:function(e){return o(t).update(e).digest()}}(t),s="sha512"===t||"sha384"===t?128:64;e.length>s?e=a(e):e.length1)for(var r=1;rp||new a(e).cmp(l.modulus)>=0)throw new Error("decryption error");d=c?f(new a(e),l):s(e,l);var b=new r(p-d.length);if(b.fill(0),d=r.concat([b,d],p),4===h)return function(t,e){t.modulus;var n=t.modulus.byteLength(),a=(e.length,u("sha1").update(new r("")).digest()),s=a.length;if(0!==e[0])throw new Error("decryption error");var f=e.slice(1,s+1),c=e.slice(s+1),h=o(f,i(c,s)),d=o(c,i(h,n-s-1));if(function(t,e){t=new r(t),e=new r(e);var n=0,i=t.length;t.length!==e.length&&(n++,i=Math.min(t.length,e.length));var o=-1;for(;++o=e.length){o++;break}var a=e.slice(2,i-1);e.slice(i-1,i);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,d,c);if(3===h)return d;throw new Error("unknown padding")}}).call(this,t("buffer").Buffer)},{"./mgf":122,"./withPublic":125,"./xor":126,"bn.js":"BN","browserify-rsa":38,buffer:47,"create-hash":51,"parse-asn1":113}],124:[function(t,e,r){(function(r){var n=t("parse-asn1"),i=t("randombytes"),o=t("create-hash"),a=t("./mgf"),s=t("./xor"),u=t("bn.js"),f=t("./withPublic"),c=t("browserify-rsa");e.exports=function(t,e,h){var d;d=t.padding?t.padding:h?1:4;var l,p=n(t);if(4===d)l=function(t,e){var n=t.modulus.byteLength(),f=e.length,c=o("sha1").update(new r("")).digest(),h=c.length,d=2*h;if(f>n-d-2)throw new Error("message too long");var l=new r(n-f-d-2);l.fill(0);var p=n-h-1,b=i(h),m=s(r.concat([c,l,new r([1]),e],p),a(b,p)),y=s(b,a(m,h));return new u(r.concat([new r([0]),y,m],n))}(p,e);else if(1===d)l=function(t,e,n){var o,a=e.length,s=t.modulus.byteLength();if(a>s-11)throw new Error("message too long");n?(o=new r(s-a-3)).fill(255):o=function(t,e){var n,o=new r(t),a=0,s=i(2*t),u=0;for(;a=0)throw new Error("data too long for modulus")}return h?c(l,p):f(l,p)}}).call(this,t("buffer").Buffer)},{"./mgf":122,"./withPublic":125,"./xor":126,"bn.js":"BN","browserify-rsa":38,buffer:47,"create-hash":51,"parse-asn1":113,randombytes:131}],125:[function(t,e,r){(function(r){var n=t("bn.js");e.exports=function(t,e){return new r(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}}).call(this,t("buffer").Buffer)},{"bn.js":"BN",buffer:47}],126:[function(t,e,r){e.exports=function(t,e){for(var r=t.length,n=-1;++n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=c-h,x=Math.floor,k=String.fromCharCode;function S(t){throw new RangeError(_[t])}function E(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function A(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+E((t=t.replace(w,".")).split("."),e).join(".")}function j(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=k((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=k(t)}).join("")}function B(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function T(t,e,r){var n=0;for(t=r?x(t/p):t>>1,t+=x(t/e);t>M*d>>1;n+=c)t=x(t/M);return x(n+(M+1)*t/(t+l))}function C(t){var e,r,n,i,o,a,s,u,l,p,v,g=[],w=t.length,_=0,M=m,k=b;for((r=t.lastIndexOf(y))<0&&(r=0),n=0;n=128&&S("not-basic"),g.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=w&&S("invalid-input"),((u=(v=t.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:c)>=c||u>x((f-_)/a))&&S("overflow"),_+=u*a,!(u<(l=s<=k?h:s>=k+d?d:s-k));s+=c)a>x(f/(p=c-l))&&S("overflow"),a*=p;k=T(_-o,e=g.length+1,0==o),x(_/e)>f-M&&S("overflow"),M+=x(_/e),_%=e,g.splice(_++,0,M)}return I(g)}function P(t){var e,r,n,i,o,a,s,u,l,p,v,g,w,_,M,E=[];for(g=(t=j(t)).length,e=m,r=0,o=b,a=0;a=e&&vx((f-r)/(w=n+1))&&S("overflow"),r+=(s-e)*w,e=s,a=0;af&&S("overflow"),v==e){for(u=r,l=c;!(u<(p=l<=o?h:l>=o+d?d:l-o));l+=c)M=u-p,_=c-p,E.push(k(B(p+M%_,0))),u=x(M/_);E.push(k(B(u,0))),o=T(r,w,n==i),r=0,++n}++r,++e}return E.join("")}if(s={version:"1.4.1",ucs2:{decode:j,encode:I},decode:C,encode:P,toASCII:function(t){return A(t,function(t){return g.test(t)?"xn--"+P(t):t})},toUnicode:function(t){return A(t,function(t){return v.test(t)?C(t.slice(4).toLowerCase()):t})}},"function"==typeof define&&"object"==_typeof(define.amd)&&define.amd)define("punycode",function(){return s});else if(i&&o)if(e.exports==i)o.exports=s;else for(u in s)s.hasOwnProperty(u)&&(i[u]=s[u]);else n.punycode=s}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],128:[function(t,e,r){e.exports=function(t,e,r,i){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(e);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u,f,c=t.length;s>0&&c>s&&(c=s);for(var h=0;h=0?(d=m.substr(0,y),l=m.substr(y+1)):(d=m,l=""),p=decodeURIComponent(d),b=decodeURIComponent(l),u=o,f=p,Object.prototype.hasOwnProperty.call(u,f)?n(o[p])?o[p].push(b):o[p]=[o[p],b]:o[p]=b}return o};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],129:[function(t,e,r){var n=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"===(void 0===t?"undefined":_typeof(t))?o(a(t),function(a){var s=encodeURIComponent(n(a))+r;return i(t[a])?o(t[a],function(t){return s+encodeURIComponent(n(t))}).join(e):s+encodeURIComponent(n(t[a]))}).join(e):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n65536)throw new Error("requested too many random bytes");var a=new n.Uint8Array(t);t>0&&o.getRandomValues(a);var s=i.from(a.buffer);if("function"==typeof e)return r.nextTick(function(){e(null,s)});return s}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:120,"safe-buffer":147}],132:[function(t,e,r){(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=t("safe-buffer"),a=t("randombytes"),s=o.Buffer,u=o.kMaxLength,f=n.crypto||n.msCrypto,c=Math.pow(2,32)-1;function h(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>c||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function d(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>c||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>u)throw new RangeError("buffer too small")}function l(t,r,n,i){if(e.browser){var o=t.buffer,s=new Uint8Array(o,r,n);return f.getRandomValues(s),i?void e.nextTick(function(){i(null,t)}):t}if(!i)return a(n).copy(t,r),t;a(n,function(e,n){if(e)return i(e);n.copy(t,r),i(null,t)})}f&&f.getRandomValues||!e.browser?(r.randomFill=function(t,e,r,i){if(!(s.isBuffer(t)||t instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)i=e,e=0,r=t.length;else if("function"==typeof r)i=r,r=t.length-e;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(e,t.length),d(r,e,t.length),l(t,e,r,i)},r.randomFillSync=function(t,e,r){void 0===e&&(e=0);if(!(s.isBuffer(t)||t instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(e,t.length),void 0===r&&(r=t.length-e);return d(r,e,t.length),l(t,e,r)}):(r.randomFill=i,r.randomFillSync=i)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:120,randombytes:131,"safe-buffer":147}],133:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":134}],134:[function(t,e,r){var n=t("process-nextick-args").nextTick,i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=h;var o=t("core-util-is");o.inherits=t("inherits");var a=t("./_stream_readable"),s=t("./_stream_writable");o.inherits(h,a);for(var u=i(s.prototype),f=0;f0?("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===f.prototype||(a=e,e=f.from(a)),n?u.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,u,e,!0):u.ended?t.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!r?(e=u.decoder.write(e),u.objectMode||0!==e.length?_(t,u,e,!1):E(t,u)):_(t,u,e,!1))):n||(u.reading=!1));return!(s=u).ended&&(s.needReadable||s.lengthe.highWaterMark&&(e.highWaterMark=((r=t)>=M?r=M:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0));var r}function k(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i(S,t):S(t))}function S(t){l("emit readable"),t.emit("readable"),B(t)}function E(t,e){e.readingMore||(e.readingMore=!0,i(A,t,e))}function A(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=f.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function C(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i(P,e,t))}function P(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&C(this),null;var n,i=e.needReadable;return l("need readable",i),(0===e.length||e.length-t0?T(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&C(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,l("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?c:w;function f(e,r){l("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),t.removeListener("close",v),t.removeListener("finish",g),t.removeListener("drain",d),t.removeListener("error",y),t.removeListener("unpipe",f),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",m),p=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||d())}function c(){l("onend"),t.end()}o.endEmitted?i(u):n.once("end",u),t.on("unpipe",f);var h,d=(h=n,function(){var t=h._readableState;l("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(h,"data")&&(t.flowing=!0,B(h))});t.on("drain",d);var p=!1;var b=!1;function m(e){l("ondata"),b=!1,!1!==t.write(e)||b||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==R(o.pipes,t))&&!p&&(l("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,b=!0),n.pause())}function y(e){l("onerror",e),w(),t.removeListener("error",y),0===s(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",g),w()}function g(){l("onfinish"),t.removeListener("close",v),w()}function w(){l("unpipe"),n.unpipe(t)}return n.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",y),t.once("close",v),t.once("finish",g),t.emit("pipe",n),o.flowing||(l("pipe resume"),n.resume()),t},g.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o-1?setImmediate:i;y.WritableState=m;var u=t("core-util-is");u.inherits=t("inherits");var f={deprecate:t("util-deprecate")},c=t("./internal/streams/stream"),h=t("safe-buffer").Buffer,d=n.Uint8Array||function(){};var l,p=t("./internal/streams/destroy");function b(){}function m(e,r){a=a||t("./_stream_duplex"),e=e||{};var n=r instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,f=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if(l=r,l.writing=!1,l.writecb=null,l.length-=l.writelen,l.writelen=0,e)u=t,f=r,c=n,h=e,d=o,--f.pendingcb,c?(i(d,h),i(x,u,f),u._writableState.errorEmitted=!0,u.emit("error",h)):(d(h),u._writableState.errorEmitted=!0,u.emit("error",h),x(u,f));else{var a=_(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?s(g,t,r,a,o):g(t,r,a,o)}var u,f,c,h,d;var l}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function y(e){if(a=a||t("./_stream_duplex"),!(l.call(y,this)||this instanceof a))return new y(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function v(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function g(t,e,r,n){var i,o;r||(i=t,0===(o=e).length&&o.needDrain&&(o.needDrain=!1,i.emit("drain"))),e.pendingcb--,n(),x(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,v(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,h=r.callback;if(v(t,e,!1,e.objectMode?1:f.length,f,c,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),x(t,e)})}function x(t,e){var r,n,o=_(e);return o&&(r=t,(n=e).prefinished||n.finalCalled||("function"==typeof r._final?(n.pendingcb++,n.finalCalled=!0,i(M,r,n)):(n.prefinished=!0,r.emit("prefinish"))),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),o}u.inherits(y,c),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===y&&(t&&t._writableState instanceof m)}})):l=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var n,o,a,s,u,f,c,l,p,m,y,g=this._writableState,w=!1,_=!g.objectMode&&(n=t,h.isBuffer(n)||n instanceof d);return _&&!h.isBuffer(t)&&(o=t,t=h.from(o)),"function"==typeof e&&(r=e,e=null),_?e="buffer":e||(e=g.defaultEncoding),"function"!=typeof r&&(r=b),g.ended?(p=this,m=r,y=new Error("write after end"),p.emit("error",y),i(m,y)):(_||(a=this,s=g,f=r,c=!0,l=!1,null===(u=t)?l=new TypeError("May not write null values to stream"):"string"==typeof u||void 0===u||s.objectMode||(l=new TypeError("Invalid non-string/buffer chunk")),l&&(a.emit("error",l),i(f,l),c=!1),c))&&(g.pendingcb++,w=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,x(t,e),r&&(e.finished?i(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":134,"./internal/streams/destroy":140,"./internal/streams/stream":141,_process:120,"core-util-is":49,inherits:101,"process-nextick-args":119,"safe-buffer":147,"util-deprecate":160}],139:[function(t,e,r){var n=t("safe-buffer").Buffer,i=t("util");e.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=o,i=s,e.copy(r,i),s+=a.data.length,a=a.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},{"safe-buffer":147,util:17}],140:[function(t,e,r){var n=t("process-nextick-args").nextTick;function i(t,e){t.emit("error",e)}e.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(n(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":119}],141:[function(t,e,r){e.exports=t("events").EventEmitter},{events:83}],142:[function(t,e,r){e.exports=t("./readable").PassThrough},{"./readable":143}],143:[function(t,e,r){(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":134,"./lib/_stream_passthrough.js":135,"./lib/_stream_readable.js":136,"./lib/_stream_transform.js":137,"./lib/_stream_writable.js":138}],144:[function(t,e,r){e.exports=t("./readable").Transform},{"./readable":143}],145:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":138}],146:[function(t,e,r){(function(r){var n=t("inherits"),i=t("hash-base");function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function a(t,e){return t<>>32-e}function s(t,e,r,n,i,o,s,u){return a(t+(e^r^n)+o+s|0,u)+i|0}function u(t,e,r,n,i,o,s,u){return a(t+(e&r|~e&n)+o+s|0,u)+i|0}function f(t,e,r,n,i,o,s,u){return a(t+((e|~r)^n)+o+s|0,u)+i|0}function c(t,e,r,n,i,o,s,u){return a(t+(e&n|r&~n)+o+s|0,u)+i|0}function h(t,e,r,n,i,o,s,u){return a(t+(e^(r|~n))+o+s|0,u)+i|0}n(o,i),o.prototype._update=function(){for(var t=new Array(16),e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d,d=this._e;d=s(d,r=s(r,n,i,o,d,t[0],0,11),n,i=a(i,10),o,t[1],0,14),n=s(n=a(n,10),i=s(i,o=s(o,d,r,n,i,t[2],0,15),d,r=a(r,10),n,t[3],0,12),o,d=a(d,10),r,t[4],0,5),o=s(o=a(o,10),d=s(d,r=s(r,n,i,o,d,t[5],0,8),n,i=a(i,10),o,t[6],0,7),r,n=a(n,10),i,t[7],0,9),r=s(r=a(r,10),n=s(n,i=s(i,o,d,r,n,t[8],0,11),o,d=a(d,10),r,t[9],0,13),i,o=a(o,10),d,t[10],0,14),i=s(i=a(i,10),o=s(o,d=s(d,r,n,i,o,t[11],0,15),r,n=a(n,10),i,t[12],0,6),d,r=a(r,10),n,t[13],0,7),d=u(d=a(d,10),r=s(r,n=s(n,i,o,d,r,t[14],0,9),i,o=a(o,10),d,t[15],0,8),n,i=a(i,10),o,t[7],1518500249,7),n=u(n=a(n,10),i=u(i,o=u(o,d,r,n,i,t[4],1518500249,6),d,r=a(r,10),n,t[13],1518500249,8),o,d=a(d,10),r,t[1],1518500249,13),o=u(o=a(o,10),d=u(d,r=u(r,n,i,o,d,t[10],1518500249,11),n,i=a(i,10),o,t[6],1518500249,9),r,n=a(n,10),i,t[15],1518500249,7),r=u(r=a(r,10),n=u(n,i=u(i,o,d,r,n,t[3],1518500249,15),o,d=a(d,10),r,t[12],1518500249,7),i,o=a(o,10),d,t[0],1518500249,12),i=u(i=a(i,10),o=u(o,d=u(d,r,n,i,o,t[9],1518500249,15),r,n=a(n,10),i,t[5],1518500249,9),d,r=a(r,10),n,t[2],1518500249,11),d=u(d=a(d,10),r=u(r,n=u(n,i,o,d,r,t[14],1518500249,7),i,o=a(o,10),d,t[11],1518500249,13),n,i=a(i,10),o,t[8],1518500249,12),n=f(n=a(n,10),i=f(i,o=f(o,d,r,n,i,t[3],1859775393,11),d,r=a(r,10),n,t[10],1859775393,13),o,d=a(d,10),r,t[14],1859775393,6),o=f(o=a(o,10),d=f(d,r=f(r,n,i,o,d,t[4],1859775393,7),n,i=a(i,10),o,t[9],1859775393,14),r,n=a(n,10),i,t[15],1859775393,9),r=f(r=a(r,10),n=f(n,i=f(i,o,d,r,n,t[8],1859775393,13),o,d=a(d,10),r,t[1],1859775393,15),i,o=a(o,10),d,t[2],1859775393,14),i=f(i=a(i,10),o=f(o,d=f(d,r,n,i,o,t[7],1859775393,8),r,n=a(n,10),i,t[0],1859775393,13),d,r=a(r,10),n,t[6],1859775393,6),d=f(d=a(d,10),r=f(r,n=f(n,i,o,d,r,t[13],1859775393,5),i,o=a(o,10),d,t[11],1859775393,12),n,i=a(i,10),o,t[5],1859775393,7),n=c(n=a(n,10),i=c(i,o=f(o,d,r,n,i,t[12],1859775393,5),d,r=a(r,10),n,t[1],2400959708,11),o,d=a(d,10),r,t[9],2400959708,12),o=c(o=a(o,10),d=c(d,r=c(r,n,i,o,d,t[11],2400959708,14),n,i=a(i,10),o,t[10],2400959708,15),r,n=a(n,10),i,t[0],2400959708,14),r=c(r=a(r,10),n=c(n,i=c(i,o,d,r,n,t[8],2400959708,15),o,d=a(d,10),r,t[12],2400959708,9),i,o=a(o,10),d,t[4],2400959708,8),i=c(i=a(i,10),o=c(o,d=c(d,r,n,i,o,t[13],2400959708,9),r,n=a(n,10),i,t[3],2400959708,14),d,r=a(r,10),n,t[7],2400959708,5),d=c(d=a(d,10),r=c(r,n=c(n,i,o,d,r,t[15],2400959708,6),i,o=a(o,10),d,t[14],2400959708,8),n,i=a(i,10),o,t[5],2400959708,6),n=h(n=a(n,10),i=c(i,o=c(o,d,r,n,i,t[6],2400959708,5),d,r=a(r,10),n,t[2],2400959708,12),o,d=a(d,10),r,t[4],2840853838,9),o=h(o=a(o,10),d=h(d,r=h(r,n,i,o,d,t[0],2840853838,15),n,i=a(i,10),o,t[5],2840853838,5),r,n=a(n,10),i,t[9],2840853838,11),r=h(r=a(r,10),n=h(n,i=h(i,o,d,r,n,t[7],2840853838,6),o,d=a(d,10),r,t[12],2840853838,8),i,o=a(o,10),d,t[2],2840853838,13),i=h(i=a(i,10),o=h(o,d=h(d,r,n,i,o,t[10],2840853838,12),r,n=a(n,10),i,t[14],2840853838,5),d,r=a(r,10),n,t[1],2840853838,12),d=h(d=a(d,10),r=h(r,n=h(n,i,o,d,r,t[3],2840853838,13),i,o=a(o,10),d,t[8],2840853838,14),n,i=a(i,10),o,t[11],2840853838,11),n=h(n=a(n,10),i=h(i,o=h(o,d,r,n,i,t[6],2840853838,8),d,r=a(r,10),n,t[15],2840853838,5),o,d=a(d,10),r,t[13],2840853838,6),o=a(o,10);var l=this._a,p=this._b,b=this._c,m=this._d,y=this._e;y=h(y,l=h(l,p,b,m,y,t[5],1352829926,8),p,b=a(b,10),m,t[14],1352829926,9),p=h(p=a(p,10),b=h(b,m=h(m,y,l,p,b,t[7],1352829926,9),y,l=a(l,10),p,t[0],1352829926,11),m,y=a(y,10),l,t[9],1352829926,13),m=h(m=a(m,10),y=h(y,l=h(l,p,b,m,y,t[2],1352829926,15),p,b=a(b,10),m,t[11],1352829926,15),l,p=a(p,10),b,t[4],1352829926,5),l=h(l=a(l,10),p=h(p,b=h(b,m,y,l,p,t[13],1352829926,7),m,y=a(y,10),l,t[6],1352829926,7),b,m=a(m,10),y,t[15],1352829926,8),b=h(b=a(b,10),m=h(m,y=h(y,l,p,b,m,t[8],1352829926,11),l,p=a(p,10),b,t[1],1352829926,14),y,l=a(l,10),p,t[10],1352829926,14),y=c(y=a(y,10),l=h(l,p=h(p,b,m,y,l,t[3],1352829926,12),b,m=a(m,10),y,t[12],1352829926,6),p,b=a(b,10),m,t[6],1548603684,9),p=c(p=a(p,10),b=c(b,m=c(m,y,l,p,b,t[11],1548603684,13),y,l=a(l,10),p,t[3],1548603684,15),m,y=a(y,10),l,t[7],1548603684,7),m=c(m=a(m,10),y=c(y,l=c(l,p,b,m,y,t[0],1548603684,12),p,b=a(b,10),m,t[13],1548603684,8),l,p=a(p,10),b,t[5],1548603684,9),l=c(l=a(l,10),p=c(p,b=c(b,m,y,l,p,t[10],1548603684,11),m,y=a(y,10),l,t[14],1548603684,7),b,m=a(m,10),y,t[15],1548603684,7),b=c(b=a(b,10),m=c(m,y=c(y,l,p,b,m,t[8],1548603684,12),l,p=a(p,10),b,t[12],1548603684,7),y,l=a(l,10),p,t[4],1548603684,6),y=c(y=a(y,10),l=c(l,p=c(p,b,m,y,l,t[9],1548603684,15),b,m=a(m,10),y,t[1],1548603684,13),p,b=a(b,10),m,t[2],1548603684,11),p=f(p=a(p,10),b=f(b,m=f(m,y,l,p,b,t[15],1836072691,9),y,l=a(l,10),p,t[5],1836072691,7),m,y=a(y,10),l,t[1],1836072691,15),m=f(m=a(m,10),y=f(y,l=f(l,p,b,m,y,t[3],1836072691,11),p,b=a(b,10),m,t[7],1836072691,8),l,p=a(p,10),b,t[14],1836072691,6),l=f(l=a(l,10),p=f(p,b=f(b,m,y,l,p,t[6],1836072691,6),m,y=a(y,10),l,t[9],1836072691,14),b,m=a(m,10),y,t[11],1836072691,12),b=f(b=a(b,10),m=f(m,y=f(y,l,p,b,m,t[8],1836072691,13),l,p=a(p,10),b,t[12],1836072691,5),y,l=a(l,10),p,t[2],1836072691,14),y=f(y=a(y,10),l=f(l,p=f(p,b,m,y,l,t[10],1836072691,13),b,m=a(m,10),y,t[0],1836072691,13),p,b=a(b,10),m,t[4],1836072691,7),p=u(p=a(p,10),b=u(b,m=f(m,y,l,p,b,t[13],1836072691,5),y,l=a(l,10),p,t[8],2053994217,15),m,y=a(y,10),l,t[6],2053994217,5),m=u(m=a(m,10),y=u(y,l=u(l,p,b,m,y,t[4],2053994217,8),p,b=a(b,10),m,t[1],2053994217,11),l,p=a(p,10),b,t[3],2053994217,14),l=u(l=a(l,10),p=u(p,b=u(b,m,y,l,p,t[11],2053994217,14),m,y=a(y,10),l,t[15],2053994217,6),b,m=a(m,10),y,t[0],2053994217,14),b=u(b=a(b,10),m=u(m,y=u(y,l,p,b,m,t[5],2053994217,6),l,p=a(p,10),b,t[12],2053994217,9),y,l=a(l,10),p,t[2],2053994217,12),y=u(y=a(y,10),l=u(l,p=u(p,b,m,y,l,t[13],2053994217,9),b,m=a(m,10),y,t[9],2053994217,12),p,b=a(b,10),m,t[7],2053994217,5),p=s(p=a(p,10),b=u(b,m=u(m,y,l,p,b,t[10],2053994217,15),y,l=a(l,10),p,t[14],2053994217,8),m,y=a(y,10),l,t[12],0,8),m=s(m=a(m,10),y=s(y,l=s(l,p,b,m,y,t[15],0,5),p,b=a(b,10),m,t[10],0,12),l,p=a(p,10),b,t[4],0,9),l=s(l=a(l,10),p=s(p,b=s(b,m,y,l,p,t[1],0,12),m,y=a(y,10),l,t[5],0,5),b,m=a(m,10),y,t[8],0,14),b=s(b=a(b,10),m=s(m,y=s(y,l,p,b,m,t[7],0,6),l,p=a(p,10),b,t[6],0,8),y,l=a(l,10),p,t[2],0,13),y=s(y=a(y,10),l=s(l,p=s(p,b,m,y,l,t[13],0,6),b,m=a(m,10),y,t[14],0,5),p,b=a(b,10),m,t[0],0,15),p=s(p=a(p,10),b=s(b,m=s(m,y,l,p,b,t[3],0,13),y,l=a(l,10),p,t[9],0,11),m,y=a(y,10),l,t[11],0,11),m=a(m,10);var v=this._b+i+m|0;this._b=this._c+o+y|0,this._c=this._d+d+l|0,this._d=this._e+r+p|0,this._e=this._a+n+b|0,this._a=v},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},e.exports=o}).call(this,t("buffer").Buffer)},{buffer:47,"hash-base":85,inherits:101}],147:[function(t,e,r){var n=t("buffer"),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:47}],148:[function(t,e,r){var n=t("safe-buffer").Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},{"safe-buffer":147}],149:[function(t,e,r){(r=e.exports=function(t){t=t.toLowerCase();var e=r[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e}).sha=t("./sha"),r.sha1=t("./sha1"),r.sha224=t("./sha224"),r.sha256=t("./sha256"),r.sha384=t("./sha384"),r.sha512=t("./sha512")},{"./sha":150,"./sha1":151,"./sha224":152,"./sha256":153,"./sha384":154,"./sha512":155}],150:[function(t,e,r){var n=t("inherits"),i=t("./hash"),o=t("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r,n,i,o,s,u=this._w,f=0|this._a,c=0|this._b,h=0|this._c,d=0|this._d,l=0|this._e,p=0;p<16;++p)u[p]=t.readInt32BE(4*p);for(;p<80;++p)u[p]=u[p-3]^u[p-8]^u[p-14]^u[p-16];for(var b=0;b<80;++b){var m=~~(b/20),y=0|((s=f)<<5|s>>>27)+(n=c,i=h,o=d,0===(r=m)?n&i|~n&o:2===r?n&i|n&o|i&o:n^i^o)+l+u[b]+a[m];l=d,d=h,h=(e=c)<<30|e>>>2,c=f,f=y}this._a=f+this._a|0,this._b=c+this._b|0,this._c=h+this._c|0,this._d=d+this._d|0,this._e=l+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},e.exports=u},{"./hash":148,inherits:101,"safe-buffer":147}],151:[function(t,e,r){var n=t("inherits"),i=t("./hash"),o=t("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r,n,i,o,s,u,f=this._w,c=0|this._a,h=0|this._b,d=0|this._c,l=0|this._d,p=0|this._e,b=0;b<16;++b)f[b]=t.readInt32BE(4*b);for(;b<80;++b)f[b]=(e=f[b-3]^f[b-8]^f[b-14]^f[b-16])<<1|e>>>31;for(var m=0;m<80;++m){var y=~~(m/20),v=0|((u=c)<<5|u>>>27)+(i=h,o=d,s=l,0===(n=y)?i&o|~i&s:2===n?i&o|i&s|o&s:i^o^s)+p+f[m]+a[y];p=l,l=d,d=(r=h)<<30|r>>>2,h=c,c=v}this._a=c+this._a|0,this._b=h+this._b|0,this._c=d+this._c|0,this._d=l+this._d|0,this._e=p+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},e.exports=u},{"./hash":148,inherits:101,"safe-buffer":147}],152:[function(t,e,r){var n=t("inherits"),i=t("./sha256"),o=t("./hash"),a=t("safe-buffer").Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},e.exports=u},{"./hash":148,"./sha256":153,inherits:101,"safe-buffer":147}],153:[function(t,e,r){var n=t("inherits"),i=t("./hash"),o=t("safe-buffer").Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r,n,i,o,s,u,f=this._w,c=0|this._a,h=0|this._b,d=0|this._c,l=0|this._d,p=0|this._e,b=0|this._f,m=0|this._g,y=0|this._h,v=0;v<16;++v)f[v]=t.readInt32BE(4*v);for(;v<64;++v)f[v]=0|(((r=f[v-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)+f[v-7]+(((e=f[v-15])>>>7|e<<25)^(e>>>18|e<<14)^e>>>3)+f[v-16];for(var g=0;g<64;++g){var w=y+(((u=p)>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+((s=m)^p&(b^s))+a[g]+f[g]|0,_=0|(((o=c)>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+((n=c)&(i=h)|d&(n|i));y=m,m=b,b=p,p=l+w|0,l=d,d=h,h=c,c=w+_|0}this._a=c+this._a|0,this._b=h+this._b|0,this._c=d+this._c|0,this._d=l+this._d|0,this._e=p+this._e|0,this._f=b+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},e.exports=u},{"./hash":148,inherits:101,"safe-buffer":147}],154:[function(t,e,r){var n=t("inherits"),i=t("./sha512"),o=t("./hash"),a=t("safe-buffer").Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},e.exports=u},{"./hash":148,"./sha512":155,inherits:101,"safe-buffer":147}],155:[function(t,e,r){var n=t("inherits"),i=t("./hash"),o=t("safe-buffer").Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function f(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function d(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function l(t,e){return t>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e,r,n,i,o,s,u,p,b=this._w,m=0|this._ah,y=0|this._bh,v=0|this._ch,g=0|this._dh,w=0|this._eh,_=0|this._fh,M=0|this._gh,x=0|this._hh,k=0|this._al,S=0|this._bl,E=0|this._cl,A=0|this._dl,j=0|this._el,I=0|this._fl,B=0|this._gl,T=0|this._hl,C=0;C<32;C+=2)b[C]=t.readInt32BE(4*C),b[C+1]=t.readInt32BE(4*C+4);for(;C<160;C+=2){var P=b[C-30],R=b[C-30+1],O=((u=P)>>>1|(p=R)<<31)^(u>>>8|p<<24)^u>>>7,N=((o=R)>>>1|(s=P)<<31)^(o>>>8|s<<24)^(o>>>7|s<<25);P=b[C-4],R=b[C-4+1];var L=((n=P)>>>19|(i=R)<<13)^(i>>>29|n<<3)^n>>>6,F=((e=R)>>>19|(r=P)<<13)^(r>>>29|e<<3)^(e>>>6|r<<26),q=b[C-14],D=b[C-14+1],U=b[C-32],z=b[C-32+1],K=N+D|0,H=O+q+l(K,N)|0;H=(H=H+L+l(K=K+F|0,F)|0)+U+l(K=K+z|0,z)|0,b[C]=H,b[C+1]=K}for(var V=0;V<160;V+=2){H=b[V],K=b[V+1];var W=c(m,y,v),X=c(k,S,E),G=h(m,k),J=h(k,m),Z=d(w,j),$=d(j,w),Y=a[V],Q=a[V+1],tt=f(w,_,M),et=f(j,I,B),rt=T+$|0,nt=x+Z+l(rt,T)|0;nt=(nt=(nt=nt+tt+l(rt=rt+et|0,et)|0)+Y+l(rt=rt+Q|0,Q)|0)+H+l(rt=rt+K|0,K)|0;var it=J+X|0,ot=G+W+l(it,J)|0;x=M,T=B,M=_,B=I,_=w,I=j,w=g+nt+l(j=A+rt|0,A)|0,g=v,A=E,v=y,E=S,y=m,S=k,m=nt+ot+l(k=rt+it|0,rt)|0}this._al=this._al+k|0,this._bl=this._bl+S|0,this._cl=this._cl+E|0,this._dl=this._dl+A|0,this._el=this._el+j|0,this._fl=this._fl+I|0,this._gl=this._gl+B|0,this._hl=this._hl+T|0,this._ah=this._ah+m+l(this._al,k)|0,this._bh=this._bh+y+l(this._bl,S)|0,this._ch=this._ch+v+l(this._cl,E)|0,this._dh=this._dh+g+l(this._dl,A)|0,this._eh=this._eh+w+l(this._el,j)|0,this._fh=this._fh+_+l(this._fl,I)|0,this._gh=this._gh+M+l(this._gl,B)|0,this._hh=this._hh+x+l(this._hl,T)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},e.exports=u},{"./hash":148,inherits:101,"safe-buffer":147}],156:[function(t,e,r){e.exports=i;var n=t("events").EventEmitter;function i(){n.call(this)}t("inherits")(i,n),i.Readable=t("readable-stream/readable.js"),i.Writable=t("readable-stream/writable.js"),i.Duplex=t("readable-stream/duplex.js"),i.Transform=t("readable-stream/transform.js"),i.PassThrough=t("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",f),t.on("error",f),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},{events:83,inherits:101,"readable-stream/duplex.js":133,"readable-stream/passthrough.js":142,"readable-stream/readable.js":143,"readable-stream/transform.js":144,"readable-stream/writable.js":145}],157:[function(t,e,r){var n=t("safe-buffer").Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=c,this.end=h,e=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�".repeat(r+2)}}(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function f(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function l(t){return t&&t.length?this.write(t):""}r.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":147}],158:[function(t,e,r){var n=t("punycode"),i=t("./util");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=g,r.resolve=function(t,e){return g(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?g(t,!1,!0).resolveObject(e):e},r.format=function(t){i.isString(t)&&(t=g(t));return t instanceof o?t.format():o.prototype.format.call(t)},r.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,f=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(f),h=["%","/","?",";","#"].concat(c),d=["/","?","#"],l=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=t("querystring");function g(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+(void 0===t?"undefined":_typeof(t)));var o=t.indexOf("?"),s=-1!==o&&o127?P+="x":P+=C[R];if(!P.match(l)){var N=B.slice(0,A),L=B.slice(A+1),F=C.match(p);F&&(N.push(F[1]),L.unshift(F[2])),L.length&&(g="/"+L.join(".")+g),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=n.toASCII(this.hostname));var q=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+q,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!b[M])for(A=0,T=c.length;A0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=x.slice(-1)[0],E=(r.host||t.host||x.length>1)&&("."===S||".."===S)||""===S,A=0,j=x.length;j>=0;j--)"."===(S=x[j])?x.splice(j,1):".."===S?(x.splice(j,1),A++):A&&(x.splice(j,1),A--);if(!_&&!M)for(;A--;A)x.unshift("..");!_||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),E&&"/"!==x.join("/").substr(-1)&&x.push("");var I,B=""===x[0]||x[0]&&"/"===x[0].charAt(0);k&&(r.hostname=r.host=B?"":x.length?x.shift():"",(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift()));return(_=_||r.host&&x.length)&&!B&&x.unshift(""),x.length?r.pathname=x.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":159,punycode:127,querystring:130}],159:[function(t,e,r){e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"===(void 0===t?"undefined":_typeof(t))&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],160:[function(t,e,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],161:[function(require,module,exports){var indexOf=require("indexof"),Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r>6|192);else{if(i>55295&&i<56320){if(++n==t.length)return null;var o=t.charCodeAt(n);if(o<56320||o>57343)return null;r+=e((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=e(i>>12&63|128)}else r+=e(i>>12|224);r+=e(i>>6&63|128)}r+=e(63&i|128)}}return r},toString:function(t){for(var e="",r=0,o=i(t);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(t,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(t,r))<<6|63&n(t,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(t,r))<<12|(63&n(t,++r))<<6|63&n(t,++r)}++r}if(a<=65535)e+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,e+=String.fromCharCode(a>>10|55296),e+=String.fromCharCode(1023&a|56320)}}return e},fromNumber:function(t){var e=t.toString(16);return e.length%2==0?"0x"+e:"0x0"+e},toNumber:function(t){return parseInt(t.slice(2),16)},fromNat:function(t){return"0x0"===t?"0x":t.length%2==0?t:"0x0"+t.slice(2)},toNat:function(t){return"0"===t[2]?"0x"+t.slice(3):t},fromArray:a,toArray:o,fromUint8Array:function(t){return a([].slice.call(t,0))},toUint8Array:function(t){return new Uint8Array(o(t))}}},{"./array.js":163}],165:[function(t,e,r){var n="0123456789abcdef".split(""),i=[1,256,65536,16777216],o=[0,8,16,24],a=[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],s=function(t){var e,r,n,i,o,s,u,f,c,h,d,l,p,b,m,y,v,g,w,_,M,x,k,S,E,A,j,I,B,T,C,P,R,O,N,L,F,q,D,U,z,K,H,V,W,X,G,J,Z,$,Y,Q,tt,et,rt,nt,it,ot,at,st,ut,ft,ct;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],u=t[3]^t[13]^t[23]^t[33]^t[43],f=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],d=t[7]^t[17]^t[27]^t[37]^t[47],e=(l=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|u>>>31),r=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(u<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(f<<1|c>>>31),r=o^(c<<1|f>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(h<<1|d>>>31),r=u^(d<<1|h>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=f^(l<<1|p>>>31),r=c^(p<<1|l>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=h^(i<<1|o>>>31),r=d^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,b=t[0],m=t[1],X=t[11]<<4|t[10]>>>28,G=t[10]<<4|t[11]>>>28,I=t[20]<<3|t[21]>>>29,B=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,K=t[40]<<18|t[41]>>>14,H=t[41]<<18|t[40]>>>14,O=t[2]<<1|t[3]>>>31,N=t[3]<<1|t[2]>>>31,y=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,J=t[22]<<10|t[23]>>>22,Z=t[23]<<10|t[22]>>>22,T=t[33]<<13|t[32]>>>19,C=t[32]<<13|t[33]>>>19,ft=t[42]<<2|t[43]>>>30,ct=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,L=t[14]<<6|t[15]>>>26,F=t[15]<<6|t[14]>>>26,g=t[25]<<11|t[24]>>>21,w=t[24]<<11|t[25]>>>21,$=t[34]<<15|t[35]>>>17,Y=t[35]<<15|t[34]>>>17,P=t[45]<<29|t[44]>>>3,R=t[44]<<29|t[45]>>>3,S=t[6]<<28|t[7]>>>4,E=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,q=t[26]<<25|t[27]>>>7,D=t[27]<<25|t[26]>>>7,_=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,Q=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,V=t[8]<<27|t[9]>>>5,W=t[9]<<27|t[8]>>>5,A=t[18]<<20|t[19]>>>12,j=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,at=t[28]<<7|t[29]>>>25,U=t[38]<<8|t[39]>>>24,z=t[39]<<8|t[38]>>>24,x=t[48]<<14|t[49]>>>18,k=t[49]<<14|t[48]>>>18,t[0]=b^~y&g,t[1]=m^~v&w,t[10]=S^~A&I,t[11]=E^~j&B,t[20]=O^~L&q,t[21]=N^~F&D,t[30]=V^~X&J,t[31]=W^~G&Z,t[40]=et^~nt&ot,t[41]=rt^~it&at,t[2]=y^~g&_,t[3]=v^~w&M,t[12]=A^~I&T,t[13]=j^~B&C,t[22]=L^~q&U,t[23]=F^~D&z,t[32]=X^~J&$,t[33]=G^~Z&Y,t[42]=nt^~ot&st,t[43]=it^~at&ut,t[4]=g^~_&x,t[5]=w^~M&k,t[14]=I^~T&P,t[15]=B^~C&R,t[24]=q^~U&K,t[25]=D^~z&H,t[34]=J^~$&Q,t[35]=Z^~Y&tt,t[44]=ot^~st&ft,t[45]=at^~ut&ct,t[6]=_^~x&b,t[7]=M^~k&m,t[16]=T^~P&S,t[17]=C^~R&E,t[26]=U^~K&O,t[27]=z^~H&N,t[36]=$^~Q&V,t[37]=Y^~tt&W,t[46]=st^~ft&et,t[47]=ut^~ct&rt,t[8]=x^~b&y,t[9]=k^~m&v,t[18]=P^~S&A,t[19]=R^~E&j,t[28]=K^~O&L,t[29]=H^~N&F,t[38]=Q^~V&X,t[39]=tt^~W&G,t[48]=ft^~et&nt,t[49]=ct^~rt&it,t[0]^=a[n],t[1]^=a[n+1]},u=function(t){return function(e){var r,a,u;if("0x"===e.slice(0,2)){r=[];for(var f=2,c=e.length;f>2]|=e[l]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(u[m>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=f){for(t.start=m-f,t.block=u[c],m=0;m>2]|=i[3&m],t.lastByteIndex===f)for(u[0]=u[c],m=1;m>4&15]+n[15&p]+n[p>>12&15]+n[p>>8&15]+n[p>>20&15]+n[p>>16&15]+n[p>>28&15]+n[p>>24&15];y%c==0&&(s(d),m=0)}return"0x"+b}({blocks:[],reset:!0,block:0,start:0,blockCount:1600-((a=t)<<1)>>5,outputBlocks:a>>5,s:(u=[0,0,0,0,0,0,0,0,0,0],[].concat(u,u,u,u,u))},r)}};e.exports={keccak256:u(256),keccak512:u(512),keccak256s:u(256),keccak512s:u(512)}},{}],166:[function(t,e,r){var n=t("is-function");e.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this);"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n0){var a=i.join(r,o);n.push(g(t)(e[o])(a))}return Promise.all(n).then(function(){return r})})}}},_=function(t){return function(e){return u(t+"/bzzr:/",{body:"string"==typeof e?L(e):e,method:"POST"})}},M=function(t){return function(e){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s=t+"/bzz:/"+e+a,f={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return u(s,f).then(function(t){if(-1!==t.indexOf("error"))throw t;return t}).catch(function(t){return o>0&&i(o-1)})}(3)}}}},x=function(t){return function(e){return S(t)({"":e})}},k=function(t){return function(r){return e.readFile(r).then(function(e){return x(t)({type:a.lookup(r),data:e})})}},S=function(t){return function(e){return _(t)("{}").then(function(r){return Object.keys(e).reduce(function(r,n){return r.then((i=n,function(r){return M(t)(r)(i)(e[i])}));var i},Promise.resolve(r))})}},E=function(t){return function(r){return e.readFile(r).then(_(t))}},A=function(t){return function(n){return function(i){return r.directoryTree(i).then(function(t){return Promise.all(t.map(function(t){return e.readFile(t)})).then(function(e){var r=t.map(function(t){return t.slice(i.length)}),n=t.map(function(t){return a.lookup(t)||"text/plain"});return l(r)(e.map(function(t,e){return{type:n[e],data:t}}))})}).then(function(t){return(e=n?{"":t[n]}:{},function(t){var r={};for(var n in e)r[n]=e[n];for(var i in t)r[i]=t[i];return r})(t);var e}).then(S(t))}}},j=function(t){return function(e){if("data"===e.pick)return d.data().then(_(t));if("file"===e.pick)return d.file().then(x(t));if("directory"===e.pick)return d.directory().then(S(t));if(e.path)switch(e.kind){case"data":return E(t)(e.path);case"file":return k(t)(e.path);case"directory":return A(t)(e.defaultFile)(e.path)}else{if(e.length||"string"==typeof e)return _(t)(e);if(e instanceof Object)return S(t)(e)}return Promise.reject(new Error("Bad arguments"))}},I=function(t){return function(e){return function(r){return R(t)(e).then(function(n){return n?r?w(t)(e)(r):v(t)(e):r?g(t)(e)(r):b(t)(e)})}}},B=function(t,e){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(e||s)[i],a=f+o.archive+".tar.gz",u=o.archiveMD5,c=o.binaryMD5;return r.safeDownloadArchived(a)(u)(c)(t)},T=function(t){return new Promise(function(e,r){var n=o.spawn,i=function(t){return function(e){return-1!==(""+e).indexOf(t)}},a=t.account,s=t.password,u=t.dataDir,f=t.ensApi,c=t.privateKey,h=0,d=n(t.binPath,["--bzzaccount",a||c,"--datadir",u,"--ens-api",f]),l=function(t){0===h&&i("Passphrase")(t)?setTimeout(function(){h=1,d.stdin.write(s+"\n")},500):i("Swarm http proxy started")(t)&&(h=2,clearTimeout(p),e(d))};d.stdout.on("data",l),d.stderr.on("data",l);var p=setTimeout(function(){return r(new Error("Couldn't start swarm process."))},2e4)})},C=function(t){return new Promise(function(e,r){t.stderr.removeAllListeners("data"),t.stdout.removeAllListeners("data"),t.stdin.removeAllListeners("error"),t.removeAllListeners("error"),t.removeAllListeners("exit"),t.kill("SIGINT");var n=setTimeout(function(){return t.kill("SIGKILL")},8e3);t.once("close",function(){clearTimeout(n),e()})})},P=function(t){return _(t)("test").then(function(t){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===t}).catch(function(){return!1})},R=function(t){return function(e){return b(t)(e).then(function(t){try{return!!JSON.parse(N(t)).entries}catch(t){return!1}})}},O=function(t){return function(e,r,n,i,o){var a;return void 0!==e&&(a=t(e)),void 0!==r&&(a=t(r)),void 0!==n&&(a=t(n)),void 0!==i&&(a=t(i)),void 0!==o&&(a=t(o)),a}},N=function(t){return c.toString(c.fromUint8Array(t))},L=function(t){return c.toUint8Array(c.fromString(t))},F=function(t){return{download:function(e,r){return I(t)(e)(r)},downloadData:O(b(t)),downloadDataToDisk:O(g(t)),downloadDirectory:O(v(t)),downloadDirectoryToDisk:O(w(t)),downloadEntries:O(m(t)),downloadRoutes:O(y(t)),isAvailable:function(){return P(t)},upload:function(e){return j(t)(e)},uploadData:O(_(t)),uploadFile:O(x(t)),uploadFileFromDisk:O(x(t)),uploadDataFromDisk:O(E(t)),uploadDirectory:O(S(t)),uploadDirectoryFromDisk:O(A(t)),uploadToManifest:O(M(t)),pick:d,hash:h,fromString:L,toString:N}};return{at:F,local:function(t){return function(e){return P("http://localhost:8500").then(function(r){return r?e(F("http://localhost:8500")).then(function(){}):B(t.binPath,t.archives).onData(function(e){return(t.onProgress||function(){})(e.length)}).then(function(){return T(t)}).then(function(t){return e(F("http://localhost:8500")).then(function(){return t})}).then(C)})}},download:I,downloadBinary:B,downloadData:b,downloadDataToDisk:g,downloadDirectory:v,downloadDirectoryToDisk:w,downloadEntries:m,downloadRoutes:y,isAvailable:P,startProcess:T,stopProcess:C,upload:j,uploadData:_,uploadDataFromDisk:E,uploadFile:x,uploadFileFromDisk:k,uploadDirectory:S,uploadDirectoryFromDisk:A,uploadToManifest:M,pick:d,hash:h,fromString:L,toString:N}}},{}],177:[function(t,e,r){(r=e.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},r.right=function(t){return t.replace(/\s*$/,"")}},{}],178:[function(t,e,r){(function(){var t=this,n=t._,i=Array.prototype,o=Object.prototype,a=Function.prototype,s=i.push,u=i.slice,f=o.toString,c=o.hasOwnProperty,h=Array.isArray,d=Object.keys,l=a.bind,p=Object.create,b=function(){},m=function t(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};void 0!==r?(void 0!==e&&e.exports&&(r=e.exports=m),r._=m):t._=m,m.VERSION="1.8.3";var y=function(t,e,r){if(void 0===e)return t;switch(null==r?3:r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)};case 4:return function(r,n,i,o){return t.call(e,r,n,i,o)}}return function(){return t.apply(e,arguments)}},v=function(t,e,r){return null==t?m.identity:m.isFunction(t)?y(t,e,r):m.isObject(t)?m.matcher(t):m.property(t)};m.iteratee=function(t,e){return v(t,e,1/0)};var g=function(t,e){return function(r){var n=arguments.length;if(n<2||null==r)return r;for(var i=1;i=0&&e<=M};function S(t){return function(e,r,n,i){r=y(r,i,4);var o=!k(e)&&m.keys(e),a=(o||e).length,s=t>0?0:a-1;return arguments.length<3&&(n=e[o?o[s]:s],s+=t),function(e,r,n,i,o,a){for(;o>=0&&o=0},m.invoke=function(t,e){var r=u.call(arguments,2),n=m.isFunction(e);return m.map(t,function(t){var i=n?e:t[e];return null==i?i:i.apply(t,r)})},m.pluck=function(t,e){return m.map(t,m.property(e))},m.where=function(t,e){return m.filter(t,m.matcher(e))},m.findWhere=function(t,e){return m.find(t,m.matcher(e))},m.max=function(t,e,r){var n,i,o=-1/0,a=-1/0;if(null==e&&null!=t)for(var s=0,u=(t=k(t)?t:m.values(t)).length;so&&(o=n);else e=v(e,r),m.each(t,function(t,r,n){((i=e(t,r,n))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},m.min=function(t,e,r){var n,i,o=1/0,a=1/0;if(null==e&&null!=t)for(var s=0,u=(t=k(t)?t:m.values(t)).length;sn||void 0===r)return 1;if(r0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(r&&o&&s)return n[o=r(n,i)]===i?o:-1;if(i!=i)return(o=e(u.call(n,a,s),m.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&oe?(a&&(clearTimeout(a),a=null),s=f,o=t.apply(n,i),a||(n=i=null)):a||!1===r.trailing||(a=setTimeout(u,c)),o}},m.debounce=function(t,e,r){var n,i,o,a,s,u=function u(){var f=m.now()-a;f=0?n=setTimeout(u,e-f):(n=null,r||(s=t.apply(o,i),n||(o=i=null)))};return function(){o=this,i=arguments,a=m.now();var f=r&&!n;return n||(n=setTimeout(u,e)),f&&(s=t.apply(o,i),o=i=null),s}},m.wrap=function(t,e){return m.partial(e,t)},m.negate=function(t){return function(){return!t.apply(this,arguments)}},m.compose=function(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}},m.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},m.before=function(t,e){var r;return function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=null),r}},m.once=m.partial(m.before,2);var T=!{toString:null}.propertyIsEnumerable("toString"),C=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function P(t,e){var r=C.length,n=t.constructor,i=m.isFunction(n)&&n.prototype||o,a="constructor";for(m.has(t,a)&&!m.contains(e,a)&&e.push(a);r--;)(a=C[r])in t&&t[a]!==i[a]&&!m.contains(e,a)&&e.push(a)}m.keys=function(t){if(!m.isObject(t))return[];if(d)return d(t);var e=[];for(var r in t)m.has(t,r)&&e.push(r);return T&&P(t,e),e},m.allKeys=function(t){if(!m.isObject(t))return[];var e=[];for(var r in t)e.push(r);return T&&P(t,e),e},m.values=function(t){for(var e=m.keys(t),r=e.length,n=Array(r),i=0;i":">",'"':""","'":"'","`":"`"},O=m.invert(R),N=function(t){var e=function(e){return t[e]},r="(?:"+m.keys(t).join("|")+")",n=RegExp(r),i=RegExp(r,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(i,e):t}};m.escape=N(R),m.unescape=N(O),m.result=function(t,e,r){var n=null==t?void 0:t[e];return void 0===n&&(n=r),m.isFunction(n)?n.call(t):n};var L=0;m.uniqueId=function(t){var e=++L+"";return t?t+e:e},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var F=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,U=function(t){return"\\"+q[t]};m.template=function(t,e,r){!e&&r&&(e=r),e=m.defaults({},e,m.templateSettings);var n=RegExp([(e.escape||F).source,(e.interpolate||F).source,(e.evaluate||F).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(n,function(e,r,n,a,s){return o+=t.slice(i,s).replace(D,U),i=s+e.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var s=function(t){return a.call(this,t,m)},u=e.variable||"obj";return s.source="function("+u+"){\n"+o+"}",s},m.chain=function(t){var e=m(t);return e._chain=!0,e};var z=function(t,e){return t._chain?m(e).chain():e};m.mixin=function(t){m.each(m.functions(t),function(e){var r=m[e]=t[e];m.prototype[e]=function(){var t=[this._wrapped];return s.apply(t,arguments),z(this,r.apply(m,t))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=i[t];m.prototype[t]=function(){var r=this._wrapped;return e.apply(r,arguments),"shift"!==t&&"splice"!==t||0!==r.length||delete r[0],z(this,r)}}),m.each(["concat","join","slice"],function(t){var e=i[t];m.prototype[t]=function(){return z(this,e.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this)},{}],179:[function(t,e,r){e.exports=function(t,e){if(e){e=(e=e.trim().replace(/^(\?|#|&)/,""))?"?"+e:e;var r=t.split(/[\?\#]/),n=r[0];e&&/\:\/\/[^\/]*$/.test(n)&&(n+="/");var i=t.match(/(\#.*)$/);t=n+e,i&&(t+=i[0])}return t}},{}],180:[function(t,e,r){var n=t("xhr-request");e.exports=function(t,e){return new Promise(function(r,i){n(t,e,function(t,e){t?i(t):r(e)})})}},{"xhr-request":181}],181:[function(t,e,r){var n=t("query-string"),i=t("url-set-query"),o=t("object-assign"),a=t("./lib/ensure-header.js"),s=t("./lib/request.js"),u="application/json",f=function(){};e.exports=function(t,e,r){if(!t||"string"!=typeof t)throw new TypeError("must specify a URL");"function"==typeof e&&(r=e,e={});if(r&&"function"!=typeof r)throw new TypeError("expected cb to be undefined or a function");r=r||f;var c=(e=e||{}).json?"json":"text",h=(e=o({responseType:c},e)).headers||{},d=(e.method||"GET").toUpperCase(),l=e.query;l&&("string"!=typeof l&&(l=n.stringify(l)),t=i(t,l));"json"===e.responseType&&a(h,"Accept",u);e.json&&"GET"!==d&&"HEAD"!==d&&(a(h,"Content-Type",u),e.body=JSON.stringify(e.body));return e.method=d,e.url=t,e.headers=h,delete e.query,delete e.json,s(e,r)}},{"./lib/ensure-header.js":182,"./lib/request.js":184,"object-assign":169,"query-string":171,"url-set-query":179}],182:[function(t,e,r){e.exports=function(t,e,r){var n=e.toLowerCase();t[e]||t[n]||(t[e]=r)}},{}],183:[function(t,e,r){e.exports=function(t,e){return e?{statusCode:e.statusCode,headers:e.headers,method:t.method,url:t.url,rawRequest:e.rawRequest?e.rawRequest:e}:null}},{}],184:[function(t,e,r){var n=t("xhr"),i=t("./normalize-response"),o=function(){};e.exports=function(t,e){delete t.uri;var r=!1;"json"===t.responseType&&(t.responseType="text",r=!0);var a=n(t,function(n,a,s){if(r&&!n)try{var u=a.rawRequest.responseText;s=JSON.parse(u)}catch(t){n=t}a=i(t,a),e(n,n?null:s,a),e=o}),s=a.onabort;return a.onabort=function(){var t=s.apply(a,Array.prototype.slice.call(arguments));return e(new Error("XHR Aborted")),e=o,t},a}},{"./normalize-response":183,xhr:185}],185:[function(t,e,r){var n=t("global/window"),i=t("is-function"),o=t("parse-headers"),a=t("xtend");function s(t,e,r){var n=t;return i(e)?(r=e,"string"==typeof t&&(n={uri:t})):n=a(e,{uri:t}),n.callback=r,n}function u(t,e,r){return f(e=s(t,e,r))}function f(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,r=function(r,n,i){e||(e=!0,t.callback(r,n,i))};function n(t){return clearTimeout(c),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,r(t,y)}function i(){if(!s){var e;clearTimeout(c),e=t.useXDR&&void 0===f.status?200:1223===f.status?204:f.status;var n=y,i=null;return 0!==e?(n={body:function(){var t=void 0;if(t=f.response?f.response:f.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}(f),m)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:e,method:d,headers:{},url:h,rawRequest:f},f.getAllResponseHeaders&&(n.headers=o(f.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),r(i,n,n.body)}}var a,s,f=t.xhr||null;f||(f=t.cors||t.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var c,h=f.url=t.uri||t.url,d=f.method=t.method||"GET",l=t.body||t.data,p=f.headers=t.headers||{},b=!!t.sync,m=!1,y={body:void 0,headers:{},statusCode:0,method:d,url:h,rawRequest:f};if("json"in t&&!1!==t.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),l=JSON.stringify(!0===t.json?l:t.json))),f.onreadystatechange=function(){4===f.readyState&&setTimeout(i,0)},f.onload=i,f.onerror=n,f.onprogress=function(){},f.onabort=function(){s=!0},f.ontimeout=n,f.open(d,h,!b,t.username,t.password),b||(f.withCredentials=!!t.withCredentials),!b&&t.timeout>0&&(c=setTimeout(function(){if(!s){s=!0,f.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",n(t)}},t.timeout)),f.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&f.setRequestHeader(a,p[a]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(f.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(f),f.send(l||null),f}e.exports=u,u.XMLHttpRequest=n.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:n.XDomainRequest,function(t,e){for(var r=0;r1?(t[r[0]]=t[r[0]]||{},t[r[0]][r[1]]=e):t[r[0]]=e},f.prototype.getCall=function(t){return n.isFunction(this.call)?this.call(t):this.call},f.prototype.extractCallback=function(t){if(n.isFunction(t[t.length-1]))return t.pop()},f.prototype.validateArgs=function(t){if(t.length!==this.params)throw i.InvalidNumberOfParams(t.length,this.params,this.name)},f.prototype.formatInput=function(t){var e=this;return this.inputFormatter?this.inputFormatter.map(function(r,n){return r?r.call(e,t[n]):t[n]}):t},f.prototype.formatOutput=function(t){var e=this;return n.isArray(t)?t.map(function(t){return e.outputFormatter&&t?e.outputFormatter(t):t}):this.outputFormatter&&t?this.outputFormatter(t):t},f.prototype.toPayload=function(t){var e=this.getCall(t),r=this.extractCallback(t),n=this.formatInput(t);this.validateArgs(n);var i={method:e,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},f.prototype._confirmTransaction=function(t,e,r){var i=this,c=!1,h=!0,d=0,l=0,p=null,b=n.isObject(r.params[0])&&r.params[0].gas?r.params[0].gas:null,m=n.isObject(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,y=[new f({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:o.outputTransactionReceiptFormatter}),new f({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]}),new u({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:o.outputBlockFormatter}}})],v={};n.each(y,function(t){t.attachToObject(v),t.requestManager=i.requestManager});var g=function(r,n,o,u,f){if(!o)return f||(f={unsubscribe:function(){clearInterval(p)}}),(r?s.resolve(r):v.getTransactionReceipt(e)).catch(function(e){f.unsubscribe(),c=!0,a._fireError({message:"Failed to check for transaction receipt:",data:e},t.eventEmitter,t.reject)}).then(function(e){if(!e||!e.blockHash)throw new Error("Receipt missing or blockHash null");return i.extraFormatters&&i.extraFormatters.receiptFormatter&&(e=i.extraFormatters.receiptFormatter(e)),t.eventEmitter.listeners("confirmation").length>0&&(void 0!==r&&0===l||t.eventEmitter.emit("confirmation",l,e),h=!1,25===++l&&(f.unsubscribe(),t.eventEmitter.removeAllListeners())),e}).then(function(e){if(m&&!c){if(!e.contractAddress)return h&&(f.unsubscribe(),c=!0),void a._fireError(new Error("The transaction receipt didn't contain a contract address."),t.eventEmitter,t.reject);v.getCode(e.contractAddress,function(r,n){n&&(n.length>2?(t.eventEmitter.emit("receipt",e),i.extraFormatters&&i.extraFormatters.contractDeployFormatter?t.resolve(i.extraFormatters.contractDeployFormatter(e)):t.resolve(e),h&&t.eventEmitter.removeAllListeners()):a._fireError(new Error("The contract code couldn't be stored, please check your gas limit."),t.eventEmitter,t.reject),h&&f.unsubscribe(),c=!0)})}return e}).then(function(e){m||c||(e.outOfGas||b&&b===e.gasUsed||!0!==e.status&&"0x1"!==e.status&&void 0!==e.status?(e&&(e=JSON.stringify(e,null,2)),!1===e.status||"0x0"===e.status?a._fireError(new Error("Transaction has been reverted by the EVM:\n"+e),t.eventEmitter,t.reject):a._fireError(new Error("Transaction ran out of gas. Please provide more gas:\n"+e),t.eventEmitter,t.reject)):(t.eventEmitter.emit("receipt",e),t.resolve(e),h&&t.eventEmitter.removeAllListeners()),h&&f.unsubscribe(),c=!0)}).catch(function(){d++,n?d-1>=750&&(f.unsubscribe(),c=!0,a._fireError(new Error("Transaction was not mined within750 seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject)):d-1>=50&&(f.unsubscribe(),c=!0,a._fireError(new Error("Transaction was not mined within 50 blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),t.eventEmitter,t.reject))});f.unsubscribe(),c=!0,a._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:o},t.eventEmitter,t.reject)},w=function(t){n.isFunction(this.requestManager.provider.on)?v.subscribe("newBlockHeaders",g.bind(null,t,!1)):p=setInterval(g.bind(null,t,!0),1e3)}.bind(this);v.getTransactionReceipt(e).then(function(e){e&&e.blockHash?(t.eventEmitter.listeners("confirmation").length>0&&w(e),g(e,!1)):c||w()}).catch(function(){c||w()})};var c=function(t,e){return n.isNumber(t)?e.wallet[t]:n.isObject(t)&&t.address&&t.privateKey?t:e.wallet[t.toLowerCase()]};f.prototype.buildCall=function(){var t=this,e="eth_sendTransaction"===t.call||"eth_sendRawTransaction"===t.call,r=function(){var r=s(!e),i=t.toPayload(Array.prototype.slice.call(arguments)),o=function(n,o){try{o=t.formatOutput(o)}catch(t){n=t}if(o instanceof Error&&(n=o),n)return n.error&&(n=n.error),a._fireError(n,r.eventEmitter,r.reject,i.callback);i.callback&&i.callback(null,o),e?(r.eventEmitter.emit("transactionHash",o),t._confirmTransaction(r,o,i)):n||r.resolve(o)},u=function(e){var r=n.extend({},i,{method:"eth_sendRawTransaction",params:[e.rawTransaction]});t.requestManager.send(r,o)},h=function(t,e){var i;if(e&&e.accounts&&e.accounts.wallet&&e.accounts.wallet.length)if("eth_sendTransaction"===t.method){var a=t.params[0];if((i=c(n.isObject(a)?a.from:null,e.accounts))&&i.privateKey)return e.accounts.signTransaction(n.omit(a,"from"),i.privateKey).then(u)}else if("eth_sign"===t.method){var s=t.params[1];if((i=c(t.params[0],e.accounts))&&i.privateKey){var f=e.accounts.sign(s,i.privateKey);return t.callback&&t.callback(null,f.signature),void r.resolve(f.signature)}}return e.requestManager.send(t,o)};e&&n.isObject(i.params[0])&&!i.params[0].gasPrice?new f({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(t.requestManager)(function(e,r){r&&(i.params[0].gasPrice=r),h(i,t)}):h(i,t);return r.eventEmitter};return r.method=t,r.request=this.request.bind(this),r},f.prototype.request=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));return t.format=this.formatOutput.bind(this),t},e.exports=f},{underscore:192,"web3-core-helpers":191,"web3-core-promievent":198,"web3-core-subscriptions":206,"web3-utils":393}],194:[function(t,e,r){e.exports=t("./register")().Promise},{"./register":196}],195:[function(t,e,r){var n="@@any-promise/REGISTRATION",i=null;e.exports=function(t,e){return function(r,o){r=r||null;var a=!1!==(o=o||{}).global;if(null===i&&a&&(i=t[n]||null),null!==i&&null!==r&&i.implementation!==r)throw new Error('any-promise already defined as "'+i.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===i&&(i=null!==r&&void 0!==o.Promise?{Promise:o.Promise,implementation:r}:e(r),a&&(t[n]=i)),i}}},{}],196:[function(t,e,r){e.exports=t("./loader")(window,function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}})},{"./loader":195}],197:[function(t,e,r){var n="function"!=typeof Object.create&&"~";function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(){}o.prototype._events=void 0,o.prototype.listeners=function(t,e){var r=n?n+t:t,i=this._events&&this._events[r];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,a=i.length,s=new Array(a);o1?(t[r[0]]=t[r[0]]||{},t[r[0]][r[1]]=e):t[r[0]]=e},i.prototype.buildCall=function(){var t=this;return function(){t.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var e=new n({subscription:t.subscriptions[arguments[0]],requestManager:t.requestManager,type:t.type});return e.subscribe.apply(e,arguments)}},e.exports={subscriptions:i,subscription:n}},{"./subscription.js":207}],207:[function(t,e,r){var n=t("underscore"),i=t("web3-core-helpers").errors,o=t("eventemitter3");function a(t){o.call(this),this.id=null,this.callback=null,this.arguments=null,this._reconnectIntervalId=null,this.options={subscription:t.subscription,type:t.type,requestManager:t.requestManager}}a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype._extractCallback=function(t){if(n.isFunction(t[t.length-1]))return t.pop()},a.prototype._validateArgs=function(t){var e=this.options.subscription;if(e||(e={}),e.params||(e.params=0),t.length!==e.params)throw i.InvalidNumberOfParams(t.length,e.params+1,t[0])},a.prototype._formatInput=function(t){var e=this.options.subscription;return e&&e.inputFormatter?e.inputFormatter.map(function(e,r){return e?e(t[r]):t[r]}):t},a.prototype._formatOutput=function(t){var e=this.options.subscription;return e&&e.outputFormatter&&t?e.outputFormatter(t):t},a.prototype._toPayload=function(t){var e=[];if(this.callback=this._extractCallback(t),this.subscriptionMethod||(this.subscriptionMethod=t.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(t),this._validateArgs(this.arguments),t=[]),e.push(this.subscriptionMethod),e=e.concat(this.arguments),t.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:e}},a.prototype.unsubscribe=function(t){this.options.requestManager.removeSubscription(this.id,t),this.id=null,this.removeAllListeners(),clearInterval(this._reconnectIntervalId)},a.prototype.subscribe=function(){var t=this,e=Array.prototype.slice.call(arguments),r=this._toPayload(e);if(!r)return this;if(!this.options.requestManager.provider){var i=new Error("No provider set.");return this.callback(i,null,this),this.emit("error",i),this}if(!this.options.requestManager.provider.on){var o=new Error("The current provider doesn't support subscriptions: "+this.options.requestManager.provider.constructor.name);return this.callback(o,null,this),this.emit("error",o),this}return this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&n.isObject(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)&&this.options.requestManager.send({method:"eth_getLogs",params:[r.params[1]]},function(e,r){e?(t.callback(e,null,t),t.emit("error",e)):r.forEach(function(e){var r=t._formatOutput(e);t.callback(null,r,t),t.emit("data",r)})}),"object"===_typeof(r.params[1])&&delete r.params[1].fromBlock,this.options.requestManager.send(r,function(e,i){!e&&i?(t.id=i,t.options.requestManager.addSubscription(t.id,r.params[0],t.options.type,function(e,r){e?(t.options.requestManager.removeSubscription(t.id),t.options.requestManager.provider.once&&(t._reconnectIntervalId=setInterval(function(){t.options.requestManager.provider.reconnect&&t.options.requestManager.provider.reconnect()},500),t.options.requestManager.provider.once("connect",function(){clearInterval(t._reconnectIntervalId),t.subscribe(t.callback)})),t.emit("error",e),n.isFunction(t.callback)&&t.callback(e,null,t)):(n.isArray(r)||(r=[r]),r.forEach(function(e){var r=t._formatOutput(e);if(n.isFunction(t.options.subscription.subscriptionHandler))return t.options.subscription.subscriptionHandler.call(t,r);t.emit("data",r),n.isFunction(t.callback)&&t.callback(null,r,t)}))})):n.isFunction(t.callback)?(t.callback(e,null,t),t.emit("error",e)):t.emit("error",e)}),this},e.exports=a},{eventemitter3:204,underscore:205,"web3-core-helpers":191}],208:[function(t,e,r){var n=t("web3-core-helpers").formatters,i=t("web3-core-method"),o=t("web3-utils");e.exports=function(t){var e=function(e){var r;return e.property?(t[e.property]||(t[e.property]={}),r=t[e.property]):r=t,e.methods&&e.methods.forEach(function(e){e instanceof i||(e=new i(e)),e.attachToObject(r),e.setRequestManager(t._requestManager)}),t};return e.formatters=n,e.utils=o,e.Method=i,e}},{"web3-core-helpers":191,"web3-core-method":193,"web3-utils":393}],209:[function(t,e,r){var n=t("web3-core-requestmanager"),i=t("./extend.js");e.exports={packageInit:function(t,e){if(e=Array.prototype.slice.call(e),!t)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(t,"currentProvider",{get:function(){return t._provider},set:function(e){return t.setProvider(e)},enumerable:!0,configurable:!0}),e[0]&&e[0]._requestManager?t._requestManager=new n.Manager(e[0].currentProvider):(t._requestManager=new n.Manager,t._requestManager.setProvider(e[0],e[1])),t.givenProvider=n.Manager.givenProvider,t.providers=n.Manager.providers,t._provider=t._requestManager.provider,t.setProvider||(t.setProvider=function(e,r){return t._requestManager.setProvider(e,r),t._provider=t._requestManager.provider,!0}),t.BatchRequest=n.BatchManager.bind(null,t._requestManager),t.extend=i(t)},addProviders:function(t){t.givenProvider=n.Manager.givenProvider,t.providers=n.Manager.providers}}},{"./extend.js":208,"web3-core-requestmanager":202}],210:[function(t,e,r){!function(e,r){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===(void 0===e?"undefined":_typeof(e))?e.exports=o:r.BN=o,o.BN=o,o.wordSize=26;try{a=t("buffer").Buffer}catch(t){}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===(void 0===t?"undefined":_typeof(t))&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"===(void 0===t?"undefined":_typeof(t)))return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,f=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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];function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var f=1;f>>26,h=67108863&u,d=Math.min(f,e.length-1),l=Math.max(0,f-t.length+1);l<=d;l++){var p=f-l|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[l])+h)/67108864|0,h=67108863&a}r.words[f]=0|h,u=0|c}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=c[t],l=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(l).toString(t);r=(p=p.idivn(l)).isZero()?b+r:f[d-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,f=new t(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),f[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,l=0|a[1],p=8191&l,b=l>>>13,m=0|a[2],y=8191&m,v=m>>>13,g=0|a[3],w=8191&g,_=g>>>13,M=0|a[4],x=8191&M,k=M>>>13,S=0|a[5],E=8191&S,A=S>>>13,j=0|a[6],I=8191&j,B=j>>>13,T=0|a[7],C=8191&T,P=T>>>13,R=0|a[8],O=8191&R,N=R>>>13,L=0|a[9],F=8191&L,q=L>>>13,D=0|s[0],U=8191&D,z=D>>>13,K=0|s[1],H=8191&K,V=K>>>13,W=0|s[2],X=8191&W,G=W>>>13,J=0|s[3],Z=8191&J,$=J>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ft=st>>>13,ct=0|s[8],ht=8191&ct,dt=ct>>>13,lt=0|s[9],pt=8191<,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(f+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,U)|0))<<13)|0;f=((o=Math.imul(d,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(b,U)|0,o=Math.imul(b,z);var yt=(f+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,H)|0))<<13)|0;f=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,z))+Math.imul(v,U)|0,o=Math.imul(v,z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,V)|0;var vt=(f+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,X)|0))<<13)|0;f=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(y,H)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,G)|0;var gt=(f+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(d,Z)|0))<<13)|0;f=((o=o+Math.imul(d,$)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(x,U),i=(i=Math.imul(x,z))+Math.imul(k,U)|0,o=Math.imul(k,z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,$)|0;var wt=(f+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,Q)|0))<<13)|0;f=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,U),i=(i=Math.imul(E,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var _t=(f+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(d,rt)|0))<<13)|0;f=((o=o+Math.imul(d,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(B,U)|0,o=Math.imul(B,z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var Mt=(f+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(d,ot)|0))<<13)|0;f=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,z))+Math.imul(P,U)|0,o=Math.imul(P,z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,H)|0,o=o+Math.imul(B,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0;var xt=(f+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(d,ut)|0))<<13)|0;f=((o=o+Math.imul(d,ft)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(N,U)|0,o=Math.imul(N,z),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ft)|0;var kt=(f+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;f=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,z))+Math.imul(q,U)|0,o=Math.imul(q,z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,V)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ft)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var St=(f+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(d,pt)|0))<<13)|0;f=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,V))+Math.imul(q,H)|0,o=Math.imul(q,V),n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ft)|0,n=n+Math.imul(y,ht)|0,i=(i=i+Math.imul(y,dt)|0)+Math.imul(v,ht)|0,o=o+Math.imul(v,dt)|0;var Et=(f+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;f=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,X),i=(i=Math.imul(F,G))+Math.imul(q,X)|0,o=Math.imul(q,G),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,$)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ft)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0;var At=(f+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,bt)|0)+Math.imul(v,pt)|0))<<13)|0;f=((o=o+Math.imul(v,bt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,$))+Math.imul(q,Z)|0,o=Math.imul(q,$),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,dt)|0;var jt=(f+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;f=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ft)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,dt)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,dt)|0;var It=(f+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(k,pt)|0))<<13)|0;f=((o=o+Math.imul(k,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ft)|0,n=n+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,dt)|0;var Bt=(f+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,bt)|0)+Math.imul(A,pt)|0))<<13)|0;f=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,at))+Math.imul(q,ot)|0,o=Math.imul(q,at),n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ft)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,dt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,dt)|0;var Tt=(f+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,bt)|0)+Math.imul(B,pt)|0))<<13)|0;f=((o=o+Math.imul(B,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,ft))+Math.imul(q,ut)|0,o=Math.imul(q,ft),n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(N,ht)|0,o=o+Math.imul(N,dt)|0;var Ct=(f+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(P,pt)|0))<<13)|0;f=((o=o+Math.imul(P,bt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,ht),i=(i=Math.imul(F,dt))+Math.imul(q,ht)|0,o=Math.imul(q,dt);var Pt=(f+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,bt)|0)+Math.imul(N,pt)|0))<<13)|0;f=((o=o+Math.imul(N,bt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Rt=(f+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,bt))+Math.imul(q,pt)|0))<<13)|0;return f=((o=Math.imul(q,bt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=mt,u[1]=yt,u[2]=vt,u[3]=gt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=xt,u[8]=kt,u[9]=St,u[10]=Et,u[11]=At,u[12]=jt,u[13]=It,u[14]=Bt,u[15]=Tt,u[16]=Ct,u[17]=Pt,u[18]=Rt,0!==f&&(u[19]=f,r.length++),r};function p(t,e,r){return(new b).mulp(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(l=d),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?l(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,f=0;f=0&&(0!==c||f>=i);f--){var h=0|this.words[f];this.words[f]=c<<26-o|h>>>o,c=h&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var f=0;f=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=d)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var d=0,l=1;0==(e.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(v,y),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new g;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return m[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,f).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),p=a;0!==l.cmp(s);){for(var b=l,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var f=e.words[n],c=u-1;c>=0;c--){var h=f>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{}],211:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],212:[function(t,e,r){var n=t("underscore"),i=t("web3-utils"),o=t("bn.js"),a=t("./param"),s=function(t){return n.isNumber(t)&&(t=Math.trunc(t)),new a(i.toTwosComplement(t).replace("0x",""))};e.exports={formatInputInt:s,formatInputBytes:function(t){if(!i.isHexStrict(t))throw new Error('Given parameter is not bytes: "'+t+'"');var e=t.replace(/^0x/i,"");if(e.length%2!=0)throw new Error('Given parameter bytes has an invalid length: "'+t+'"');if(e.length>64)throw new Error('Given parameter bytes is too long: "'+t+'"');var r=Math.floor((e.length+63)/64);return e=i.padRight(e,64*r),new a(e)},formatInputDynamicBytes:function(t){if(!i.isHexStrict(t))throw new Error('Given parameter is not bytes: "'+t+'"');var e=t.replace(/^0x/i,"");if(e.length%2!=0)throw new Error('Given parameter bytes has an invalid length: "'+t+'"');var r=e.length/2,n=Math.floor((e.length+63)/64);return e=i.padRight(e,64*n),new a(s(r).value+e)},formatInputString:function(t){if(!n.isString(t))throw new Error("Given parameter is not a valid string: "+t);var e=i.utf8ToHex(t).replace(/^0x/i,""),r=e.length/2,o=Math.floor((e.length+63)/64);return e=i.padRight(e,64*o),new a(s(r).value+e)},formatInputBool:function(t){return new a("000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0"))},formatOutputInt:function(t){var e=t.staticPart();if(!e&&!t.rawValue)throw new Error("Couldn't decode "+name+" from ABI: 0x"+t.rawValue);return"1"===new o(e.substr(0,1),16).toString(2).substr(0,1)?new o(e,16).fromTwos(256).toString(10):new o(e,16).toString(10)},formatOutputUInt:function(t,e){var r=t.staticPart();if(!r&&!t.rawValue)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);return new o(r,16).toString(10)},formatOutputBool:function(t,e){var r=t.staticPart();if(!r&&!t.rawValue)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);return"0000000000000000000000000000000000000000000000000000000000000001"===r},formatOutputBytes:function(t,e){var r=e.match(/^bytes([0-9]*)/),n=parseInt(r[1]);if(t.staticPart().slice(0,2*n).length!==2*n)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue+" The size doesn't match.");return"0x"+t.staticPart().slice(0,2*n)},formatOutputDynamicBytes:function(t,e){var r=t.dynamicPart().slice(0,64);if(!r)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);var n=2*new o(r,16).toNumber();return"0x"+t.dynamicPart().substr(64,n)},formatOutputString:function(t){var e=t.dynamicPart().slice(0,64);if(!e)throw new Error("ERROR: The returned value is not a convertible string:"+e);var r=2*new o(e,16).toNumber();return r?i.hexToUtf8("0x"+t.dynamicPart().substr(64,r).replace(/^0x/i,"")):""},formatOutputAddress:function(t,e){var r=t.staticPart();if(!r)throw new Error("Couldn't decode "+e+" from ABI: 0x"+t.rawValue);return i.toChecksumAddress("0x"+r.slice(r.length-40,r.length))},toTwosComplement:i.toTwosComplement}},{"./param":214,"bn.js":210,underscore:211,"web3-utils":393}],213:[function(t,e,r){var n=t("underscore"),i=t("web3-utils"),o=t("./formatters"),a=t("./types/address"),s=t("./types/bool"),u=t("./types/int"),f=t("./types/uint"),c=t("./types/dynamicbytes"),h=t("./types/string"),d=t("./types/bytes"),l=function(t,e){return t.isDynamicType(e)||t.isDynamicArray(e)};function p(){}var b=function(t){this._types=t};b.prototype._requireType=function(t){var e=this._types.filter(function(e){return e.isType(t)})[0];if(!e)throw Error("Invalid solidity type: "+t);return e},b.prototype._getOffsets=function(t,e){for(var r=e.map(function(e,r){return e.staticPartLength(t[r])}),n=1;n=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===(void 0===t?"undefined":_typeof(t))&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"===(void 0===t?"undefined":_typeof(t)))return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,f=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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];function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var f=1;f>>26,h=67108863&u,d=Math.min(f,e.length-1),l=Math.max(0,f-t.length+1);l<=d;l++){var p=f-l|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[l])+h)/67108864|0,h=67108863&a}r.words[f]=0|h,u=0|c}return 0!==u?r.words[f]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var d=c[t],l=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(l).toString(t);r=(p=p.idivn(l)).isZero()?b+r:f[d-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,f=new t(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),f[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,l=0|a[1],p=8191&l,b=l>>>13,m=0|a[2],y=8191&m,v=m>>>13,g=0|a[3],w=8191&g,_=g>>>13,M=0|a[4],x=8191&M,k=M>>>13,S=0|a[5],E=8191&S,A=S>>>13,j=0|a[6],I=8191&j,B=j>>>13,T=0|a[7],C=8191&T,P=T>>>13,R=0|a[8],O=8191&R,N=R>>>13,L=0|a[9],F=8191&L,q=L>>>13,D=0|s[0],U=8191&D,z=D>>>13,K=0|s[1],H=8191&K,V=K>>>13,W=0|s[2],X=8191&W,G=W>>>13,J=0|s[3],Z=8191&J,$=J>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ft=st>>>13,ct=0|s[8],ht=8191&ct,dt=ct>>>13,lt=0|s[9],pt=8191<,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(f+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,U)|0))<<13)|0;f=((o=Math.imul(d,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(b,U)|0,o=Math.imul(b,z);var yt=(f+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,H)|0))<<13)|0;f=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,z))+Math.imul(v,U)|0,o=Math.imul(v,z),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,V)|0;var vt=(f+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,X)|0))<<13)|0;f=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(y,H)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,V)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,G)|0;var gt=(f+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(d,Z)|0))<<13)|0;f=((o=o+Math.imul(d,$)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(x,U),i=(i=Math.imul(x,z))+Math.imul(k,U)|0,o=Math.imul(k,z),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,$)|0;var wt=(f+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,Q)|0))<<13)|0;f=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,U),i=(i=Math.imul(E,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(x,H)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var _t=(f+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(d,rt)|0))<<13)|0;f=((o=o+Math.imul(d,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(B,U)|0,o=Math.imul(B,z),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var Mt=(f+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(d,ot)|0))<<13)|0;f=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,z))+Math.imul(P,U)|0,o=Math.imul(P,z),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,H)|0,o=o+Math.imul(B,V)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0;var xt=(f+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(d,ut)|0))<<13)|0;f=((o=o+Math.imul(d,ft)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(N,U)|0,o=Math.imul(N,z),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ft)|0;var kt=(f+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;f=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,z))+Math.imul(q,U)|0,o=Math.imul(q,z),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,V)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,V)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ft)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var St=(f+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(d,pt)|0))<<13)|0;f=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,V))+Math.imul(q,H)|0,o=Math.imul(q,V),n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ft)|0,n=n+Math.imul(y,ht)|0,i=(i=i+Math.imul(y,dt)|0)+Math.imul(v,ht)|0,o=o+Math.imul(v,dt)|0;var Et=(f+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;f=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,X),i=(i=Math.imul(F,G))+Math.imul(q,X)|0,o=Math.imul(q,G),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,$)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ft)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0;var At=(f+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,bt)|0)+Math.imul(v,pt)|0))<<13)|0;f=((o=o+Math.imul(v,bt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,$))+Math.imul(q,Z)|0,o=Math.imul(q,$),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ft)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,dt)|0;var jt=(f+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;f=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(q,Q)|0,o=Math.imul(q,tt),n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ft)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,dt)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,dt)|0;var It=(f+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(k,pt)|0))<<13)|0;f=((o=o+Math.imul(k,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ft)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ft)|0,n=n+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,dt)|0;var Bt=(f+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,bt)|0)+Math.imul(A,pt)|0))<<13)|0;f=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,at))+Math.imul(q,ot)|0,o=Math.imul(q,at),n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ft)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ft)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,dt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,dt)|0;var Tt=(f+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,bt)|0)+Math.imul(B,pt)|0))<<13)|0;f=((o=o+Math.imul(B,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,ft))+Math.imul(q,ut)|0,o=Math.imul(q,ft),n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(N,ht)|0,o=o+Math.imul(N,dt)|0;var Ct=(f+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(P,pt)|0))<<13)|0;f=((o=o+Math.imul(P,bt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,ht),i=(i=Math.imul(F,dt))+Math.imul(q,ht)|0,o=Math.imul(q,dt);var Pt=(f+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,bt)|0)+Math.imul(N,pt)|0))<<13)|0;f=((o=o+Math.imul(N,bt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Rt=(f+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,bt))+Math.imul(q,pt)|0))<<13)|0;return f=((o=Math.imul(q,bt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=mt,u[1]=yt,u[2]=vt,u[3]=gt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=xt,u[8]=kt,u[9]=St,u[10]=Et,u[11]=At,u[12]=jt,u[13]=It,u[14]=Bt,u[15]=Tt,u[16]=Ct,u[17]=Pt,u[18]=Rt,0!==f&&(u[19]=f,r.length++),r};function p(t,e,r){return(new b).mulp(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(l=d),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?l(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,f=0;f=0&&(0!==c||f>=i);f--){var h=0|this.words[f];this.words[f]=c<<26-o|h>>>o,c=h&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var f=0;f=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=d)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),f=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++f;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var d=0,l=1;0==(e.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(h)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(f)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(v,y),v.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new g;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return m[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,f).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),p=a;0!==l.cmp(s);){for(var b=l,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var f=e.words[n],c=u-1;c>=0;c--){var h=f>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,M),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:17}],241:[function(t,e,r){arguments[4][16][0].apply(r,arguments)},{crypto:17,dup:16}],242:[function(t,e,r){arguments[4][18][0].apply(r,arguments)},{dup:18,"safe-buffer":350}],243:[function(t,e,r){arguments[4][19][0].apply(r,arguments)},{"./aes":242,"./ghash":247,"./incr32":248,"buffer-xor":269,"cipher-base":270,dup:19,inherits:325,"safe-buffer":350}],244:[function(t,e,r){arguments[4][20][0].apply(r,arguments)},{"./decrypter":245,"./encrypter":246,"./modes/list.json":256,dup:20}],245:[function(t,e,r){arguments[4][21][0].apply(r,arguments)},{"./aes":242,"./authCipher":243,"./modes":255,"./streamCipher":258,"cipher-base":270,dup:21,evp_bytestokey:310,inherits:325,"safe-buffer":350}],246:[function(t,e,r){arguments[4][22][0].apply(r,arguments)},{"./aes":242,"./authCipher":243,"./modes":255,"./streamCipher":258,"cipher-base":270,dup:22,evp_bytestokey:310,inherits:325,"safe-buffer":350}],247:[function(t,e,r){arguments[4][23][0].apply(r,arguments)},{dup:23,"safe-buffer":350}],248:[function(t,e,r){arguments[4][24][0].apply(r,arguments)},{dup:24}],249:[function(t,e,r){arguments[4][25][0].apply(r,arguments)},{"buffer-xor":269,dup:25}],250:[function(t,e,r){arguments[4][26][0].apply(r,arguments)},{"buffer-xor":269,dup:26,"safe-buffer":350}],251:[function(t,e,r){arguments[4][27][0].apply(r,arguments)},{dup:27,"safe-buffer":350}],252:[function(t,e,r){arguments[4][28][0].apply(r,arguments)},{dup:28,"safe-buffer":350}],253:[function(t,e,r){arguments[4][29][0].apply(r,arguments)},{"../incr32":248,"buffer-xor":269,dup:29,"safe-buffer":350}],254:[function(t,e,r){arguments[4][30][0].apply(r,arguments)},{dup:30}],255:[function(t,e,r){arguments[4][31][0].apply(r,arguments)},{"./cbc":249,"./cfb":250,"./cfb1":251,"./cfb8":252,"./ctr":253,"./ecb":254,"./list.json":256,"./ofb":257,dup:31}],256:[function(t,e,r){arguments[4][32][0].apply(r,arguments)},{dup:32}],257:[function(t,e,r){(function(e){var n=t("buffer-xor");r.encrypt=function(t,r){for(;t._cache.length=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new n(i(e));return r}e.exports=o,o.getr=a}).call(this,t("buffer").Buffer)},{"bn.js":240,buffer:47,randombytes:347}],263:[function(t,e,r){arguments[4][39][0].apply(r,arguments)},{"./browser/algorithms.json":264,dup:39}],264:[function(t,e,r){arguments[4][40][0].apply(r,arguments)},{dup:40}],265:[function(t,e,r){arguments[4][41][0].apply(r,arguments)},{dup:41}],266:[function(t,e,r){(function(r){var n=t("create-hash"),i=t("stream"),o=t("inherits"),a=t("./sign"),s=t("./verify"),u=t("./algorithms.json");function f(t){i.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function c(t){i.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){return new f(t)}function d(t){return new c(t)}Object.keys(u).forEach(function(t){u[t].id=new r(u[t].id,"hex"),u[t.toLowerCase()]=u[t]}),o(f,i.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return"string"==typeof t&&(t=new r(t,e)),this._hash.update(t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=a(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},o(c,i.Writable),c.prototype._write=function(t,e,r){this._hash.update(t),r()},c.prototype.update=function(t,e){return"string"==typeof t&&(t=new r(t,e)),this._hash.update(t),this},c.prototype.verify=function(t,e,n){"string"==typeof e&&(e=new r(e,n)),this.end();var i=this._hash.digest();return s(e,i,t,this._signType,this._tag)},e.exports={Sign:h,Verify:d,createSign:h,createVerify:d}}).call(this,t("buffer").Buffer)},{"./algorithms.json":264,"./sign":267,"./verify":268,buffer:47,"create-hash":272,inherits:325,stream:156}],267:[function(t,e,r){(function(r){var n=t("create-hmac"),i=t("browserify-rsa"),o=t("elliptic").ec,a=t("bn.js"),s=t("parse-asn1"),u=t("./curves.json");function f(t,e,i,o){if((t=new r(t.toArray())).length0&&r.ishrn(n),r}function h(t,e,i){var o,a;do{for(o=new r(0);8*o.length=e)throw new Error("invalid sig")}e.exports=function(t,e,u,f,c){var h=o(u);if("ec"===h.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(t,e,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new i(n),s=r.data.subjectPrivateKey.data;return o.verify(e,t,s)}(t,e,h)}if("dsa"===h.type){if("dsa"!==f)throw new Error("wrong public key type");return function(t,e,r){var i=r.data.p,a=r.data.q,u=r.data.g,f=r.data.pub_key,c=o.signature.decode(t,"der"),h=c.s,d=c.r;s(h,a),s(d,a);var l=n.mont(i),p=h.invm(a);return 0===u.toRed(l).redPow(new n(e).mul(p).mod(a)).fromRed().mul(f.toRed(l).redPow(d.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(d)}(t,e,h)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");e=r.concat([c,e]);for(var d=h.modulus.byteLength(),l=[1],p=0;e.length+l.length+2>>2),a=0,s=0;a=6.0.0 <7.0.0",type:"range"},"/Users/frozeman/Sites/_ethereum/web3/packages/web3-eth-accounts/node_modules/browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.4.0",_inCache:!0,_location:"/elliptic",_nodeVersion:"7.0.0",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"},_npmUser:{name:"indutny",email:"fedor@indutny.com"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh","/eth-lib"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"/Users/frozeman/Sites/_ethereum/web3/packages/web3-eth-accounts/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"},files:["lib"],gitHead:"6b0d2b76caae91471649c8e21f0b1d3ba0f96090",homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],304:[function(t,e,r){(function(r){var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=t("./bytes"),o=t("./nat"),a=t("elliptic"),s=(t("./rlp"),new a.ec("secp256k1")),u=t("./hash"),f=u.keccak256,c=u.keccak256s,h=function(t){for(var e=c(t.slice(2)),r="0x",n=0;n<40;n++)r+=parseInt(e[n+2],16)>7?t[n+2].toUpperCase():t[n+2];return r},d=function(t){var e=new r(t.slice(2),"hex"),n="0x"+s.keyFromPrivate(e).getPublic(!1,"hex").slice(2),i=f(n);return{address:h("0x"+i.slice(-40)),privateKey:t}},l=function(t){var e=n(t,3),r=e[0],o=i.pad(32,e[1]),a=i.pad(32,e[2]);return i.flatten([o,a,r])},p=function(t){return[i.slice(64,i.length(t),t),i.slice(0,32,t),i.slice(32,64,t)]},b=function(t){return function(e,n){var a=s.keyFromPrivate(new r(n.slice(2),"hex")).sign(new r(e.slice(2),"hex"),{canonical:!0});return l([o.fromString(i.fromNumber(t+a.recoveryParam)),i.pad(32,i.fromNat("0x"+a.r.toString(16))),i.pad(32,i.fromNat("0x"+a.s.toString(16)))])}},m=b(27);e.exports={create:function(t){var e=f(i.concat(i.random(32),t||i.random(32))),r=i.concat(i.concat(i.random(32),e),i.random(32)),n=f(r);return d(n)},toChecksum:h,fromPrivate:d,sign:m,makeSigner:b,recover:function(t,e){var n=p(e),o={v:i.toNumber(n[0]),r:n[1].slice(2),s:n[2].slice(2)},a="0x"+s.recoverPubKey(new r(t.slice(2),"hex"),o,o.v<2?o.v:1-o.v%2).encode("hex",!1).slice(2),u=f(a);return h("0x"+u.slice(-40))},encodeSignature:l,decodeSignature:p}}).call(this,t("buffer").Buffer)},{"./bytes":306,"./hash":307,"./nat":308,"./rlp":309,buffer:47,elliptic:288}],305:[function(t,e,r){arguments[4][163][0].apply(r,arguments)},{dup:163}],306:[function(t,e,r){arguments[4][164][0].apply(r,arguments)},{"./array.js":305,dup:164}],307:[function(t,e,r){arguments[4][165][0].apply(r,arguments)},{dup:165}],308:[function(t,e,r){var n=t("bn.js"),i=t("./bytes"),o=function(t){return new n(t.slice(2),16)},a=function(t){var e="0x"+("0x"===t.slice(0,2)?new n(t.slice(2),16):new n(t,10)).toString("hex");return"0x0"===e?"0x":e},s=function(t){return"string"==typeof t?/^0x/.test(t)?t:"0x"+t:"0x"+new n(t).toString("hex")},u=function(t){return o(t).toNumber()},f=function(t){return function(e,r){return"0x"+o(e)[t](o(r)).toString("hex")}},c=f("add"),h=f("mul"),d=f("div"),l=f("sub");e.exports={toString:function(t){return o(t).toString(10)},fromString:a,toNumber:u,fromNumber:s,toEther:function(t){return u(d(t,a("10000000000")))/1e8},fromEther:function(t){return h(s(Math.floor(1e8*t)),a("10000000000"))},toUint256:function(t){return i.pad(32,t)},add:c,mul:h,div:d,sub:l}},{"./bytes":306,"bn.js":240}],309:[function(t,e,r){e.exports={encode:function(t){var e=function(t){return(e=t.toString(16)).length%2==0?e:"0"+e;var e},r=function(t,r){return t<56?e(r+t):e(r+e(t).length/2+55)+e(t)};return"0x"+function t(e){if("string"==typeof e){var n=e.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var i=e.map(t).join("");return r(i.length/2,192)+i}(t)},decode:function(t){var e=2,r=function(){if(e>=t.length)throw"";var r=t.slice(e,e+2);return r<"80"?(e+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(t.slice(e,e+=2),16)%64;return r<56?r:parseInt(t.slice(e,e+=2*(r-55)),16)},i=function(){var r=n();return"0x"+t.slice(e,e+=2*r)},o=function(){for(var t=2*n()+e,i=[];e=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},i.prototype._update=function(t){throw new Error("_update is not implemented")},i.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();return void 0!==t&&(e=e.toString(t)),e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i}).call(this,t("buffer").Buffer)},{buffer:47,inherits:325,stream:156}],312:[function(t,e,r){arguments[4][86][0].apply(r,arguments)},{"./hash/common":313,"./hash/hmac":314,"./hash/ripemd":315,"./hash/sha":316,"./hash/utils":323,dup:86}],313:[function(t,e,r){arguments[4][87][0].apply(r,arguments)},{"./utils":323,dup:87,"minimalistic-assert":329}],314:[function(t,e,r){arguments[4][88][0].apply(r,arguments)},{"./utils":323,dup:88,"minimalistic-assert":329}],315:[function(t,e,r){arguments[4][89][0].apply(r,arguments)},{"./common":313,"./utils":323,dup:89}],316:[function(t,e,r){arguments[4][90][0].apply(r,arguments)},{"./sha/1":317,"./sha/224":318,"./sha/256":319,"./sha/384":320,"./sha/512":321,dup:90}],317:[function(t,e,r){arguments[4][91][0].apply(r,arguments)},{"../common":313,"../utils":323,"./common":322,dup:91}],318:[function(t,e,r){arguments[4][92][0].apply(r,arguments)},{"../utils":323,"./256":319,dup:92}],319:[function(t,e,r){arguments[4][93][0].apply(r,arguments)},{"../common":313,"../utils":323,"./common":322,dup:93,"minimalistic-assert":329}],320:[function(t,e,r){arguments[4][94][0].apply(r,arguments)},{"../utils":323,"./512":321,dup:94}],321:[function(t,e,r){arguments[4][95][0].apply(r,arguments)},{"../common":313,"../utils":323,dup:95,"minimalistic-assert":329}],322:[function(t,e,r){arguments[4][96][0].apply(r,arguments)},{"../utils":323,dup:96}],323:[function(t,e,r){arguments[4][97][0].apply(r,arguments)},{dup:97,inherits:325,"minimalistic-assert":329}],324:[function(t,e,r){arguments[4][98][0].apply(r,arguments)},{dup:98,"hash.js":312,"minimalistic-assert":329,"minimalistic-crypto-utils":330}],325:[function(t,e,r){arguments[4][101][0].apply(r,arguments)},{dup:101}],326:[function(t,e,r){(function(r){var n=t("inherits"),i=t("hash-base"),o=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(t,e){return t<>>32-e}function u(t,e,r,n,i,o,a){return s(t+(e&r|~e&n)+i+o|0,a)+e|0}function f(t,e,r,n,i,o,a){return s(t+(e&n|r&~n)+i+o|0,a)+e|0}function c(t,e,r,n,i,o,a){return s(t+(e^r^n)+i+o|0,a)+e|0}function h(t,e,r,n,i,o,a){return s(t+(r^(e|~n))+i+o|0,a)+e|0}n(a,i),a.prototype._update=function(){for(var t=o,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,a=this._d;n=h(n=h(n=h(n=h(n=c(n=c(n=c(n=c(n=f(n=f(n=f(n=f(n=u(n=u(n=u(n=u(n,i=u(i,a=u(a,r=u(r,n,i,a,t[0],3614090360,7),n,i,t[1],3905402710,12),r,n,t[2],606105819,17),a,r,t[3],3250441966,22),i=u(i,a=u(a,r=u(r,n,i,a,t[4],4118548399,7),n,i,t[5],1200080426,12),r,n,t[6],2821735955,17),a,r,t[7],4249261313,22),i=u(i,a=u(a,r=u(r,n,i,a,t[8],1770035416,7),n,i,t[9],2336552879,12),r,n,t[10],4294925233,17),a,r,t[11],2304563134,22),i=u(i,a=u(a,r=u(r,n,i,a,t[12],1804603682,7),n,i,t[13],4254626195,12),r,n,t[14],2792965006,17),a,r,t[15],1236535329,22),i=f(i,a=f(a,r=f(r,n,i,a,t[1],4129170786,5),n,i,t[6],3225465664,9),r,n,t[11],643717713,14),a,r,t[0],3921069994,20),i=f(i,a=f(a,r=f(r,n,i,a,t[5],3593408605,5),n,i,t[10],38016083,9),r,n,t[15],3634488961,14),a,r,t[4],3889429448,20),i=f(i,a=f(a,r=f(r,n,i,a,t[9],568446438,5),n,i,t[14],3275163606,9),r,n,t[3],4107603335,14),a,r,t[8],1163531501,20),i=f(i,a=f(a,r=f(r,n,i,a,t[13],2850285829,5),n,i,t[2],4243563512,9),r,n,t[7],1735328473,14),a,r,t[12],2368359562,20),i=c(i,a=c(a,r=c(r,n,i,a,t[5],4294588738,4),n,i,t[8],2272392833,11),r,n,t[11],1839030562,16),a,r,t[14],4259657740,23),i=c(i,a=c(a,r=c(r,n,i,a,t[1],2763975236,4),n,i,t[4],1272893353,11),r,n,t[7],4139469664,16),a,r,t[10],3200236656,23),i=c(i,a=c(a,r=c(r,n,i,a,t[13],681279174,4),n,i,t[0],3936430074,11),r,n,t[3],3572445317,16),a,r,t[6],76029189,23),i=c(i,a=c(a,r=c(r,n,i,a,t[9],3654602809,4),n,i,t[12],3873151461,11),r,n,t[15],530742520,16),a,r,t[2],3299628645,23),i=h(i,a=h(a,r=h(r,n,i,a,t[0],4096336452,6),n,i,t[7],1126891415,10),r,n,t[14],2878612391,15),a,r,t[5],4237533241,21),i=h(i,a=h(a,r=h(r,n,i,a,t[12],1700485571,6),n,i,t[3],2399980690,10),r,n,t[10],4293915773,15),a,r,t[1],2240044497,21),i=h(i,a=h(a,r=h(r,n,i,a,t[8],1873313359,6),n,i,t[15],4264355552,10),r,n,t[6],2734768916,15),a,r,t[13],1309151649,21),i=h(i,a=h(a,r=h(r,n,i,a,t[4],4149444226,6),n,i,t[11],3174756917,10),r,n,t[2],718787259,15),a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new r(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},e.exports=a}).call(this,t("buffer").Buffer)},{buffer:47,"hash-base":327,inherits:325}],327:[function(t,e,r){arguments[4][105][0].apply(r,arguments)},{dup:105,inherits:325,"safe-buffer":350,stream:156}],328:[function(t,e,r){arguments[4][106][0].apply(r,arguments)},{"bn.js":240,brorand:241,dup:106}],329:[function(t,e,r){arguments[4][107][0].apply(r,arguments)},{dup:107}],330:[function(t,e,r){arguments[4][108][0].apply(r,arguments)},{dup:108}],331:[function(t,e,r){arguments[4][109][0].apply(r,arguments)},{dup:109}],332:[function(t,e,r){arguments[4][110][0].apply(r,arguments)},{"./certificate":333,"asn1.js":226,dup:110}],333:[function(t,e,r){arguments[4][111][0].apply(r,arguments)},{"asn1.js":226,dup:111}],334:[function(t,e,r){(function(r){var n=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,i=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,o=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,a=t("evp_bytestokey"),s=t("browserify-aes");e.exports=function(t,e){var u,f=t.toString(),c=f.match(n);if(c){var h="aes"+c[1],d=new r(c[2],"hex"),l=new r(c[3].replace(/\r?\n/g,""),"base64"),p=a(e,d.slice(0,8),parseInt(c[1],10)).key,b=[],m=s.createDecipheriv(h,p,d);b.push(m.update(l)),b.push(m.final()),u=r.concat(b)}else{var y=f.match(o);u=new r(y[2].replace(/\r?\n/g,""),"base64")}return{tag:f.match(i)[1],data:u}}}).call(this,t("buffer").Buffer)},{"browserify-aes":244,buffer:47,evp_bytestokey:310}],335:[function(t,e,r){(function(r){var n=t("./asn1"),i=t("./aesid.json"),o=t("./fixProc"),a=t("browserify-aes"),s=t("pbkdf2");function u(t){var e;"object"!==(void 0===t?"undefined":_typeof(t))||r.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=new r(t));var u,f,c,h,d,l,p,b,m,y,v,g,w,_=o(t,e),M=_.tag,x=_.data;switch(M){case"CERTIFICATE":f=n.certificate.decode(x,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=n.PublicKey.decode(x,"der")),u=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=n.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+M);case"ENCRYPTED PRIVATE KEY":x=n.EncryptedPrivateKey.decode(x,"der"),h=e,d=(c=x).algorithm.decrypt.kde.kdeparams.salt,l=parseInt(c.algorithm.decrypt.kde.kdeparams.iters.toString(),10),p=i[c.algorithm.decrypt.cipher.algo.join(".")],b=c.algorithm.decrypt.cipher.iv,m=c.subjectPrivateKey,y=parseInt(p.split("-")[1],10)/8,v=s.pbkdf2Sync(h,d,l,y),g=a.createDecipheriv(p,v,b),(w=[]).push(g.update(m)),w.push(g.final()),x=r.concat(w);case"PRIVATE KEY":switch(u=(f=n.PrivateKey.decode(x,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:n.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=n.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+u)}throw new Error("unknown key type "+M);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(x,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(x,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(x,"der")};case"EC PRIVATE KEY":return{curve:(x=n.ECPrivateKey.decode(x,"der")).parameters.value,privateKey:x.privateKey};default:throw new Error("unknown key type "+M)}}e.exports=u,u.signature=n.signature}).call(this,t("buffer").Buffer)},{"./aesid.json":331,"./asn1":332,"./fixProc":334,"browserify-aes":244,buffer:47,pbkdf2:336}],336:[function(t,e,r){arguments[4][114][0].apply(r,arguments)},{"./lib/async":337,"./lib/sync":340,dup:114}],337:[function(t,e,r){(function(r,n){var i,o=t("./precondition"),a=t("./default-encoding"),s=t("./sync"),u=t("safe-buffer").Buffer,f=n.crypto&&n.crypto.subtle,c={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function d(t,e,r,n,i){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)}).then(function(t){return u.from(t)})}e.exports=function(t,e,l,p,b,m){if(u.isBuffer(t)||(t=u.from(t,a)),u.isBuffer(e)||(e=u.from(e,a)),o(l,p),"function"==typeof b&&(m=b,b=void 0),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");var y,v,g=c[(b=b||"sha1").toLowerCase()];if(!g||"function"!=typeof n.Promise)return r.nextTick(function(){var r;try{r=s(t,e,l,p,b)}catch(t){return m(t)}m(null,r)});y=function(t){if(n.process&&!n.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==h[t])return h[t];var e=d(i=i||u.alloc(8),i,10,128,t).then(function(){return!0}).catch(function(){return!1});return h[t]=e,e}(g).then(function(r){return r?d(t,e,l,p,g):s(t,e,l,p,b)}),v=m,y.then(function(t){r.nextTick(function(){v(null,t)})},function(t){r.nextTick(function(){v(t)})})}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":338,"./precondition":339,"./sync":340,_process:120,"safe-buffer":350}],338:[function(t,e,r){(function(t){var r;t.browser?r="utf-8":r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";e.exports=r}).call(this,t("_process"))},{_process:120}],339:[function(t,e,r){arguments[4][117][0].apply(r,arguments)},{dup:117}],340:[function(t,e,r){arguments[4][118][0].apply(r,arguments)},{"./default-encoding":338,"./precondition":339,"create-hash/md5":274,dup:118,ripemd160:349,"safe-buffer":350,"sha.js":354}],341:[function(t,e,r){arguments[4][121][0].apply(r,arguments)},{"./privateDecrypt":343,"./publicEncrypt":344,dup:121}],342:[function(t,e,r){(function(r){var n=t("create-hash");function i(t){var e=new r(4);return e.writeUInt32BE(t,0),e}e.exports=function(t,e){for(var o,a=new r(""),s=0;a.lengthp||new a(e).cmp(l.modulus)>=0)throw new Error("decryption error");d=c?f(new a(e),l):s(e,l);var b=new r(p-d.length);if(b.fill(0),d=r.concat([b,d],p),4===h)return function(t,e){t.modulus;var n=t.modulus.byteLength(),a=(e.length,u("sha1").update(new r("")).digest()),s=a.length;if(0!==e[0])throw new Error("decryption error");var f=e.slice(1,s+1),c=e.slice(s+1),h=o(f,i(c,s)),d=o(c,i(h,n-s-1));if(function(t,e){t=new r(t),e=new r(e);var n=0,i=t.length;t.length!==e.length&&(n++,i=Math.min(t.length,e.length));var o=-1;for(;++o=e.length){o++;break}var a=e.slice(2,i-1);e.slice(i-1,i);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,d,c);if(3===h)return d;throw new Error("unknown padding")}}).call(this,t("buffer").Buffer)},{"./mgf":342,"./withPublic":345,"./xor":346,"bn.js":240,"browserify-rsa":262,buffer:47,"create-hash":272,"parse-asn1":335}],344:[function(t,e,r){(function(r){var n=t("parse-asn1"),i=t("randombytes"),o=t("create-hash"),a=t("./mgf"),s=t("./xor"),u=t("bn.js"),f=t("./withPublic"),c=t("browserify-rsa");e.exports=function(t,e,h){var d;d=t.padding?t.padding:h?1:4;var l,p=n(t);if(4===d)l=function(t,e){var n=t.modulus.byteLength(),f=e.length,c=o("sha1").update(new r("")).digest(),h=c.length,d=2*h;if(f>n-d-2)throw new Error("message too long");var l=new r(n-f-d-2);l.fill(0);var p=n-h-1,b=i(h),m=s(r.concat([c,l,new r([1]),e],p),a(b,p)),y=s(b,a(m,h));return new u(r.concat([new r([0]),y,m],n))}(p,e);else if(1===d)l=function(t,e,n){var o,a=e.length,s=t.modulus.byteLength();if(a>s-11)throw new Error("message too long");n?(o=new r(s-a-3)).fill(255):o=function(t,e){var n,o=new r(t),a=0,s=i(2*t),u=0;for(;a=0)throw new Error("data too long for modulus")}return h?c(l,p):f(l,p)}}).call(this,t("buffer").Buffer)},{"./mgf":342,"./withPublic":345,"./xor":346,"bn.js":240,"browserify-rsa":262,buffer:47,"create-hash":272,"parse-asn1":335,randombytes:347}],345:[function(t,e,r){(function(r){var n=t("bn.js");e.exports=function(t,e){return new r(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}}).call(this,t("buffer").Buffer)},{"bn.js":240,buffer:47}],346:[function(t,e,r){arguments[4][126][0].apply(r,arguments)},{dup:126}],347:[function(t,e,r){(function(r,n){var i=t("safe-buffer").Buffer,o=n.crypto||n.msCrypto;o&&o.getRandomValues?e.exports=function(t,e){if(t>65536)throw new Error("requested too many random bytes");var a=new n.Uint8Array(t);t>0&&o.getRandomValues(a);var s=i.from(a.buffer);if("function"==typeof e)return r.nextTick(function(){e(null,s)});return s}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:120,"safe-buffer":350}],348:[function(t,e,r){(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=t("safe-buffer"),a=t("randombytes"),s=o.Buffer,u=o.kMaxLength,f=n.crypto||n.msCrypto,c=Math.pow(2,32)-1;function h(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>c||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function d(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>c||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>u)throw new RangeError("buffer too small")}function l(t,r,n,i){if(e.browser){var o=t.buffer,s=new Uint8Array(o,r,n);return f.getRandomValues(s),i?void e.nextTick(function(){i(null,t)}):t}if(!i)return a(n).copy(t,r),t;a(n,function(e,n){if(e)return i(e);n.copy(t,r),i(null,t)})}f&&f.getRandomValues||!e.browser?(r.randomFill=function(t,e,r,i){if(!(s.isBuffer(t)||t instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)i=e,e=0,r=t.length;else if("function"==typeof r)i=r,r=t.length-e;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(e,t.length),d(r,e,t.length),l(t,e,r,i)},r.randomFillSync=function(t,e,r){void 0===e&&(e=0);if(!(s.isBuffer(t)||t instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');h(e,t.length),void 0===r&&(r=t.length-e);return d(r,e,t.length),l(t,e,r)}):(r.randomFill=i,r.randomFillSync=i)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:120,randombytes:347,"safe-buffer":350}],349:[function(t,e,r){(function(r){var n=t("inherits"),i=t("hash-base");function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function a(t,e){return t<>>32-e}function s(t,e,r,n,i,o,s,u){return a(t+(e^r^n)+o+s|0,u)+i|0}function u(t,e,r,n,i,o,s,u){return a(t+(e&r|~e&n)+o+s|0,u)+i|0}function f(t,e,r,n,i,o,s,u){return a(t+((e|~r)^n)+o+s|0,u)+i|0}function c(t,e,r,n,i,o,s,u){return a(t+(e&n|r&~n)+o+s|0,u)+i|0}function h(t,e,r,n,i,o,s,u){return a(t+(e^(r|~n))+o+s|0,u)+i|0}n(o,i),o.prototype._update=function(){for(var t=new Array(16),e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d,d=this._e;d=s(d,r=s(r,n,i,o,d,t[0],0,11),n,i=a(i,10),o,t[1],0,14),n=s(n=a(n,10),i=s(i,o=s(o,d,r,n,i,t[2],0,15),d,r=a(r,10),n,t[3],0,12),o,d=a(d,10),r,t[4],0,5),o=s(o=a(o,10),d=s(d,r=s(r,n,i,o,d,t[5],0,8),n,i=a(i,10),o,t[6],0,7),r,n=a(n,10),i,t[7],0,9),r=s(r=a(r,10),n=s(n,i=s(i,o,d,r,n,t[8],0,11),o,d=a(d,10),r,t[9],0,13),i,o=a(o,10),d,t[10],0,14),i=s(i=a(i,10),o=s(o,d=s(d,r,n,i,o,t[11],0,15),r,n=a(n,10),i,t[12],0,6),d,r=a(r,10),n,t[13],0,7),d=u(d=a(d,10),r=s(r,n=s(n,i,o,d,r,t[14],0,9),i,o=a(o,10),d,t[15],0,8),n,i=a(i,10),o,t[7],1518500249,7),n=u(n=a(n,10),i=u(i,o=u(o,d,r,n,i,t[4],1518500249,6),d,r=a(r,10),n,t[13],1518500249,8),o,d=a(d,10),r,t[1],1518500249,13),o=u(o=a(o,10),d=u(d,r=u(r,n,i,o,d,t[10],1518500249,11),n,i=a(i,10),o,t[6],1518500249,9),r,n=a(n,10),i,t[15],1518500249,7),r=u(r=a(r,10),n=u(n,i=u(i,o,d,r,n,t[3],1518500249,15),o,d=a(d,10),r,t[12],1518500249,7),i,o=a(o,10),d,t[0],1518500249,12),i=u(i=a(i,10),o=u(o,d=u(d,r,n,i,o,t[9],1518500249,15),r,n=a(n,10),i,t[5],1518500249,9),d,r=a(r,10),n,t[2],1518500249,11),d=u(d=a(d,10),r=u(r,n=u(n,i,o,d,r,t[14],1518500249,7),i,o=a(o,10),d,t[11],1518500249,13),n,i=a(i,10),o,t[8],1518500249,12),n=f(n=a(n,10),i=f(i,o=f(o,d,r,n,i,t[3],1859775393,11),d,r=a(r,10),n,t[10],1859775393,13),o,d=a(d,10),r,t[14],1859775393,6),o=f(o=a(o,10),d=f(d,r=f(r,n,i,o,d,t[4],1859775393,7),n,i=a(i,10),o,t[9],1859775393,14),r,n=a(n,10),i,t[15],1859775393,9),r=f(r=a(r,10),n=f(n,i=f(i,o,d,r,n,t[8],1859775393,13),o,d=a(d,10),r,t[1],1859775393,15),i,o=a(o,10),d,t[2],1859775393,14),i=f(i=a(i,10),o=f(o,d=f(d,r,n,i,o,t[7],1859775393,8),r,n=a(n,10),i,t[0],1859775393,13),d,r=a(r,10),n,t[6],1859775393,6),d=f(d=a(d,10),r=f(r,n=f(n,i,o,d,r,t[13],1859775393,5),i,o=a(o,10),d,t[11],1859775393,12),n,i=a(i,10),o,t[5],1859775393,7),n=c(n=a(n,10),i=c(i,o=f(o,d,r,n,i,t[12],1859775393,5),d,r=a(r,10),n,t[1],2400959708,11),o,d=a(d,10),r,t[9],2400959708,12),o=c(o=a(o,10),d=c(d,r=c(r,n,i,o,d,t[11],2400959708,14),n,i=a(i,10),o,t[10],2400959708,15),r,n=a(n,10),i,t[0],2400959708,14),r=c(r=a(r,10),n=c(n,i=c(i,o,d,r,n,t[8],2400959708,15),o,d=a(d,10),r,t[12],2400959708,9),i,o=a(o,10),d,t[4],2400959708,8),i=c(i=a(i,10),o=c(o,d=c(d,r,n,i,o,t[13],2400959708,9),r,n=a(n,10),i,t[3],2400959708,14),d,r=a(r,10),n,t[7],2400959708,5),d=c(d=a(d,10),r=c(r,n=c(n,i,o,d,r,t[15],2400959708,6),i,o=a(o,10),d,t[14],2400959708,8),n,i=a(i,10),o,t[5],2400959708,6),n=h(n=a(n,10),i=c(i,o=c(o,d,r,n,i,t[6],2400959708,5),d,r=a(r,10),n,t[2],2400959708,12),o,d=a(d,10),r,t[4],2840853838,9),o=h(o=a(o,10),d=h(d,r=h(r,n,i,o,d,t[0],2840853838,15),n,i=a(i,10),o,t[5],2840853838,5),r,n=a(n,10),i,t[9],2840853838,11),r=h(r=a(r,10),n=h(n,i=h(i,o,d,r,n,t[7],2840853838,6),o,d=a(d,10),r,t[12],2840853838,8),i,o=a(o,10),d,t[2],2840853838,13),i=h(i=a(i,10),o=h(o,d=h(d,r,n,i,o,t[10],2840853838,12),r,n=a(n,10),i,t[14],2840853838,5),d,r=a(r,10),n,t[1],2840853838,12),d=h(d=a(d,10),r=h(r,n=h(n,i,o,d,r,t[3],2840853838,13),i,o=a(o,10),d,t[8],2840853838,14),n,i=a(i,10),o,t[11],2840853838,11),n=h(n=a(n,10),i=h(i,o=h(o,d,r,n,i,t[6],2840853838,8),d,r=a(r,10),n,t[15],2840853838,5),o,d=a(d,10),r,t[13],2840853838,6),o=a(o,10);var l=this._a,p=this._b,b=this._c,m=this._d,y=this._e;y=h(y,l=h(l,p,b,m,y,t[5],1352829926,8),p,b=a(b,10),m,t[14],1352829926,9),p=h(p=a(p,10),b=h(b,m=h(m,y,l,p,b,t[7],1352829926,9),y,l=a(l,10),p,t[0],1352829926,11),m,y=a(y,10),l,t[9],1352829926,13),m=h(m=a(m,10),y=h(y,l=h(l,p,b,m,y,t[2],1352829926,15),p,b=a(b,10),m,t[11],1352829926,15),l,p=a(p,10),b,t[4],1352829926,5),l=h(l=a(l,10),p=h(p,b=h(b,m,y,l,p,t[13],1352829926,7),m,y=a(y,10),l,t[6],1352829926,7),b,m=a(m,10),y,t[15],1352829926,8),b=h(b=a(b,10),m=h(m,y=h(y,l,p,b,m,t[8],1352829926,11),l,p=a(p,10),b,t[1],1352829926,14),y,l=a(l,10),p,t[10],1352829926,14),y=c(y=a(y,10),l=h(l,p=h(p,b,m,y,l,t[3],1352829926,12),b,m=a(m,10),y,t[12],1352829926,6),p,b=a(b,10),m,t[6],1548603684,9),p=c(p=a(p,10),b=c(b,m=c(m,y,l,p,b,t[11],1548603684,13),y,l=a(l,10),p,t[3],1548603684,15),m,y=a(y,10),l,t[7],1548603684,7),m=c(m=a(m,10),y=c(y,l=c(l,p,b,m,y,t[0],1548603684,12),p,b=a(b,10),m,t[13],1548603684,8),l,p=a(p,10),b,t[5],1548603684,9),l=c(l=a(l,10),p=c(p,b=c(b,m,y,l,p,t[10],1548603684,11),m,y=a(y,10),l,t[14],1548603684,7),b,m=a(m,10),y,t[15],1548603684,7),b=c(b=a(b,10),m=c(m,y=c(y,l,p,b,m,t[8],1548603684,12),l,p=a(p,10),b,t[12],1548603684,7),y,l=a(l,10),p,t[4],1548603684,6),y=c(y=a(y,10),l=c(l,p=c(p,b,m,y,l,t[9],1548603684,15),b,m=a(m,10),y,t[1],1548603684,13),p,b=a(b,10),m,t[2],1548603684,11),p=f(p=a(p,10),b=f(b,m=f(m,y,l,p,b,t[15],1836072691,9),y,l=a(l,10),p,t[5],1836072691,7),m,y=a(y,10),l,t[1],1836072691,15),m=f(m=a(m,10),y=f(y,l=f(l,p,b,m,y,t[3],1836072691,11),p,b=a(b,10),m,t[7],1836072691,8),l,p=a(p,10),b,t[14],1836072691,6),l=f(l=a(l,10),p=f(p,b=f(b,m,y,l,p,t[6],1836072691,6),m,y=a(y,10),l,t[9],1836072691,14),b,m=a(m,10),y,t[11],1836072691,12),b=f(b=a(b,10),m=f(m,y=f(y,l,p,b,m,t[8],1836072691,13),l,p=a(p,10),b,t[12],1836072691,5),y,l=a(l,10),p,t[2],1836072691,14),y=f(y=a(y,10),l=f(l,p=f(p,b,m,y,l,t[10],1836072691,13),b,m=a(m,10),y,t[0],1836072691,13),p,b=a(b,10),m,t[4],1836072691,7),p=u(p=a(p,10),b=u(b,m=f(m,y,l,p,b,t[13],1836072691,5),y,l=a(l,10),p,t[8],2053994217,15),m,y=a(y,10),l,t[6],2053994217,5),m=u(m=a(m,10),y=u(y,l=u(l,p,b,m,y,t[4],2053994217,8),p,b=a(b,10),m,t[1],2053994217,11),l,p=a(p,10),b,t[3],2053994217,14),l=u(l=a(l,10),p=u(p,b=u(b,m,y,l,p,t[11],2053994217,14),m,y=a(y,10),l,t[15],2053994217,6),b,m=a(m,10),y,t[0],2053994217,14),b=u(b=a(b,10),m=u(m,y=u(y,l,p,b,m,t[5],2053994217,6),l,p=a(p,10),b,t[12],2053994217,9),y,l=a(l,10),p,t[2],2053994217,12),y=u(y=a(y,10),l=u(l,p=u(p,b,m,y,l,t[13],2053994217,9),b,m=a(m,10),y,t[9],2053994217,12),p,b=a(b,10),m,t[7],2053994217,5),p=s(p=a(p,10),b=u(b,m=u(m,y,l,p,b,t[10],2053994217,15),y,l=a(l,10),p,t[14],2053994217,8),m,y=a(y,10),l,t[12],0,8),m=s(m=a(m,10),y=s(y,l=s(l,p,b,m,y,t[15],0,5),p,b=a(b,10),m,t[10],0,12),l,p=a(p,10),b,t[4],0,9),l=s(l=a(l,10),p=s(p,b=s(b,m,y,l,p,t[1],0,12),m,y=a(y,10),l,t[5],0,5),b,m=a(m,10),y,t[8],0,14),b=s(b=a(b,10),m=s(m,y=s(y,l,p,b,m,t[7],0,6),l,p=a(p,10),b,t[6],0,8),y,l=a(l,10),p,t[2],0,13),y=s(y=a(y,10),l=s(l,p=s(p,b,m,y,l,t[13],0,6),b,m=a(m,10),y,t[14],0,5),p,b=a(b,10),m,t[0],0,15),p=s(p=a(p,10),b=s(b,m=s(m,y,l,p,b,t[3],0,13),y,l=a(l,10),p,t[9],0,11),m,y=a(y,10),l,t[11],0,11),m=a(m,10);var v=this._b+i+m|0;this._b=this._c+o+y|0,this._c=this._d+d+l|0,this._d=this._e+r+p|0,this._e=this._a+n+b|0,this._a=v},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},e.exports=o}).call(this,t("buffer").Buffer)},{buffer:47,"hash-base":311,inherits:325}],350:[function(t,e,r){arguments[4][147][0].apply(r,arguments)},{buffer:47,dup:147}],351:[function(t,e,r){e.exports=t("scryptsy")},{scryptsy:352}],352:[function(t,e,r){(function(r){var n=t("pbkdf2").pbkdf2Sync,i=2147483647;function o(t,e,n,i,o){if(r.isBuffer(t)&&r.isBuffer(n))t.copy(n,i,e,e+o);else for(;o--;)n[i++]=t[e++]}e.exports=function(t,e,a,s,u,f,c){if(0===a||0!=(a&a-1))throw Error("N must be > 0 and a power of 2");if(a>i/128/s)throw Error("Parameter N is too large");if(s>i/128/u)throw Error("Parameter r is too large");var h,d=new r(256*s),l=new r(128*s*a),p=new Int32Array(16),b=new Int32Array(16),m=new r(64),y=n(t,e,1,128*u*s,"sha256");if(c){var v=u*a*2,g=0;h=function(){++g%1e3==0&&c({current:g,total:v,percent:g/v*100})}}for(var w=0;w>>32-e}function k(t){var e;for(e=0;e<16;e++)p[e]=(255&t[4*e+0])<<0,p[e]|=(255&t[4*e+1])<<8,p[e]|=(255&t[4*e+2])<<16,p[e]|=(255&t[4*e+3])<<24;for(o(p,0,b,0,16),e=8;e>0;e-=2)b[4]^=x(b[0]+b[12],7),b[8]^=x(b[4]+b[0],9),b[12]^=x(b[8]+b[4],13),b[0]^=x(b[12]+b[8],18),b[9]^=x(b[5]+b[1],7),b[13]^=x(b[9]+b[5],9),b[1]^=x(b[13]+b[9],13),b[5]^=x(b[1]+b[13],18),b[14]^=x(b[10]+b[6],7),b[2]^=x(b[14]+b[10],9),b[6]^=x(b[2]+b[14],13),b[10]^=x(b[6]+b[2],18),b[3]^=x(b[15]+b[11],7),b[7]^=x(b[3]+b[15],9),b[11]^=x(b[7]+b[3],13),b[15]^=x(b[11]+b[7],18),b[1]^=x(b[0]+b[3],7),b[2]^=x(b[1]+b[0],9),b[3]^=x(b[2]+b[1],13),b[0]^=x(b[3]+b[2],18),b[6]^=x(b[5]+b[4],7),b[7]^=x(b[6]+b[5],9),b[4]^=x(b[7]+b[6],13),b[5]^=x(b[4]+b[7],18),b[11]^=x(b[10]+b[9],7),b[8]^=x(b[11]+b[10],9),b[9]^=x(b[8]+b[11],13),b[10]^=x(b[9]+b[8],18),b[12]^=x(b[15]+b[14],7),b[13]^=x(b[12]+b[15],9),b[14]^=x(b[13]+b[12],13),b[15]^=x(b[14]+b[13],18);for(e=0;e<16;++e)p[e]=b[e]+p[e];for(e=0;e<16;e++){var r=4*e;t[r+0]=p[e]>>0&255,t[r+1]=p[e]>>8&255,t[r+2]=p[e]>>16&255,t[r+3]=p[e]>>24&255}}function S(t,e,r,n,i){for(var o=0;o>>((3&e)<<3)&255;return i}}e.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],363:[function(t,e,r){for(var n=t("./rng"),i=[],o={},a=0;a<256;a++)i[a]=(a+256).toString(16).substr(1),o[i[a]]=a;function s(t,e){var r=e||0,n=i;return n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+"-"+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]+n[t[r++]]}var u=n(),f=[1|u[0],u[1],u[2],u[3],u[4],u[5]],c=16383&(u[6]<<8|u[7]),h=0,d=0;function l(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;a++)e[i+a]=o[a];return e||s(o)}var p=l;p.v1=function(t,e,r){var n=e&&r||0,i=e||[],o=void 0!==(t=t||{}).clockseq?t.clockseq:c,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),u=void 0!==t.nsecs?t.nsecs:d+1,l=a-h+(u-d)/1e4;if(l<0&&void 0===t.clockseq&&(o=o+1&16383),(l<0||a>h)&&void 0===t.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=a,d=u,c=o;var p=(1e4*(268435455&(a+=122192928e5))+u)%4294967296;i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p;var b=a/4294967296*1e4&268435455;i[n++]=b>>>8&255,i[n++]=255&b,i[n++]=b>>>24&15|16,i[n++]=b>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var m=t.node||f,y=0;y<6;y++)i[n+y]=m[y];return e||s(i)},p.v4=l,p.parse=function(t,e,r){var n=e&&r||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){i<16&&(e[n+i++]=o[t])});i<16;)e[n+i++]=0;return e},p.unparse=s,e.exports=p},{"./rng":362}],364:[function(t,e,r){(function(r,n){var i=t("underscore"),o=t("web3-core"),a=t("web3-core-method"),s=t("any-promise"),u=t("eth-lib/lib/account"),f=t("eth-lib/lib/hash"),c=t("eth-lib/lib/rlp"),h=t("eth-lib/lib/nat"),d=t("eth-lib/lib/bytes"),l=t(void 0===r?"crypto-browserify":"crypto"),p=t("scrypt.js"),b=t("uuid"),m=t("web3-utils"),y=t("web3-core-helpers"),v=function(t){return i.isUndefined(t)||i.isNull(t)},g=function(t){for(;t&&t.startsWith("0x0");)t="0x"+t.slice(3);return t},w=function(t){return t.length%2==1&&(t=t.replace("0x","0x0")),t},_=function(){var t=this;o.packageInit(this,arguments),delete this.BatchRequest,delete this.extend;var e=[new a({name:"getId",call:"net_version",params:0,outputFormatter:m.hexToNumber}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[function(t){if(m.isAddress(t))return t;throw new Error("Address "+t+' is not a valid address to get the "transactionCount".')},function(){return"latest"}]})];this._ethereumCall={},i.each(e,function(e){e.attachToObject(t._ethereumCall),e.setRequestManager(t._requestManager)}),this.wallet=new M(this)};function M(t){this._accounts=t,this.length=0,this.defaultKeyName="web3js_wallet"}_.prototype._addAccountFunctions=function(t){var e=this;return t.signTransaction=function(r,n){return e.signTransaction(r,t.privateKey,n)},t.sign=function(r){return e.sign(r,t.privateKey)},t.encrypt=function(r,n){return e.encrypt(t.privateKey,r,n)},t},_.prototype.create=function(t){return this._addAccountFunctions(u.create(t||m.randomHex(32)))},_.prototype.privateKeyToAccount=function(t){return this._addAccountFunctions(u.fromPrivate(t))},_.prototype.signTransaction=function(t,e,r){var n,o=!1;if(r=r||function(){},!t)return o=new Error("No transaction object given!"),r(o),s.reject(o);function a(t){if(t.gas||t.gasLimit||(o=new Error('"gas" is missing')),(t.nonce<0||t.gas<0||t.gasPrice<0||t.chainId<0)&&(o=new Error("Gas, gasPrice, nonce or chainId is lower than 0")),o)return r(o),s.reject(new Error('"gas" is missing'));try{var i=t=y.formatters.inputCallFormatter(t);i.to=t.to||"0x",i.data=t.data||"0x",i.value=t.value||"0x",i.chainId=m.numberToHex(t.chainId);var a=c.encode([d.fromNat(i.nonce),d.fromNat(i.gasPrice),d.fromNat(i.gas),i.to.toLowerCase(),d.fromNat(i.value),i.data,d.fromNat(i.chainId||"0x1"),"0x","0x"]),l=f.keccak256(a),p=u.makeSigner(2*h.toNumber(i.chainId||"0x1")+35)(f.keccak256(a),e),b=c.decode(a).slice(0,6).concat(u.decodeSignature(p));b[6]=w(g(b[6])),b[7]=w(g(b[7])),b[8]=w(g(b[8]));var v=c.encode(b),_=c.decode(v);n={messageHash:l,v:g(_[6]),r:g(_[7]),s:g(_[8]),rawTransaction:v}}catch(t){return r(t),s.reject(t)}return r(null,n),n}return void 0!==t.nonce&&void 0!==t.chainId&&void 0!==t.gasPrice?s.resolve(a(t)):s.all([v(t.chainId)?this._ethereumCall.getId():t.chainId,v(t.gasPrice)?this._ethereumCall.getGasPrice():t.gasPrice,v(t.nonce)?this._ethereumCall.getTransactionCount(this.privateKeyToAccount(e).address):t.nonce]).then(function(e){if(v(e[0])||v(e[1])||v(e[2]))throw new Error('One of the values "chainId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(e));return a(i.extend(t,{chainId:e[0],gasPrice:e[1],nonce:e[2]}))})},_.prototype.recoverTransaction=function(t){var e=c.decode(t),r=u.encodeSignature(e.slice(6,9)),n=d.toNumber(e[6]),i=n<35?[]:[d.fromNumber(n-35>>1),"0x","0x"],o=e.slice(0,6).concat(i),a=c.encode(o);return u.recover(f.keccak256(a),r)},_.prototype.hashMessage=function(t){var e=m.isHexStrict(t)?m.hexToBytes(t):t,r=n.from(e),i="Ethereum Signed Message:\n"+e.length,o=n.from(i),a=n.concat([o,r]);return f.keccak256s(a)},_.prototype.sign=function(t,e){var r=this.hashMessage(t),n=u.sign(r,e),i=u.decodeSignature(n);return{message:t,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},_.prototype.recover=function(t,e,r){var n=[].slice.apply(arguments);return i.isObject(t)?this.recover(t.messageHash,u.encodeSignature([t.v,t.r,t.s]),!0):(r||(t=this.hashMessage(t)),n.length>=4?(r=n.slice(-1)[0],r=!!i.isBoolean(r)&&!!r,this.recover(t,u.encodeSignature(n.slice(1,4)),r)):u.recover(t,e))},_.prototype.decrypt=function(t,e,r){if(!i.isString(e))throw new Error("No password given.");var o,a,s=i.isObject(t)?t:JSON.parse(r?t.toLowerCase():t);if(3!==s.version)throw new Error("Not a valid V3 wallet");if("scrypt"===s.crypto.kdf)a=s.crypto.kdfparams,o=p(new n(e),new n(a.salt,"hex"),a.n,a.r,a.p,a.dklen);else{if("pbkdf2"!==s.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(a=s.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");o=l.pbkdf2Sync(new n(e),new n(a.salt,"hex"),a.c,a.dklen,"sha256")}var u=new n(s.crypto.ciphertext,"hex");if(m.sha3(n.concat([o.slice(16,32),u])).replace("0x","")!==s.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var f=l.createDecipheriv(s.crypto.cipher,o.slice(0,16),new n(s.crypto.cipherparams.iv,"hex")),c="0x"+n.concat([f.update(u),f.final()]).toString("hex");return this.privateKeyToAccount(c)},_.prototype.encrypt=function(t,e,r){var i,o=this.privateKeyToAccount(t),a=(r=r||{}).salt||l.randomBytes(32),s=r.iv||l.randomBytes(16),u=r.kdf||"scrypt",f={dklen:r.dklen||32,salt:a.toString("hex")};if("pbkdf2"===u)f.c=r.c||262144,f.prf="hmac-sha256",i=l.pbkdf2Sync(new n(e),a,f.c,f.dklen,"sha256");else{if("scrypt"!==u)throw new Error("Unsupported kdf");f.n=r.n||8192,f.r=r.r||8,f.p=r.p||1,i=p(new n(e),a,f.n,f.r,f.p,f.dklen)}var c=l.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),s);if(!c)throw new Error("Unsupported cipher");var h=n.concat([c.update(new n(o.privateKey.replace("0x",""),"hex")),c.final()]),d=m.sha3(n.concat([i.slice(16,32),new n(h,"hex")])).replace("0x","");return{version:3,id:b.v4({random:r.uuid||l.randomBytes(16)}),address:o.address.toLowerCase().replace("0x",""),crypto:{ciphertext:h.toString("hex"),cipherparams:{iv:s.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:u,kdfparams:f,mac:d.toString("hex")}}},M.prototype._findSafeIndex=function(t){return t=t||0,i.has(this,t)?this._findSafeIndex(t+1):t},M.prototype._currentIndexes=function(){return Object.keys(this).map(function(t){return parseInt(t)}).filter(function(t){return t<9e20})},M.prototype.create=function(t,e){for(var r=0;r=2?e.slice(2):e;var r=h.decodeParameters(t,e);return 1===r.__length__?r[0]:(delete r.__length__,r)},d.prototype.deploy=function(t,e){if((t=t||{}).arguments=t.arguments||[],!(t=this._getOrSetDefaultOptions(t)).data)return a._fireError(new Error('No "data" specified in neither the given options, nor the default options.'),null,null,e);var r=n.find(this.options.jsonInterface,function(t){return"constructor"===t.type})||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:t.data,_ethAccounts:this.constructor._ethAccounts},t.arguments)},d.prototype._generateEventOptions=function(){var t=Array.prototype.slice.call(arguments),e=this._getCallback(t),r=n.isObject(t[t.length-1])?t.pop():{},i=n.isString(t[0])?t[0]:"allevents";if(!(i="allevents"===i.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find(function(t){return"event"===t.type&&(t.name===i||t.signature==="0x"+i.replace("0x",""))})))throw new Error('Event "'+i.name+"\" doesn't exist in this contract.");if(!a.isAddress(this.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return{params:this._encodeEventABI(i,r),event:i,callback:e}},d.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},d.prototype.once=function(t,e,r){var i=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(i)))throw new Error("Once requires a callback as the second parameter.");e&&delete e.fromBlock,this._on(t,e,function(t,e,i){i.unsubscribe(),n.isFunction(r)&&r(t,e,i)})},d.prototype._on=function(){var t=this._generateEventOptions.apply(this,arguments);this._checkListener("newListener",t.event.name,t.callback),this._checkListener("removeListener",t.event.name,t.callback);var e=new s({subscription:{params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(t.event),subscriptionHandler:function(t){t.removed?this.emit("changed",t):this.emit("data",t),n.isFunction(this.callback)&&this.callback(null,t,this)}},type:"eth",requestManager:this._requestManager});return e.subscribe("logs",t.params,t.callback||function(){}),e},d.prototype.getPastEvents=function(){var t=this._generateEventOptions.apply(this,arguments),e=new o({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[u.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(t.event)});e.setRequestManager(this._requestManager);var r=e.buildCall();return e=null,r(t.params,t.callback)},d.prototype._createTxObject=function(){var t=Array.prototype.slice.call(arguments),e={};if("function"===this.method.type&&(e.call=this.parent._executeMethod.bind(e,"call"),e.call.request=this.parent._executeMethod.bind(e,"call",!0)),e.send=this.parent._executeMethod.bind(e,"send"),e.send.request=this.parent._executeMethod.bind(e,"send",!0),e.encodeABI=this.parent._encodeMethodABI.bind(e),e.estimateGas=this.parent._executeMethod.bind(e,"estimate"),t&&this.method.inputs&&t.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,t);throw f.InvalidNumberOfParams(t.length,this.method.inputs.length,this.method.name)}return e.arguments=t||[],e._method=this.method,e._parent=this.parent,e._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(e._deployData=this.deployData),e},d.prototype._processExecuteArguments=function(t,e){var r={};if(r.type=t.shift(),r.callback=this._parent._getCallback(t),"call"===r.type&&!0!==t[t.length-1]&&(n.isString(t[t.length-1])||isFinite(t[t.length-1]))&&(r.defaultBlock=t.pop()),r.options=n.isObject(t[t.length-1])?t.pop():{},r.generateRequest=!0===t[t.length-1]&&t.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!a.isAddress(this._parent.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:a._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),e.eventEmitter,e.reject,r.callback)},d.prototype._executeMethod=function(){var t=this,e=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=c("send"!==e.type),i=t.constructor._ethAccounts||t._ethAccounts;if(e.generateRequest){var s={params:[u.inputCallFormatter.call(this._parent,e.options)],callback:e.callback};return"call"===e.type?(s.params.push(u.inputDefaultBlockNumberFormatter.call(this._parent,e.defaultBlock)),s.method="eth_call",s.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):s.method="eth_sendTransaction",s}switch(e.type){case"estimate":return new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[u.inputCallFormatter],outputFormatter:a.hexToNumber,requestManager:t._parent._requestManager,accounts:i,defaultAccount:t._parent.defaultAccount,defaultBlock:t._parent.defaultBlock}).createFunction()(e.options,e.callback);case"call":return new o({name:"call",call:"eth_call",params:2,inputFormatter:[u.inputCallFormatter,u.inputDefaultBlockNumberFormatter],outputFormatter:function(e){return t._parent._decodeMethodReturn(t._method.outputs,e)},requestManager:t._parent._requestManager,accounts:i,defaultAccount:t._parent.defaultAccount,defaultBlock:t._parent.defaultBlock}).createFunction()(e.options,e.defaultBlock,e.callback);case"send":if(!a.isAddress(e.options.from))return a._fireError(new Error('No "from" address specified in neither the given options, nor the default options.'),r.eventEmitter,r.reject,e.callback);if(n.isBoolean(this._method.payable)&&!this._method.payable&&e.options.value&&e.options.value>0)return a._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,e.callback);var f={receiptFormatter:function(e){if(n.isArray(e.logs)){var r=n.map(e.logs,function(e){return t._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:t._parent.options.jsonInterface},e)});e.events={};var i=0;r.forEach(function(t){t.event?e.events[t.event]?Array.isArray(e.events[t.event])?e.events[t.event].push(t):e.events[t.event]=[e.events[t.event],t]:e.events[t.event]=t:(e.events[i]=t,i++)}),delete e.logs}return e},contractDeployFormatter:function(e){var r=t._parent.clone();return r.options.address=e.contractAddress,r}};return new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[u.inputTransactionFormatter],requestManager:t._parent._requestManager,accounts:t.constructor._ethAccounts||t._ethAccounts,defaultAccount:t._parent.defaultAccount,defaultBlock:t._parent.defaultBlock,extraFormatters:f}).createFunction()(e.options,e.callback)}},e.exports=d},{underscore:365,"web3-core":209,"web3-core-helpers":191,"web3-core-method":193,"web3-core-promievent":198,"web3-core-subscriptions":206,"web3-eth-abi":213,"web3-utils":393}],367:[function(t,e,r){arguments[4][210][0].apply(r,arguments)},{dup:210}],368:[function(t,e,r){var n=t("web3-utils"),i=t("bn.js"),o=function(t){var e="A".charCodeAt(0),r="Z".charCodeAt(0);return(t=(t=t.toUpperCase()).substr(4)+t.substr(0,4)).split("").map(function(t){var n=t.charCodeAt(0);return n>=e&&n<=r?n-e+10:t}).join("")},a=function(t){for(var e,r=t;r.length>2;)e=r.slice(0,9),r=parseInt(e,10)%97+r.slice(e.length);return parseInt(r,10)%97},s=function(t){this._iban=t};s.toAddress=function(t){if(!(t=new s(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()},s.toIban=function(t){return s.fromAddress(t).toString()},s.fromAddress=function(t){if(!n.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var e=function(t,e){for(var r=t;r.length<2*e;)r="0"+r;return r}(new i(t,16).toString(36),15);return s.fromBban(e.toUpperCase())},s.fromBban=function(t){var e=("0"+(98-a(o("XE00"+t)))).slice(-2);return new s("XE"+e+t)},s.createIndirect=function(t){return s.fromBban("ETH"+t.institution+t.identifier)},s.isValid=function(t){return new s(t).isValid()},s.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(o(this._iban))},s.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},s.prototype.isIndirect=function(){return 20===this._iban.length},s.prototype.checksum=function(){return this._iban.substr(2,2)},s.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},s.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},s.prototype.toAddress=function(){if(this.isDirect()){var t=this._iban.substr(4),e=new i(t,36);return n.toChecksumAddress(e.toString(16,20))}return""},s.prototype.toString=function(){return this._iban},e.exports=s},{"bn.js":367,"web3-utils":393}],369:[function(t,e,r){var n=t("web3-core"),i=t("web3-core-method"),o=t("web3-utils"),a=t("web3-net"),s=t("web3-core-helpers").formatters,u=function(){var t=this;n.packageInit(this,arguments),this.net=new a(this.currentProvider);var e=null,r="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return e},set:function(t){return t&&(e=o.toChecksumAddress(s.inputAddressFormatter(t))),u.forEach(function(t){t.defaultAccount=e}),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return r},set:function(t){return r=t,u.forEach(function(t){t.defaultBlock=r}),t},enumerable:!0});var u=[new i({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:o.toChecksumAddress}),new i({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:o.toChecksumAddress}),new i({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[s.inputAddressFormatter,null,null]}),new i({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[s.inputAddressFormatter]}),new i({name:"importRawKey",call:"personal_importRawKey",params:2}),new i({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"signTransaction",call:"personal_signTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new i({name:"sign",call:"personal_sign",params:3,inputFormatter:[s.inputSignFormatter,s.inputAddressFormatter,null]}),new i({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[s.inputSignFormatter,null]})];u.forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager),e.defaultBlock=t.defaultBlock,e.defaultAccount=t.defaultAccount})};n.addProviders(u),e.exports=u},{"web3-core":209,"web3-core-helpers":191,"web3-core-method":193,"web3-net":373,"web3-utils":393}],370:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],371:[function(t,e,r){var n=t("underscore");e.exports=function(t){var e,r=this;return this.net.getId().then(function(t){return e=t,r.getBlock(0)}).then(function(r){var i="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===e&&(i="main"),"0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303"===r.hash&&2===e&&(i="morden"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===e&&(i="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===e&&(i="rinkeby"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===e&&(i="kovan"),n.isFunction(t)&&t(null,i),i}).catch(function(e){if(!n.isFunction(t))throw e;t(e)})}},{underscore:370}],372:[function(t,e,r){var n=t("underscore"),i=t("web3-core"),o=t("web3-core-helpers"),a=t("web3-core-subscriptions").subscriptions,s=t("web3-core-method"),u=t("web3-utils"),f=t("web3-net"),c=t("web3-eth-personal"),h=t("web3-eth-contract"),d=t("web3-eth-iban"),l=t("web3-eth-accounts"),p=t("web3-eth-abi"),b=t("./getNetworkType.js"),m=o.formatters,y=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},v=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},g=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},w=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},_=function(t){return n.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},M=function(){var t=this;i.packageInit(this,arguments);var e=this.setProvider;this.setProvider=function(){e.apply(t,arguments),t.net.setProvider.apply(t,arguments),t.personal.setProvider.apply(t,arguments),t.accounts.setProvider.apply(t,arguments),t.Contract.setProvider(t.currentProvider,t.accounts)};var r=null,o="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return r},set:function(e){return e&&(r=u.toChecksumAddress(m.inputAddressFormatter(e))),t.Contract.defaultAccount=r,t.personal.defaultAccount=r,x.forEach(function(t){t.defaultAccount=r}),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return o},set:function(e){return o=e,t.Contract.defaultBlock=o,t.personal.defaultBlock=o,x.forEach(function(t){t.defaultBlock=o}),e},enumerable:!0}),this.clearSubscriptions=t._requestManager.clearSubscriptions,this.net=new f(this.currentProvider),this.net.getNetworkType=b.bind(this),this.accounts=new l(this.currentProvider),this.personal=new c(this.currentProvider),this.personal.defaultAccount=this.defaultAccount;var M=function(){h.apply(this,arguments)};M.setProvider=function(){h.setProvider.apply(this,arguments)},(M.prototype=Object.create(h.prototype)).constructor=M,this.Contract=M,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.setProvider(this.currentProvider,this.accounts),this.Iban=d,this.abi=p;var x=[new s({name:"getNodeInfo",call:"web3_clientVersion"}),new s({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new s({name:"getCoinbase",call:"eth_coinbase",params:0}),new s({name:"isMining",call:"eth_mining",params:0}),new s({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:u.hexToNumber}),new s({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:m.outputSyncingFormatter}),new s({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:m.outputBigNumberFormatter}),new s({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:u.toChecksumAddress}),new s({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:u.hexToNumber}),new s({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:m.outputBigNumberFormatter}),new s({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[m.inputAddressFormatter,u.numberToHex,m.inputDefaultBlockNumberFormatter]}),new s({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter]}),new s({name:"getBlock",call:y,params:2,inputFormatter:[m.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:m.outputBlockFormatter}),new s({name:"getUncle",call:g,params:2,inputFormatter:[m.inputBlockNumberFormatter,u.numberToHex],outputFormatter:m.outputBlockFormatter}),new s({name:"getBlockTransactionCount",call:w,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getBlockUncleCount",call:_,params:1,inputFormatter:[m.inputBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionFormatter}),new s({name:"getTransactionFromBlock",call:v,params:2,inputFormatter:[m.inputBlockNumberFormatter,u.numberToHex],outputFormatter:m.outputTransactionFormatter}),new s({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:m.outputTransactionReceiptFormatter}),new s({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[m.inputAddressFormatter,m.inputDefaultBlockNumberFormatter],outputFormatter:u.hexToNumber}),new s({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),new s({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new s({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[m.inputTransactionFormatter]}),new s({name:"sign",call:"eth_sign",params:2,inputFormatter:[m.inputSignFormatter,m.inputAddressFormatter],transformPayload:function(t){return t.params.reverse(),t}}),new s({name:"call",call:"eth_call",params:2,inputFormatter:[m.inputCallFormatter,m.inputDefaultBlockNumberFormatter]}),new s({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[m.inputCallFormatter],outputFormatter:u.hexToNumber}),new s({name:"getCompilers",call:"eth_getCompilers",params:0}),new s({name:"compile.solidity",call:"eth_compileSolidity",params:1}),new s({name:"compile.lll",call:"eth_compileLLL",params:1}),new s({name:"compile.serpent",call:"eth_compileSerpent",params:1}),new s({name:"submitWork",call:"eth_submitWork",params:3}),new s({name:"getWork",call:"eth_getWork",params:0}),new s({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter}),new a({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:m.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[m.inputLogFormatter],outputFormatter:m.outputLogFormatter,subscriptionHandler:function(t){t.removed?this.emit("changed",t):this.emit("data",t),n.isFunction(this.callback)&&this.callback(null,t,this)}},syncing:{params:0,outputFormatter:m.outputSyncingFormatter,subscriptionHandler:function(t){var e=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",e._isSyncing),n.isFunction(this.callback)&&this.callback(null,e._isSyncing,this),setTimeout(function(){e.emit("data",t),n.isFunction(e.callback)&&e.callback(null,t,e)},0)):(this.emit("data",t),n.isFunction(e.callback)&&this.callback(null,t,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout(function(){t.currentBlock>t.highestBlock-200&&(e._isSyncing=!1,e.emit("changed",e._isSyncing),n.isFunction(e.callback)&&e.callback(null,e._isSyncing,e))},500))}}}})];x.forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager,t.accounts),e.defaultBlock=t.defaultBlock,e.defaultAccount=t.defaultAccount})};i.addProviders(M),e.exports=M},{"./getNetworkType.js":371,underscore:370,"web3-core":209,"web3-core-helpers":191,"web3-core-method":193,"web3-core-subscriptions":206,"web3-eth-abi":213,"web3-eth-accounts":364,"web3-eth-contract":366,"web3-eth-iban":368,"web3-eth-personal":369,"web3-net":373,"web3-utils":393}],373:[function(t,e,r){var n=t("web3-core"),i=t("web3-core-method"),o=t("web3-utils"),a=function(){var t=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:o.hexToNumber}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};n.addProviders(a),e.exports=a},{"web3-core":209,"web3-core-method":193,"web3-utils":393}],374:[function(t,e,r){e.exports=XMLHttpRequest},{}],375:[function(t,e,r){var n=t("web3-core-helpers").errors,i=t("xhr2"),o=function(t,e,r){this.host=t||"http://localhost:8545",this.timeout=e||0,this.connected=!1,this.headers=r};o.prototype._prepareRequest=function(){var t=new i;return t.open("POST",this.host,!0),t.setRequestHeader("Content-Type","application/json"),this.headers&&this.headers.forEach(function(e){t.setRequestHeader(e.name,e.value)}),t},o.prototype.send=function(t,e){var r=this,i=this._prepareRequest();i.onreadystatechange=function(){if(4===i.readyState&&1!==i.timeout){var t=i.responseText,o=null;try{t=JSON.parse(t)}catch(t){o=n.InvalidResponse(i.responseText)}r.connected=!0,e(o,t)}},i.ontimeout=function(){r.connected=!1,e(n.ConnectionTimeout(this.timeout))};try{i.send(JSON.stringify(t))}catch(t){this.connected=!1,e(n.InvalidConnection(this.host))}},e.exports=o},{"web3-core-helpers":191,xhr2:374}],376:[function(t,e,r){!function(t,n,i,o,a,s){var u=l(function(t,e){var r=e.length;return l(function(n){for(var i=0;i0;)if(U+=r,r=t.charAt(o++),4===z?(O+=String.fromCharCode(parseInt(U,16)),z=0,f=o-1):z++,!r)break t;if('"'===r&&!L){q=D.pop()||p,O+=t.substring(f,o-1);break}if(!("\\"!==r||L||(L=!0,O+=t.substring(f,o-1),r=t.charAt(o++))))break;if(L){if(L=!1,"n"===r?O+="\n":"r"===r?O+="\r":"t"===r?O+="\t":"f"===r?O+="\f":"b"===r?O+="\b":"u"===r?(z=1,U=""):O+=r,r=t.charAt(o++),f=o-1,r)continue;break}h.lastIndex=o;var d=h.exec(t);if(!d){o=t.length+1,O+=t.substring(f,o-1);break}if(o=d.index+1,!(r=t.charAt(d.index))){O+=t.substring(f,o-1);break}}continue;case M:if(!r)continue;if("r"!==r)return X("Invalid true started with t"+r);q=x;continue;case x:if(!r)continue;if("u"!==r)return X("Invalid true started with tr"+r);q=k;continue;case k:if(!r)continue;if("e"!==r)return X("Invalid true started with tru"+r);a(!0),u(),q=D.pop()||p;continue;case S:if(!r)continue;if("a"!==r)return X("Invalid false started with f"+r);q=E;continue;case E:if(!r)continue;if("l"!==r)return X("Invalid false started with fa"+r);q=A;continue;case A:if(!r)continue;if("s"!==r)return X("Invalid false started with fal"+r);q=j;continue;case j:if(!r)continue;if("e"!==r)return X("Invalid false started with fals"+r);a(!1),u(),q=D.pop()||p;continue;case I:if(!r)continue;if("u"!==r)return X("Invalid null started with n"+r);q=B;continue;case B:if(!r)continue;if("l"!==r)return X("Invalid null started with nu"+r);q=T;continue;case T:if(!r)continue;if("l"!==r)return X("Invalid null started with nul"+r);a(null),u(),q=D.pop()||p;continue;case C:if("."!==r)return X("Leading zero not followed by .");N+=r,q=P;continue;case P:if(-1!=="0123456789".indexOf(r))N+=r;else if("."===r){if(-1!==N.indexOf("."))return X("Invalid number has two dots");N+=r}else if("e"===r||"E"===r){if(-1!==N.indexOf("e")||-1!==N.indexOf("E"))return X("Invalid number has two exponential");N+=r}else if("+"===r||"-"===r){if("e"!==n&&"E"!==n)return X("Invalid symbol in number");N+=r}else N&&(a(parseFloat(N)),u(),N=""),o--,q=D.pop()||p;continue;default:return X("Unknown state: "+q)}H>=R&&(J=0,O!==s&&O.length>c&&(X("Max buffer length exceeded: textNode"),J=Math.max(J,O.length)),N.length>c&&(X("Max buffer length exceeded: numberNode"),J=Math.max(J,N.length)),R=c-J+H);var J}),t(ft).on(function(){if(q==l)return a({}),u(),void(F=!0);q===p&&0===K||X("Unexpected end");O!==s&&(a(O),u(),O=s);F=!0})}var R,O,N,L,F,q,D,U,z,K,H,V=(R=l(function(t){return t.unshift(/^/),(e=RegExp(t.map(c("source")).join(""))).exec.bind(e);var e}),L=R(O=/(\$?)/,/([\w-_]+|\*)/,N=/(?:{([\w ]*?)})?/),F=R(O,/\["([^"]+)"\]/,N),q=R(O,/\[(\d+|\*)\]/,N),D=R(O,/()/,/{([\w ]*?)}/),U=R(/\.\./),z=R(/\./),K=R(O,/!/),H=R(/$/),function(t){return t(h(L,F,q,D),U,z,K,H)});function W(t,e){return{key:t,node:e}}var X=c("key"),G=c("node"),J={};function Z(t){var e=t(tt).emit,r=t(et).emit,n=t(at).emit,o=t(ot).emit;function a(t,e,r){G(k(t))[e]=r}function s(t,r,n){t&&a(t,r,n);var i=M(W(r,n),t);return e(i),i}var u={};return u[dt]=function(t,e){if(!t)return n(e),s(t,J,e);var r,o,u,f=(o=e,u=G(k(r=t)),y(i,u)?s(r,v(u),o):r),c=S(f),h=X(k(f));return a(c,h,e),M(W(h,e),c)},u[lt]=function(t){return r(t),S(t)||o(G(k(t)))},u[ht]=s,u}var $=V(function(t,e,r,n,i){var a=1,s=2,c=3,d=f(X,k),l=f(G,k);function b(t,e){return!!e[a]?p(t,k):t}function y(t){if(t==m)return m;return p(function(t){return d(t)!=J},f(t,S))}function g(){return function(t){return d(t)==J}}function w(t,e,r,n,i){var o,a=t(r);if(a){var s=(o=a,B(function(t,e){return e(t,o)},n,e));return i(r.substr(v(a[0])),s)}}function M(t,e){return u(w,t,e)}var x=h(M(t,A(b,function(t,e){var r=e[c];return r?p(f(u(_,E(r.split(/\W+/))),l),t):t},function(t,e){var r=e[s];return p(r&&"*"!=r?function(t){return d(t)==r}:m,t)},y)),M(e,A(function(t){if(t==m)return m;var e=g(),r=t,n=y(function(t){return i(t)}),i=h(e,r,n);return i})),M(r,A()),M(n,A(b,g)),M(i,A(function(t){return function(e){var r=t(e);return!0===r?k(e):r}})),function(t){throw o('"'+t+'" could not be tokenised')});function j(t,e){return e}function I(t,e){return x(t,e,t?I:j)}return function(t){try{return I(t,m)}catch(e){throw o('Could not compile "'+t+'" because '+e.message)}}});function Y(t,e,r){var n,i;function o(t){return function(e){return e.id==t}}return{on:function(r,o){var a={listener:r,id:o||r};return e&&e.emit(t,r,a.id),n=M(a,n),i=M(r,i),this},emit:function(){!function t(e,r){e&&(k(e).apply(null,r),t(S(e),r))}(i,arguments)},un:function(e){var a;n=T(n,o(e),function(t){a=t}),a&&(i=T(i,function(t){return t==a.listener}),r&&r.emit(t,a.listener,a.id))},listeners:function(){return i},hasListener:function(t){return w(function t(e,r){return r&&(e(k(r))?k(r):t(e,S(r)))}(t?o(t):m,n))}}}var Q=1,tt=Q++,et=Q++,rt=Q++,nt=Q++,it="fail",ot=Q++,at=Q++,st="start",ut="data",ft="end",ct=Q++,ht=Q++,dt=Q++,lt=Q++;function pt(t,e,r){try{var n=a.parse(e)}catch(t){}return{statusCode:t,body:e,jsonBody:n,thrown:r}}function bt(t,e){var r={node:t(et),path:t(tt)};function n(e,r,n){var i=t(e).emit;r.on(function(t){var e,r,o,a=n(t);!1!==a&&(e=i,r=G(a),o=C(t),e(r,j(S(I(X,o))),j(I(G,o))))},e),t("removeListener").on(function(n){n==e&&(t(n).listeners()||r.un(e))})}t("newListener").on(function(t){var i=/(node|path):(.*)/.exec(t);if(i){var o=r[i[1]];o.hasListener(t)||n(t,o,e(i[2]))}})}function mt(t,e){var r,n=/^(node|path):./,i=t(ot),o=t(nt).emit,a=t(rt).emit,s=l(function(e,i){if(r[e])d(i,r[e]);else{var o=t(e),a=i[0];n.test(e)?f(o,a):o.on(a)}return r});function f(t,e,n){n=n||e;var i=c(e);return t.on(function(){var e=!1;r.forget=function(){e=!0},d(arguments,i),delete r.forget,e&&t.un(n)},n),r}function c(t){return function(){try{return t.apply(r,arguments)}catch(t){setTimeout(function(){throw t})}}}function h(e,r,n){var i,s;"node"==e?(s=n,i=function(){var t=s.apply(this,arguments);w(t)&&(t==gt.drop?o():a(t))}):i=n,f(t(e+":"+r),i,n)}function p(t,e,n){return g(e)?h(t,e,n):function(t,e){for(var r in e)h(t,r,e[r])}(t,e),r}return t(at).on(function(t){var e;r.root=(e=t,function(){return e})}),t(st).on(function(t,e){r.header=function(t){return t?e[t]:e}}),r={on:s,addListener:s,removeListener:function(e,n,o){if("done"==e)i.un(n);else if("node"==e||"path"==e)t.un(e+":"+n,o);else{var a=n;t(e).un(a)}return r},emit:t.emit,node:u(p,"node"),path:u(p,"path"),done:u(f,i),start:u(function(e,n){return t(e).on(c(n),n),r},st),fail:t(it).on,abort:t(ct).emit,header:b,root:b,source:e}}function yt(e,r,n,i,o){var a=function(){var t={},e=n("newListener"),r=n("removeListener");function n(n){return t[n]=Y(n,e,r)}function i(e){return t[e]||n(e)}return["emit","on","un"].forEach(function(t){i[t]=l(function(e,r){d(r,i(e)[t])})}),i}();return r&&function(e,r,n,i,o,a,f){var c,h=e(ut).emit,d=e(it).emit,l=0,p=!0;function b(){var t=r.responseText,e=t.substr(l);e&&h(e),l=v(t)}e(ct).on(function(){r.onreadystatechange=null,r.abort()}),"onprogress"in r&&(r.onprogress=b),r.onreadystatechange=function(){function t(){try{p&&e(st).emit(r.status,(t=r.getAllResponseHeaders(),n={},t&&t.split("\r\n").forEach(function(t){var e=t.indexOf(": ");n[t.substring(0,e)]=t.substring(e+2)}),n)),p=!1}catch(t){}var t,n}switch(r.readyState){case 2:case 3:return t();case 4:t(),2==String(r.status)[0]?(b(),e(ft).emit()):d(pt(r.status,r.responseText))}};try{for(var m in r.open(n,i,!0),a)r.setRequestHeader(m,a[m]);(function(t,e){function r(e){return e.port||{"http:":80,"https:":443}[e.protocol||t.protocol]}return!!(e.protocol&&e.protocol!=t.protocol||e.host&&e.host!=t.host||e.host&&r(e)!=r(t))})(t.location,{protocol:(c=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(i)||[])[1]||"",host:c[2]||"",port:c[3]||""})||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=f,r.send(o)}catch(e){t.setTimeout(u(d,pt(s,s,e)),0)}}(a,new XMLHttpRequest,e,r,n,i,o),P(a),function(t,e){var r,n={};function i(t){return function(e){r=t(r,e)}}for(var o in e)t(o).on(i(e[o]),n);t(rt).on(function(t){var e=k(r),n=X(e),i=S(r);i&&(G(k(i))[n]=t)}),t(nt).on(function(){var t=k(r),e=X(t),n=S(r);n&&delete G(k(n))[e]}),t(ct).on(function(){for(var r in e)t(r).un(n)})}(a,Z(a)),bt(a,$),mt(a,r)}function vt(t,e,r,n,i,o,s){return i=i?a.parse(a.stringify(i)):{},n?g(n)||(n=a.stringify(n),i["Content-Type"]=i["Content-Type"]||"application/json"):n=null,t(r||"GET",(u=e,!1===s&&(-1==u.indexOf("?")?u+="?":u+="&",u+="_="+(new Date).getTime()),u),n,i,o||!1);var u}function gt(t){var e=A("resume","pause","pipe"),r=u(_,e);return t?r(t)||g(t)?vt(yt,t):vt(yt,t.url,t.method,t.body,t.headers,t.withCredentials,t.cached):yt()}gt.drop=function(){return gt.drop},"function"==typeof define&&define.amd?define("oboe",[],function(){return gt}):"object"===(void 0===r?"undefined":_typeof(r))?e.exports=gt:t.oboe=gt}(function(){try{return window}catch(t){return self}}(),Object,Array,Error,JSON)},{}],377:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],378:[function(t,e,r){var n=t("underscore"),i=t("web3-core-helpers").errors,o=t("oboe"),a=function(t,e){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],this.path=t,this.connection=e.connect({path:this.path}),this.addDefaultEvents();var i=function(t){var e=null;n.isArray(t)?t.forEach(function(t){r.responseCallbacks[t.id]&&(e=t.id)}):e=t.id,e||-1===t.method.indexOf("_subscription")?r.responseCallbacks[e]&&(r.responseCallbacks[e](null,t),delete r.responseCallbacks[e]):r.notificationCallbacks.forEach(function(e){n.isFunction(e)&&e(t)})};"Socket"===e.constructor.name?o(this.connection).done(i):this.connection.on("data",function(t){r._parseResponse(t.toString()).forEach(i)})};a.prototype.addDefaultEvents=function(){var t=this;this.connection.on("connect",function(){}),this.connection.on("error",function(){t._timeout()}),this.connection.on("end",function(){t._timeout()}),this.connection.on("timeout",function(){t._timeout()})},a.prototype._parseResponse=function(t){var e=this,r=[];return t.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(t){e.lastChunk&&(t=e.lastChunk+t);var n=null;try{n=JSON.parse(t)}catch(r){return e.lastChunk=t,clearTimeout(e.lastChunkTimeout),void(e.lastChunkTimeout=setTimeout(function(){throw e._timeout(),i.InvalidResponse(t)},15e3))}clearTimeout(e.lastChunkTimeout),e.lastChunk=null,n&&r.push(n)}),r},a.prototype._addResponseCallback=function(t,e){var r=t.id||t[0].id,n=t.method||t[0].method;this.responseCallbacks[r]=e,this.responseCallbacks[r].method=n},a.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](i.InvalidConnection("on IPC")),delete this.responseCallbacks[t])},a.prototype.reconnect=function(){this.connection.connect({path:this.path})},a.prototype.send=function(t,e){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(t)),this._addResponseCallback(t,e)},a.prototype.on=function(t,e){if("function"!=typeof e)throw new Error("The second parameter callback must be a function.");switch(t){case"data":this.notificationCallbacks.push(e);break;default:this.connection.on(t,e)}},a.prototype.once=function(t,e){if("function"!=typeof e)throw new Error("The second parameter callback must be a function.");this.connection.once(t,e)},a.prototype.removeListener=function(t,e){var r=this;switch(t){case"data":this.notificationCallbacks.forEach(function(t,n){t===e&&r.notificationCallbacks.splice(n,1)});break;default:this.connection.removeListener(t,e)}},a.prototype.removeAllListeners=function(t){switch(t){case"data":this.notificationCallbacks=[];break;default:this.connection.removeAllListeners(t)}},a.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.connection.removeAllListeners("error"),this.connection.removeAllListeners("end"),this.connection.removeAllListeners("timeout"),this.addDefaultEvents()},e.exports=a},{oboe:376,underscore:377,"web3-core-helpers":191}],379:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],380:[function(t,e,r){(function(r){var n=t("underscore"),i=t("web3-core-helpers").errors,o=null,a=null,s=null;"undefined"!=typeof window?(o=window.WebSocket,a=btoa,s=function(t){return new URL(t)}):(o=t("websocket").w3cwebsocket,a=function(t){return r(t).toString("base64")},s=t("url").parse);var u=function(t,e){var r=this;this.responseCallbacks={},this.notificationCallbacks=[],e=e||{},this._customTimeout=e.timeout;var i=s(t),u=e.headers||{};i.username&&i.password&&(u.authorization="Basic "+a(i.username+":"+i.password)),this.connection=new o(t,void 0,void 0,u),this.addDefaultEvents(),this.connection.onmessage=function(t){var e="string"==typeof t.data?t.data:"";r._parseResponse(e).forEach(function(t){var e=null;n.isArray(t)?t.forEach(function(t){r.responseCallbacks[t.id]&&(e=t.id)}):e=t.id,e||-1===t.method.indexOf("_subscription")?r.responseCallbacks[e]&&(r.responseCallbacks[e](null,t),delete r.responseCallbacks[e]):r.notificationCallbacks.forEach(function(e){n.isFunction(e)&&e(t)})})}};u.prototype.addDefaultEvents=function(){var t=this;this.connection.onerror=function(){t._timeout()},this.connection.onclose=function(){t._timeout(),t.reset()}},u.prototype._parseResponse=function(t){var e=this,r=[];return t.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(t){e.lastChunk&&(t=e.lastChunk+t);var n=null;try{n=JSON.parse(t)}catch(r){return e.lastChunk=t,clearTimeout(e.lastChunkTimeout),void(e.lastChunkTimeout=setTimeout(function(){throw e._timeout(),i.InvalidResponse(t)},15e3))}clearTimeout(e.lastChunkTimeout),e.lastChunk=null,n&&r.push(n)}),r},u.prototype._addResponseCallback=function(t,e){var r=t.id||t[0].id,n=t.method||t[0].method;this.responseCallbacks[r]=e,this.responseCallbacks[r].method=n;var o=this;this._customTimeout&&setTimeout(function(){o.responseCallbacks[r]&&(o.responseCallbacks[r](i.ConnectionTimeout(o._customTimeout)),delete o.responseCallbacks[r])},this._customTimeout)},u.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](i.InvalidConnection("on WS")),delete this.responseCallbacks[t])},u.prototype.send=function(t,e){var r=this;if(this.connection.readyState!==this.connection.CONNECTING){if(this.connection.readyState!==this.connection.OPEN)return console.error("connection not open on send()"),"function"==typeof this.connection.onerror?this.connection.onerror(new Error("connection not open")):console.error("no error callback"),void e(new Error("connection not open"));this.connection.send(JSON.stringify(t)),this._addResponseCallback(t,e)}else setTimeout(function(){r.send(t,e)},10)},u.prototype.on=function(t,e){if("function"!=typeof e)throw new Error("The second parameter callback must be a function.");switch(t){case"data":this.notificationCallbacks.push(e);break;case"connect":this.connection.onopen=e;break;case"end":this.connection.onclose=e;break;case"error":this.connection.onerror=e}},u.prototype.removeListener=function(t,e){var r=this;switch(t){case"data":this.notificationCallbacks.forEach(function(t,n){t===e&&r.notificationCallbacks.splice(n,1)})}},u.prototype.removeAllListeners=function(t){switch(t){case"data":this.notificationCallbacks=[];break;case"connect":this.connection.onopen=null;break;case"end":this.connection.onclose=null;break;case"error":this.connection.onerror=null}},u.prototype.reset=function(){this._timeout(),this.notificationCallbacks=[],this.addDefaultEvents()},e.exports=u}).call(this,t("buffer").Buffer)},{buffer:47,underscore:379,url:158,"web3-core-helpers":191,websocket:45}],381:[function(t,e,r){var n=t("web3-core"),i=t("web3-core-subscriptions").subscriptions,o=t("web3-core-method"),a=t("web3-net"),s=function(){var t=this;n.packageInit(this,arguments);var e=this.setProvider;this.setProvider=function(){e.apply(t,arguments),t.net.setProvider.apply(t,arguments)},this.clearSubscriptions=t._requestManager.clearSubscriptions,this.net=new a(this.currentProvider),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};n.addProviders(s),e.exports=s},{"web3-core":209,"web3-core-method":193,"web3-core-subscriptions":206,"web3-net":373}],382:[function(t,e,r){arguments[4][210][0].apply(r,arguments)},{dup:210}],383:[function(t,e,r){arguments[4][165][0].apply(r,arguments)},{dup:165}],384:[function(t,e,r){var n=t("bn.js"),i=t("number-to-bn"),o=new n(0),a=new n(-1),s={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function u(t){var e=t?t.toLowerCase():"ether",r=s[e];if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+t+" doesn't exists, please use the one of the following units "+JSON.stringify(s,null,2));return new n(r,10)}function f(t){if("string"==typeof t){if(!t.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+t+"', should be a number matching (^-?[0-9.]+).");return t}if("number"==typeof t)return String(t);if("object"===(void 0===t?"undefined":_typeof(t))&&t.toString&&(t.toTwos||t.dividedToIntegerBy))return t.toPrecision?String(t.toPrecision()):t.toString(10);throw new Error("while converting number to string, invalid number value '"+t+"' type "+(void 0===t?"undefined":_typeof(t))+".")}e.exports={unitMap:s,numberToString:f,getValueOfUnit:u,fromWei:function(t,e,r){var n=i(t),f=n.lt(o),c=u(e),h=s[e].length-1||1,d=r||{};f&&(n=n.mul(a));for(var l=n.mod(c).toString(10);l.length2)throw new Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal points");var d=h[0],l=h[1];if(d||(d="0"),l||(l="0"),l.length>o)throw new Error("[ethjs-unit] while converting number "+t+" to wei, too many decimal places");for(;l.length65536){if(!i)throw new Error("Requested too many random bytes.");r(new Error("Requested too many random bytes."))}if(void 0!==n&&n.randomBytes){if(!i)return"0x"+n.randomBytes(e).toString("hex");n.randomBytes(e,function(t,e){t?r(u):r(null,"0x"+e.toString("hex"))})}else{var o;if(void 0!==n?o=n:"undefined"!=typeof msCrypto&&(o=msCrypto),o&&o.getRandomValues){var a=o.getRandomValues(new Uint8Array(e)),s="0x"+Array.from(a).map(function(t){return t.toString(16)}).join("");if(!i)return s;r(null,s)}else{var u=new Error('No "crypto" object available. This Browser doesn\'t support generating secure random bytes.');if(!i)throw u;r(u)}}}},{"./crypto.js":388}],390:[function(t,e,r){var n=t("is-hex-prefixed");e.exports=function(t){return"string"!=typeof t?t:n(t)?t.slice(2):t}},{"is-hex-prefixed":385}],391:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],392:[function(t,e,r){(function(t){!function(n){var i="object"==(void 0===r?"undefined":_typeof(r))&&r,o="object"==(void 0===e?"undefined":_typeof(e))&&e&&e.exports==i&&e,a="object"==(void 0===t?"undefined":_typeof(t))&&t;a.global!==a&&a.window!==a||(n=a);var s,u,f,c=String.fromCharCode;function h(t){for(var e,r,n=[],i=0,o=t.length;i=55296&&e<=56319&&i=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function l(t,e){return c(t>>e&63|128)}function p(t){if(0==(4294967168&t))return c(t);var e="";return 0==(4294965248&t)?e=c(t>>6&31|192):0==(4294901760&t)?(d(t),e=c(t>>12&15|224),e+=l(t,6)):0==(4292870144&t)&&(e=c(t>>18&7|240),e+=l(t,12),e+=l(t,6)),e+=c(63&t|128)}function b(){if(f>=u)throw Error("Invalid byte index");var t=255&s[f];if(f++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function m(){var t,e;if(f>u)throw Error("Invalid byte index");if(f==u)return!1;if(t=255&s[f],f++,0==(128&t))return t;if(192==(224&t)){if((e=(31&t)<<6|b())>=128)return e;throw Error("Invalid continuation byte")}if(224==(240&t)){if((e=(15&t)<<12|b()<<6|b())>=2048)return d(e),e;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=(15&t)<<18|b()<<12|b()<<6|b())>=65536&&e<=1114111)return e;throw Error("Invalid UTF-8 detected")}var y={version:"2.0.0",encode:function(t){for(var e=h(t),r=e.length,n=-1,i="";++n65535&&(i+=c((e-=65536)>>>10&1023|55296),e=56320|1023&e),i+=c(e);return i}(r)}};if("function"==typeof define&&"object"==_typeof(define.amd)&&define.amd)define(function(){return y});else if(i&&!i.nodeType)if(o)o.exports=y;else{var v={}.hasOwnProperty;for(var g in y)v.call(y,g)&&(i[g]=y[g])}else n.utf8=y}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],393:[function(t,e,r){var n=t("underscore"),i=t("ethjs-unit"),o=t("./utils.js"),a=t("./soliditySha3.js"),s=t("randomhex"),u=function(t){if(!o.isHexStrict(t))throw new Error("The parameter must be a valid HEX string.");var e="",r=0,n=t.length;for("0x"===t.substring(0,2)&&(r=2);r7?r+=t[n].toUpperCase():r+=t[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:u,toAscii:u,asciiToHex:f,fromAscii:f,unitMap:i.unitMap,toWei:function(t,e){if(e=c(e),!o.isBN(t)&&!n.isString(t))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(t)?i.toWei(t,e):i.toWei(t,e).toString(10)},fromWei:function(t,e){if(e=c(e),!o.isBN(t)&&!n.isString(t))throw new Error("Please pass numbers as strings or BigNumber objects to avoid precision errors.");return o.isBN(t)?i.fromWei(t,e):i.fromWei(t,e).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement}},{"./soliditySha3.js":394,"./utils.js":395,"ethjs-unit":384,randomhex:389,underscore:391}],394:[function(t,e,r){var n=t("underscore"),i=t("bn.js"),o=t("./utils.js"),a=function(t){var e=void 0===t?"undefined":_typeof(t);if("string"===e)return o.isHexStrict(t)?new i(t.replace(/0x/i,""),16):new i(t,10);if("number"===e)return new i(t);if(o.isBigNumber(t))return new i(t.toString(10));if(o.isBN(t))return t;throw new Error(t+" is not a number")},s=function(t,e,r){var n,s,u,f;if("bytes"===(t=(u=t).startsWith("int[")?"int256"+u.slice(3):"int"===u?"int256":u.startsWith("uint[")?"uint256"+u.slice(4):"uint"===u?"uint256":u.startsWith("fixed[")?"fixed128x128"+u.slice(5):"fixed"===u?"fixed128x128":u.startsWith("ufixed[")?"ufixed128x128"+u.slice(6):"ufixed"===u?"ufixed128x128":u)){if(e.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+e.length);return e}if("string"===t)return o.utf8ToHex(e);if("bool"===t)return e?"01":"00";if(t.startsWith("address")){if(n=r?64:40,!o.isAddress(e))throw new Error(e+" is not a valid address, or the checksum is invalid.");return o.leftPad(e.toLowerCase(),n)}if(n=(f=/^\D+(\d+).*$/.exec(t))?parseInt(f[1],10):null,t.startsWith("bytes")){if(!n)throw new Error("bytes[] not yet supported in solidity");if(r&&(n=32),n<1||n>32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(e)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(t.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(e)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+t)},u=function(t){if(n.isArray(t))throw new Error("Autodetection of array types is not supported.");var e,r,a,u="";if(n.isObject(t)&&(t.hasOwnProperty("v")||t.hasOwnProperty("t")||t.hasOwnProperty("value")||t.hasOwnProperty("type"))?(e=t.hasOwnProperty("t")?t.t:t.type,u=t.hasOwnProperty("v")?t.v:t.value):(e=o.toHex(t,!0),u=o.toHex(t),e.startsWith("int")||e.startsWith("uint")||(e="bytes")),!e.startsWith("int")&&!e.startsWith("uint")||"string"!=typeof u||/^(-)?0x/i.test(u)||(u=new i(u)),n.isArray(u)){if(a=/^\D+\d*\[(\d+)\]$/.exec(e),(r=a?parseInt(a[1],10):null)&&u.length!==r)throw new Error(e+" is not matching the given array "+JSON.stringify(u));r=u.length}return n.isArray(u)?u.map(function(t){return s(e,t,r).toString("hex").replace("0x","")}).join(""):s(e,u,r).toString("hex").replace("0x","")};e.exports=function(){var t=Array.prototype.slice.call(arguments),e=n.map(t,u);return o.sha3("0x"+e.join(""))}},{"./utils.js":395,"bn.js":382,underscore:391}],395:[function(t,e,r){var n=t("underscore"),i=t("bn.js"),o=t("number-to-bn"),a=t("utf8"),s=t("eth-lib/lib/hash"),u=function(t){return t instanceof i||t&&t.constructor&&"BN"===t.constructor.name},f=function(t){return t&&t.constructor&&"BigNumber"===t.constructor.name},c=function(t){try{return o.apply(null,arguments)}catch(e){throw new Error(e+' Given value: "'+t+'"')}},h=function(t){return!!/^(0x)?[0-9a-f]{40}$/i.test(t)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(t)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(t))||d(t))},d=function(t){t=t.replace(/^0x/i,"");for(var e=y(t.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(e[r],16)>7&&t[r].toUpperCase()!==t[r]||parseInt(e[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1;return!0},l=function(t){var e="";t=(t=(t=(t=(t=a.encode(t)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r>>4).toString(16)),e.push((15&t[r]).toString(16));return"0x"+e.join("")},isHex:function(t){return(n.isString(t)||n.isNumber(t))&&/^(-0x|0x)?[0-9a-f]*$/i.test(t)},isHexStrict:m,leftPad:function(t,e,r){var n=/^0x/i.test(t)||"number"==typeof t,i=e-(t=t.toString(16).replace(/^0x/i,"")).length+1>=0?e-t.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+t},rightPad:function(t,e,r){var n=/^0x/i.test(t)||"number"==typeof t,i=e-(t=t.toString(16).replace(/^0x/i,"")).length+1>=0?e-t.length+1:0;return(n?"0x":"")+t+new Array(i).join(r||"0")},toTwosComplement:function(t){return"0x"+c(t).toTwos(256).toString(16,64)},sha3:y}},{"bn.js":382,"eth-lib/lib/hash":383,"number-to-bn":386,underscore:391,utf8:392}],396:[function(t,e,r){e.exports={name:"web3",namespace:"ethereum",version:"1.0.0-beta.34",description:"Ethereum JavaScript API",repository:"https://github.com/ethereum/web3.js/tree/master/packages/web3",license:"LGPL-3.0",main:"src/index.js",types:"index.d.ts",bugs:{url:"https://github.com/ethereum/web3.js/issues"},keywords:["Ethereum","JavaScript","API"],author:"ethereum.org",authors:[{name:"Fabian Vogelsteller",email:"fabian@ethereum.org",homepage:"http://frozeman.de"},{name:"Marek Kotewicz",email:"marek@parity.io",url:"https://github.com/debris"},{name:"Marian Oancea",url:"https://github.com/cubedro"},{name:"Gav Wood",email:"g@parity.io",homepage:"http://gavwood.com"},{name:"Jeffery Wilcke",email:"jeffrey.wilcke@ethereum.org",url:"https://github.com/obscuren"}],dependencies:{"web3-bzz":"1.0.0-beta.34","web3-core":"1.0.0-beta.34","web3-eth":"1.0.0-beta.34","web3-eth-personal":"1.0.0-beta.34","web3-net":"1.0.0-beta.34","web3-shh":"1.0.0-beta.34","web3-utils":"1.0.0-beta.34"}}},{}],BN:[function(t,e,r){arguments[4][240][0].apply(r,arguments)},{buffer:17,dup:240}],Web3:[function(t,e,r){var n=t("../package.json").version,i=t("web3-core"),o=t("web3-eth"),a=t("web3-net"),s=t("web3-eth-personal"),u=t("web3-shh"),f=t("web3-bzz"),c=t("web3-utils"),h=function(){var t=this;i.packageInit(this,arguments),this.version=n,this.utils=c,this.eth=new o(this),this.shh=new u(this),this.bzz=new f(this);var e=this.setProvider;this.setProvider=function(r,n){return e.apply(t,arguments),this.eth.setProvider(r,n),this.shh.setProvider(r,n),this.bzz.setProvider(r),!0}};h.version=n,h.utils=c,h.modules={Eth:o,Net:a,Personal:s,Shh:u,Bzz:f},i.addProviders(h),e.exports=h},{"../package.json":396,"web3-bzz":187,"web3-core":209,"web3-eth":372,"web3-eth-personal":369,"web3-net":373,"web3-shh":381,"web3-utils":393}]},{},["Web3"])("Web3")}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Web3=t():e.Web3=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=254)}([function(e,t,r){"use strict";e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";(function(e){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var n=r(264),i=r(265),o=r(130);function a(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(n)return D(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,a=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,f/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=r;os&&(r=s-f),o=r;o>=0;o--){for(var d=!0,l=0;li&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(f=(31&u)<<6|63&o)>127&&(c=f);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(f=(15&u)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(c=f);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(f=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&f<1114112&&(c=f)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},f.prototype.compare=function(e,t,r,n,i){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(n,i),c=e.slice(t,r),d=0;di)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return k(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,i,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function B(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function C(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function j(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,o){return o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,o){return o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},f.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):C(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):C(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):C(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(7))},function(e,t,r){"use strict";function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";(function(e){var t=r(0)(r(2));!function(e,n){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"===(0,t.default)(e)?e.exports=a:(void 0).BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(261).Buffer}catch(e){}function f(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+e)}function u(e,t,r){var n=f(e,r);return r-1>=t&&(n|=f(e,r-1)<<4),n}function c(e,t,r,n){for(var o=0,a=0,s=Math.min(e.length,r),f=t;f=49?u-49+10:u>=17?u-17+10:u,i(u>=0&&a0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,r,n){if("number"==typeof e)return this._initNumber(e,r,n);if("object"===(0,t.default)(e))return this._initArray(e,r,n);"hex"===r&&(r=16),i(r===(0|r)&&r>=2&&r<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=u(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,f=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){a.prototype.inspect=l}else a.prototype.inspect=l;function l(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[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];a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var n=0,o=0,a=0;a>>24-n&16777215,(n+=2)>=26&&(n-=26,a--),r=0!==o||a!==this.length-1?h[6-f.length]+f+r:f+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=p[e],c=b[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var l=d.modrn(c).toString(e);r=(d=d.idivn(c)).isZero()?l+r:h[u-l.length]+l+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.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&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function y(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,f=a/67108864|0;r.words[0]=s;for(var u=1;u>>26,d=67108863&f,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r._strip()}a.prototype.toArrayLike=function(e,t,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,n),a},a.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===o?(r>=0&&(e[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,b=h>>>13,y=0|a[2],m=8191&y,v=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,k=0|a[4],S=8191&k,A=k>>>13,E=0|a[5],x=8191&E,P=E>>>13,O=0|a[6],R=8191&O,T=O>>>13,M=0|a[7],I=8191&M,B=M>>>13,C=0|a[8],j=8191&C,U=C>>>13,N=0|a[9],L=8191&N,F=N>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],K=8191&H,G=H>>>13,V=0|s[2],W=8191&V,J=V>>>13,X=0|s[3],Z=8191&X,Y=X>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],fe=8191&se,ue=se>>>13,ce=0|s[8],de=8191&ce,le=ce>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(u+(n=Math.imul(d,q))|0)+((8191&(i=(i=Math.imul(d,z))+Math.imul(l,q)|0))<<13)|0;u=((o=Math.imul(l,z))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var me=(u+(n=n+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(l,K)|0))<<13)|0;u=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,z))+Math.imul(v,q)|0,o=Math.imul(v,z),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0;var ve=(u+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(l,W)|0))<<13)|0;u=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(_,q)|0,o=Math.imul(_,z),n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,J)|0;var ge=(u+(n=n+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(l,Z)|0))<<13)|0;u=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,J)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,J)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0;var we=(u+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;u=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(P,q)|0,o=Math.imul(P,z),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,G)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(m,Q)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var ke=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(l,oe)|0))<<13)|0;u=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,J)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Se=(u+(n=n+Math.imul(d,fe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(l,fe)|0))<<13)|0;u=((o=o+Math.imul(l,ue)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(U,q)|0,o=Math.imul(U,z),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,ue)|0;var Ae=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,z))+Math.imul(F,q)|0,o=Math.imul(F,z),n=n+Math.imul(j,K)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,G)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,le)|0;var Ee=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;u=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,G))+Math.imul(F,K)|0,o=Math.imul(F,G),n=n+Math.imul(j,W)|0,i=(i=i+Math.imul(j,J)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,J)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,ue)|0,n=n+Math.imul(m,de)|0,i=(i=i+Math.imul(m,le)|0)+Math.imul(v,de)|0,o=o+Math.imul(v,le)|0;var xe=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,J))+Math.imul(F,W)|0,o=Math.imul(F,J),n=n+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,Y)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,ue)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,le)|0;var Pe=(u+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(v,pe)|0))<<13)|0;u=((o=o+Math.imul(v,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,Y))+Math.imul(F,Z)|0,o=Math.imul(F,Y),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,ue)|0,n=n+Math.imul(S,de)|0,i=(i=i+Math.imul(S,le)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,le)|0;var Oe=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(U,re)|0,o=o+Math.imul(U,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(T,fe)|0,o=o+Math.imul(T,ue)|0,n=n+Math.imul(x,de)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0;var Re=(u+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,be)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(U,oe)|0,o=o+Math.imul(U,ae)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(R,de)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var Te=(u+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((o=o+Math.imul(P,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(U,fe)|0,o=o+Math.imul(U,ue)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,le)|0;var Me=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(T,pe)|0))<<13)|0;u=((o=o+Math.imul(T,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,fe),i=(i=Math.imul(L,ue))+Math.imul(F,fe)|0,o=Math.imul(F,ue),n=n+Math.imul(j,de)|0,i=(i=i+Math.imul(j,le)|0)+Math.imul(U,de)|0,o=o+Math.imul(U,le)|0;var Ie=(u+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,de),i=(i=Math.imul(L,le))+Math.imul(F,de)|0,o=Math.imul(F,le);var Be=(u+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(U,pe)|0))<<13)|0;u=((o=o+Math.imul(U,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863;var Ce=(u+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,be))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,be))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,f[0]=ye,f[1]=me,f[2]=ve,f[3]=ge,f[4]=we,f[5]=_e,f[6]=ke,f[7]=Se,f[8]=Ae,f[9]=Ee,f[10]=xe,f[11]=Pe,f[12]=Oe,f[13]=Re,f[14]=Te,f[15]=Me,f[16]=Ie,f[17]=Be,f[18]=Ce,0!==u&&(f[19]=u,r.length++),r};function v(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(e,t,r){return v(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(m=y),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?y(this,e,t):r<1024?v(this,e,t):g(this,e,t)},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},w.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),t?this.ineg():this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,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 o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=n);u--){var d=0|this.words[u];this.words[u]=c<<26-o|d>>>o,c=d&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,n=1<=0);var t=e%26,r=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var 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},a.prototype.isubn=function(e){if(i("number"==typeof e),i(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)-(f/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o;if(0===s)return this._strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new a(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u=0;d--){var l=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(i,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%e;return t?-n:n},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),i(e<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),s=new a(0),f=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(c),o.isub(d)),n.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(d)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(f)):(r.isub(t),s.isub(n),f.isub(o))}return{a:s,b:f,gcd:r.iushln(u)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,o=new a(1),s=new a(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(n=0===t.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new P(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var _={k256:null,p224:null,p192:null,p25519:null};function k(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function P(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){P.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}k.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},k.prototype.split=function(e,t){e.iushrn(this.n,0,t)},k.prototype.imulK=function(e){return e.imul(this.k)},o(S,k),S.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(_[e])return _[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new A;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return _[e]=t,t},P.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},P.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},P.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(d(e,e.umod(this.m)._forceRed(this)),e)},P.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},P.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},P.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},P.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},P.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},P.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},P.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},P.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},P.prototype.isqr=function(e){return this.imul(e,e.clone())},P.prototype.sqr=function(e){return this.mul(e,e)},P.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var s=new a(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var d=this.pow(c,n),l=this.pow(e,n.addn(1).iushrn(1)),h=this.pow(e,n),p=o;0!==h.cmp(s);){for(var b=h,y=0;0!==b.cmp(s);y++)b=b.redSqr();i(y=0;n--){for(var u=t.words[n],c=f-1;c>=0;c--){var d=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}f=26}return i},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new O(e)},o(O,P),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e)}).call(this,r(27)(e))},function(e,t,r){"use strict";"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){"use strict"; +/*! safe-buffer. MIT License. Feross Aboukhadijeh */var n=r(1),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";var n,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function f(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var u,c=[],d=!1,l=-1;function h(){d&&u&&(d=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!d){var e=f(h);d=!0;for(var t=c.length;t;){for(u=c,c=[];++l1)for(var r=1;r=256)return!1}return!0}function d(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":o.throwArgumentError("hex data is odd-length","value",e));for(var i=[],f=0;ft&&o.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function b(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r="0123456789abcdef"[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":o.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(c(e)){for(var n="0x",i=0;i>4]+"0123456789abcdef"[15&s]}return n}return o.throwArgumentError("invalid hexlify value","value",e)}function y(e){"string"!=typeof e&&(e=b(e)),p(e)||o.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&o.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function v(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(f(e)){var r=d(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64))):65===r.length?(t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64)),t.v=r[64]):o.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:o.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=b(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=h(d(t._vs),32);t._vs=b(n);var i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&o.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var a=b(n);null==t.s?t.s=a:t.s!==a&&o.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?o.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&o.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=m(t.r,32):o.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=m(t.s,32):o.throwArgumentError("signature missing or invalid s","signature",e);var u=d(t.s);u[0]>=128&&o.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(u[0]|=128);var c=b(u);t._vs&&(p(t._vs)||o.throwArgumentError("signature invalid _vs","signature",e),t._vs=m(t._vs,32)),null==t._vs?t._vs=c:t._vs!==c&&o.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=t.ErrorCode=void 0;var i=n(r(8)),o=n(r(9)),a=r(383),s=!1,f=!1,u={debug:1,default:2,info:2,warning:3,error:4,off:5},c=u.default,d=null;var l,h,p=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();t.LogLevel=l,function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(l||(t.LogLevel=l={})),t.ErrorCode=h,function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED"}(h||(t.ErrorCode=h={}));var b="0123456789abcdef",y=function(){function e(t){(0,i.default)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return(0,o.default)(e,[{key:"_log",value:function(e,t){var r=e.toLowerCase();null==u[r]&&this.throwArgumentError("invalid log level name","logLevel",e),c>u[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=b[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(t){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var o=t,a="";switch(r){case h.NUMERIC_FAULT:a="NUMERIC_FAULT";var s=t;switch(s){case"overflow":case"underflow":case"division-by-zero":a+="-"+s;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break;case h.CALL_EXCEPTION:case h.INSUFFICIENT_FUNDS:case h.MISSING_NEW:case h.NONCE_EXPIRED:case h.REPLACEMENT_UNDERPRICED:case h.TRANSACTION_REPLACED:case h.UNPREDICTABLE_GAS_LIMIT:a=r}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var u=new Error(t);return u.reason=o,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return d||(d=new e(a.version)),d}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),s){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}f=!!t,s=!!r}},{key:"setLogLevel",value:function(t){var r=u[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();t.Logger=y,y.errors=h,y.levels=l},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(260),o=r(129),a=r(335),s=r(30),f=r(3),u=function e(t,r){var i=[];return r.forEach((function(r){if("object"===(0,n.default)(r.components)){if("tuple"!==r.type.substring(0,5))throw new Error("components found but type is not tuple; report on GitHub");var o="",a=r.type.indexOf("[");a>=0&&(o=r.type.substring(a));var s=e(t,r.components);Array.isArray(s)&&t?i.push("tuple("+s.join(",")+")"+o):t?i.push("("+s+")"):i.push("("+s.join(",")+")"+o)}else i.push(r.type)})),i},c=function(e){if(!o.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n];return r},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,stripHexPrefix:o.stripHexPrefix,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:c,toAscii:c,asciiToHex:d,fromAscii:d,unitMap:i.unitMap,toWei:function(e,t){if(t=l(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.toWei(e,t):i.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=l(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?i.fromWei(e,t):i.fromWei(e,t).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement,isBloom:o.isBloom,isUserEthereumAddressInBloom:o.isUserEthereumAddressInBloom,isContractAddressInBloom:o.isContractAddressInBloom,isTopic:o.isTopic,isTopicInBloom:o.isTopicInBloom,isInBloom:o.isInBloom,compareBlockNumbers:function(e,t){if(e===t)return 0;if("genesis"!==e&&"earliest"!==e&&0!==e||"genesis"!==t&&"earliest"!==t&&0!==t){if("genesis"===e||"earliest"===e||0===e)return-1;if("genesis"===t||"earliest"===t||0===t)return 1;if("latest"===e||"finalized"===e)return"pending"===t?-1:1;if("latest"===t||"finalized"===t)return"pending"===e?1:-1;if("pending"===e)return 1;if("pending"===t)return-1;if("safe"===e||"safe"===t)return;var r=new f(e),n=new f(t);return r.lt(n)?-1:r.eq(n)?0:1}return 0},toNumber:o.toNumber}},function(e,t,r){"use strict";var n=t,i=r(3),o=r(19),a=r(137);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-f:f,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,f=e.andln(3)+i&3,u=t.andln(3)+o&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?f:-f,r[0].push(a),s=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==f?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n,i=r(0)(r(2)),o="object"===("undefined"==typeof Reflect?"undefined":(0,i.default)(Reflect))?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function f(){f.init.call(this)}e.exports=f,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&v(e,"error",t,r)}(e,i,{once:!0})}))},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+(0,i.default)(e))}function d(e){return void 0===e._maxListeners?f.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,a,s;if(c(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=d(e))>0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=a.length,s=f,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function b(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var f=i[e];if(void 0===f)return!1;if("function"==typeof f)a(f,this,t);else{var u=f.length,c=m(f,u);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},f.prototype.listeners=function(e){return b(this,e,!0)},f.prototype.rawListeners=function(e){return b(this,e,!1)},f.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},f.prototype.listenerCount=y,f.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";var n=r(5).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=d,t=3;break;default:return this.write=l,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";var n=t,i=r(3),o=r(39),a=r(238);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-f:f,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,f=e.andln(3)+i&3,u=t.andln(3)+o&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?f:-f,r[0].push(a),s=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==f?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=t.Reader=t.Coder=void 0,t.checkResultErrors=function(e){var t=[];return function e(r,n){if(!Array.isArray(n))return;for(var i in n){var o=r.slice();o.push(i);try{e(o,n[i])}catch(e){t.push({path:o,error:e})}}}([],e),t};var i=n(r(8)),o=n(r(9)),a=r(15),s=r(38),f=r(64),u=r(16),c=r(65),d=new u.Logger(c.version);var l=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.type=r,this.localName=n,this.dynamic=o}return(0,o.default)(e,[{key:"_throwError",value:function(e,t){d.throwArgumentError(e,this.localName,t)}}]),e}();t.Coder=l;var h=function(){function e(t){(0,i.default)(this,e),(0,f.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData((0,a.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=(0,a.arrayify)(e),r=t.length%this.wordSize;return r&&(t=(0,a.concat)([t,this._padding.slice(r)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=(0,a.arrayify)(s.BigNumber.from(e));return t.length>this.wordSize&&d.throwError("value out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,a.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(r){e._data[t]=e._getValue(r)}}}]),e}();t.Writer=h;var p=function(){function e(t,r,n,o){(0,i.default)(this,e),(0,f.defineReadOnly)(this,"_data",(0,a.arrayify)(t)),(0,f.defineReadOnly)(this,"wordSize",r||32),(0,f.defineReadOnly)(this,"_coerceFunc",n),(0,f.defineReadOnly)(this,"allowLoose",o),this._offset=0}return(0,o.default)(e,[{key:"data",get:function(){return(0,a.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,r){return this._coerceFunc?this._coerceFunc(t,r):e.coerce(t,r)}},{key:"_peekBytes",value:function(e,t,r){var n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:d.throwError("data out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}},{key:"readValue",value:function(){return s.BigNumber.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}}]),e}();t.Reader=p},function(e,t,r){"use strict"; +/*! safe-buffer. MIT License. Feross Aboukhadijeh */var n=r(1),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";var n=r(19),i=r(4);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function f(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=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},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,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var f=0,u=t;return f+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,f,u){var c=0,d=t;return c+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,f,u){return t+n+o+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){"use strict";var n=r(39),i=r(10);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function f(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=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},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,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var f=0,u=t;return f+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,f,u){var c=0,d=t;return c+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,f,u){return t+n+o+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,i(r(133),t),i(r(134),t),i(r(328),t),i(r(94),t),i(r(329),t),i(r(34),t),i(r(330),t),i(r(331),t),i(r(102),t);var o=r(42);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},function(e,t,r){"use strict";var n=r(266),i=r(267),o=r(131),a=r(268);e.exports=function(e,t){return n(e)||i(e,t)||o(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";(function(t,n){var i=r(5).Buffer,o=t.crypto||t.msCrypto;o&&o.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;au[r]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n>4],r+=b[15&t[o]];i.push(e+"=Uint8Array(0x"+r+")")}else i.push(e+"="+JSON.stringify(t))}catch(t){i.push(e+"="+JSON.stringify(n[e].toString()))}})),i.push("code=".concat(r)),i.push("version=".concat(this.version));var o=t,a="";switch(r){case h.NUMERIC_FAULT:a="NUMERIC_FAULT";var s=t;switch(s){case"overflow":case"underflow":case"division-by-zero":a+="-"+s;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break;case h.CALL_EXCEPTION:case h.INSUFFICIENT_FUNDS:case h.MISSING_NEW:case h.NONCE_EXPIRED:case h.REPLACEMENT_UNDERPRICED:case h.TRANSACTION_REPLACED:case h.UNPREDICTABLE_GAS_LIMIT:a=r}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var u=new Error(t);return u.reason=o,u.code=r,Object.keys(n).forEach((function(e){u[e]=n[e]})),u}},{key:"throwError",value:function(e,t,r){throw this.makeError(e,t,r)}},{key:"throwArgumentError",value:function(t,r,n){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:r,value:n})}},{key:"assert",value:function(e,t,r,n){e||this.throwError(t,r,n)}},{key:"assertArgument",value:function(e,t,r,n){e||this.throwArgumentError(t,r,n)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),p&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:p})}},{key:"checkSafeUint53",value:function(t,r){"number"==typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,r,n){n=n?": "+n:"",tr&&this.throwError("too many arguments"+n,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}},{key:"checkNew",value:function(t,r){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}},{key:"checkAbstract",value:function(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:r.name})}}],[{key:"globalLogger",value:function(){return d||(d=new e(a.version)),d}},{key:"setCensorship",value:function(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),s){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}f=!!t,s=!!r}},{key:"setLogLevel",value:function(t){var r=u[t.toLowerCase()];null!=r?c=r:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();t.Logger=y,y.errors=h,y.levels=l},function(e,t,r){"use strict";var n=r(256),i=r(358);e.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=t[0]._requestManager:e._requestManager=new n.Manager(t[0],t[1]),e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,r){return e._requestManager.setProvider(t,r),e._provider=e._requestManager.provider,!0}),e.setRequestManager=function(t){e._requestManager=t,e._provider=t.provider},e.BatchRequest=n.BatchManager.bind(null,e._requestManager),e.extend=i(e)},addProviders:function(e){e.givenProvider=n.Manager.givenProvider,e.providers=n.Manager.providers}}},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var i=n(r(3)),o=r(42),a=r(74);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: "+e);return"0x"+e.toString(16)};t.intToBuffer=function(r){var n=(0,t.intToHex)(r);return e.from((0,o.padToEven)(n.slice(2)),"hex")};t.zeros=function(t){return e.allocUnsafe(t).fill(0)};var s=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,a.assertIsBuffer)(e),f(e)};t.unpadArray=function(e){return(0,a.assertIsArray)(e),f(e)};t.unpadHexString=function(e){return(0,a.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),f(e)};t.toBuffer=function(r){if(null==r)return e.allocUnsafe(0);if(e.isBuffer(r))return e.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return e.from(r);if("string"==typeof r){if(!(0,o.isHexString)(r))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+r);return e.from((0,o.padToEven)((0,o.stripHexPrefix)(r)),"hex")}if("number"==typeof r)return(0,t.intToBuffer)(r);if(i.default.isBN(r))return r.toArrayLike(e);if(r.toArray)return e.from(r.toArray());if(r.toBuffer)return e.from(r.toBuffer());throw new Error("invalid type")};t.bufferToInt=function(e){return new i.default((0,t.toBuffer)(e)).toNumber()};t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")};t.fromSigned=function(e){return new i.default(e).fromTwos(256)};t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())};t.addHexPrefix=function(e){return"string"!=typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e};t.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return e.from(t.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};t.baToJSON=function(r){if(e.isBuffer(r))return"0x"+r.toString("hex");if(r instanceof Array){for(var n=[],i=0;i1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},m.prototype.getCall=function(e){return"function"==typeof this.call?this.call(e):this.call},m.prototype.extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},m.prototype.validateArgs=function(e){if(e.length!==this.params)throw d.InvalidNumberOfParams(e.length,this.params,this.name)},m.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map((function(r,n){return r?r.call(t,e[n]):e[n]})):e},m.prototype.formatOutput=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.outputFormatter&&e?t.outputFormatter(e):e})):this.outputFormatter&&e?this.outputFormatter(e):e},m.prototype.toPayload=function(e){var t=this.getCall(e),r=this.extractCallback(e),n=this.formatInput(e);this.validateArgs(n);var i={method:t,params:n,callback:r};return this.transformPayload&&(i=this.transformPayload(i)),i},m.prototype._confirmTransaction=function(e,t,r){var n=this,o=!1,a=!0,u=0,c=0,v=null,g=null,w=null,_=r.params[0]&&"object"===(0,f.default)(r.params[0])&&r.params[0].gas?r.params[0].gas:null,k=!!r.params[0]&&"object"===(0,f.default)(r.params[0])&&r.params[0].data&&r.params[0].from&&!r.params[0].to,S=k&&r.params[0].data.length>2,A=[new m({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[l.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:l.outputBlockFormatter}),new m({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:l.outputTransactionReceiptFormatter}),new m({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[l.inputAddressFormatter,l.inputDefaultBlockNumberFormatter]}),new m({name:"getTransactionByHash",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:l.outputTransactionFormatter}),new b({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:l.outputBlockFormatter}}})],E={};A.forEach((function(e){e.attachToObject(E),e.requestManager=n.requestManager}));var x=function(f,b,m,A,x){if(!m)return x||(x={unsubscribe:function(){clearInterval(v),clearTimeout(g)}}),(f?p.resolve(f):E.getTransactionReceipt(t)).catch((function(t){x.unsubscribe(),o=!0,h._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)})).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var o,s,u;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r&&r.blockHash){t.next=2;break}throw new Error("Receipt missing or blockHash null");case 2:if(n.extraFormatters&&n.extraFormatters.receiptFormatter&&(r=n.extraFormatters.receiptFormatter(r)),!(e.eventEmitter.listeners("confirmation").length>0)){t.next=28;break}if(void 0!==f&&0===c){t.next=25;break}return t.next=7,E.getBlockByNumber("latest");case 7:if(s=t.sent,u=s?s.hash:null,!b){t.next=24;break}if(!w){t.next=17;break}return t.next=13,E.getBlockByNumber(w.number+1);case 13:(o=t.sent)&&(w=o,e.eventEmitter.emit("confirmation",c,r,u)),t.next=22;break;case 17:return t.next=19,E.getBlockByNumber(r.blockNumber);case 19:o=t.sent,w=o,e.eventEmitter.emit("confirmation",c,r,u);case 22:t.next=25;break;case 24:e.eventEmitter.emit("confirmation",c,r,u);case 25:(b&&o||!b)&&c++,a=!1,c===n.transactionConfirmationBlocks+1&&(x.unsubscribe(),e.eventEmitter.removeAllListeners());case 28:return t.abrupt("return",r);case 29:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(r){var s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!k||o){t.next=19;break}if(r.contractAddress){t.next=5;break}return a&&(x.unsubscribe(),o=!0),h._fireError(d.NoContractAddressFoundError(r),e.eventEmitter,e.reject,null,r),t.abrupt("return");case 5:return t.prev=5,t.next=8,E.getCode(r.contractAddress);case 8:s=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(s){t.next=15;break}return t.abrupt("return");case 15:!0===r.status&&S||s.length>2?(e.eventEmitter.emit("receipt",r),n.extraFormatters&&n.extraFormatters.contractDeployFormatter?e.resolve(n.extraFormatters.contractDeployFormatter(r)):e.resolve(r),a&&e.eventEmitter.removeAllListeners()):h._fireError(d.ContractCodeNotStoredError(r),e.eventEmitter,e.reject,null,r),a&&x.unsubscribe(),o=!0;case 19:return t.abrupt("return",r);case 20:case"end":return t.stop()}}),t,null,[[5,11]])})));return function(e){return t.apply(this,arguments)}}()).then(function(){var t=(0,s.default)(i.default.mark((function t(s){var f,u,c,p;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k||o){t.next=35;break}if(s.outOfGas||_&&_===s.gasUsed||!0!==s.status&&"0x1"!==s.status&&void 0!==s.status){t.next=7;break}e.eventEmitter.emit("receipt",s),e.resolve(s),a&&e.eventEmitter.removeAllListeners(),t.next=33;break;case 7:if(JSON.stringify(s,null,2),!1!==s.status&&"0x0"!==s.status){t.next=32;break}if(t.prev=9,f=null,!n.handleRevert||"eth_sendTransaction"!==n.call&&"eth_sendRawTransaction"!==n.call){t.next=24;break}return u=r.params[0],"eth_sendRawTransaction"===n.call&&(c=r.params[0],p=y.parse(c),u=l.inputTransactionFormatter({data:p.data,to:p.to,from:p.from,gas:p.gasLimit.toHexString(),gasPrice:p.gasPrice?p.gasPrice.toHexString():void 0,value:p.value.toHexString()})),t.next=16,n.getRevertReason(u,s.blockNumber);case 16:if(!(f=t.sent)){t.next=21;break}h._fireError(d.TransactionRevertInstructionError(f.reason,f.signature,s),e.eventEmitter,e.reject,null,s),t.next=22;break;case 21:throw!1;case 22:t.next=25;break;case 24:throw!1;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(9),h._fireError(d.TransactionRevertedWithoutReasonError(s),e.eventEmitter,e.reject,null,s);case 30:t.next=33;break;case 32:h._fireError(d.TransactionOutOfGasError(s),e.eventEmitter,e.reject,null,s);case 33:a&&x.unsubscribe(),o=!0;case 35:case"end":return t.stop()}}),t,null,[[9,27]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(){u++,b?u-1>=n.transactionPollingTimeout&&(x.unsubscribe(),o=!0,h._fireError(d.TransactionError("Transaction was not mined within "+n.transactionPollingTimeout+" seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject)):u-1>=n.transactionBlockTimeout&&(x.unsubscribe(),o=!0,h._fireError(d.TransactionError("Transaction was not mined within "+n.transactionBlockTimeout+" blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!"),e.eventEmitter,e.reject))}));x.unsubscribe(),o=!0,h._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:m},e.eventEmitter,e.reject)},P=function(e){var t=!1,r=function(){v=setInterval(x.bind(null,e,!0),n.transactionPollingInterval)};if(!this.requestManager.provider.on)return r();E.subscribe("newBlockHeaders",(function(n,i,o){if(t=!0,n||!i)return r();x(e,!1,n,0,o)})),g=setTimeout((function(){t||r()}),1e3*this.blockHeaderTimeout)}.bind(this);E.getTransactionReceipt(t).then((function(t){t&&t.blockHash?(e.eventEmitter.listeners("confirmation").length>0&&P(t),x(t,!1)):o||P()})).catch((function(){o||P()}))};var v=function(e,t){return"number"==typeof e?t.wallet[e]:e&&"object"===(0,f.default)(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};function g(e,t){return new Promise((function(r,n){try{var i=new m({name:"getBlockByNumber",call:"eth_getBlockByNumber",params:2,inputFormatter:[function(e){return e?h.toHex(e):"latest"},function(){return!1}]}).createFunction(e.requestManager),a=new m({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(e.requestManager);Promise.all([i(),a()]).then((function(e){var n=(0,o.default)(e,2),i=n[0],a=n[1];if(("0x2"===t.type||void 0===t.type)&&i&&i.baseFeePerGas){var s,f;t.gasPrice?(s=t.gasPrice,f=t.gasPrice,delete t.gasPrice):(s=t.maxPriorityFeePerGas||"0x9502F900",f=t.maxFeePerGas||h.toHex(h.toBN(i.baseFeePerGas).mul(h.toBN(2)).add(h.toBN(s)))),r({maxFeePerGas:f,maxPriorityFeePerGas:s})}else{if(t.maxPriorityFeePerGas||t.maxFeePerGas)throw Error("Network doesn't support eip-1559");r({gasPrice:a})}}))}catch(e){n(e)}}))}m.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,r="eth_call"===e.call,n=function(){var n=Array.prototype.slice.call(arguments),i=p(!t),o=e.toPayload(n);e.hexFormat=!1,"eth_getTransactionReceipt"===e.call&&(e.hexFormat=o.params.length=256)return!1}return!0}function d(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid arrayify value");for(var r=[];e;)r.unshift(255&e),e=parseInt(String(e/256));return 0===r.length&&r.push(0),s(new Uint8Array(r))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e)&&(e=e.toHexString()),p(e)){var n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":o.throwArgumentError("hex data is odd-length","value",e));for(var i=[],f=0;ft&&o.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function b(e,t){if(t||(t={}),"number"==typeof e){o.checkSafeUint53(e,"invalid hexlify value");for(var r="";e;)r="0123456789abcdef"[15&e]+r,e=Math.floor(e/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),a(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":o.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(c(e)){for(var n="0x",i=0;i>4]+"0123456789abcdef"[15&s]}return n}return o.throwArgumentError("invalid hexlify value","value",e)}function y(e){"string"!=typeof e&&(e=b(e)),p(e)||o.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&o.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function v(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(f(e)){var r=d(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64))):65===r.length?(t.r=b(r.slice(0,32)),t.s=b(r.slice(32,64)),t.v=r[64]):o.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:o.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=b(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var n=h(d(t._vs),32);t._vs=b(n);var i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&o.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;var a=b(n);null==t.s?t.s=a:t.s!==a&&o.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?o.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var s=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==s&&o.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=m(t.r,32):o.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=m(t.s,32):o.throwArgumentError("signature missing or invalid s","signature",e);var u=d(t.s);u[0]>=128&&o.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(u[0]|=128);var c=b(u);t._vs&&(p(t._vs)||o.throwArgumentError("signature invalid _vs","signature",e),t._vs=m(t._vs,32)),null==t._vs?t._vs=c:t._vs!==c&&o.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BigNumber",{enumerable:!0,get:function(){return n.BigNumber}}),Object.defineProperty(t,"FixedFormat",{enumerable:!0,get:function(){return i.FixedFormat}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return i.FixedNumber}}),Object.defineProperty(t,"_base16To36",{enumerable:!0,get:function(){return n._base16To36}}),Object.defineProperty(t,"_base36To16",{enumerable:!0,get:function(){return n._base36To16}}),Object.defineProperty(t,"formatFixed",{enumerable:!0,get:function(){return i.formatFixed}}),Object.defineProperty(t,"parseFixed",{enumerable:!0,get:function(){return i.parseFixed}});var n=r(182),i=r(385)},function(e,t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.baToJSON=t.toUtf8=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToHex=t.bufferToInt=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;var i=n(r(3)),o=r(54),a=r(89);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("Received an invalid integer type: "+e);return"0x"+e.toString(16)};t.intToBuffer=function(r){var n=(0,t.intToHex)(r);return e.from((0,o.padToEven)(n.slice(2)),"hex")};t.zeros=function(t){return e.allocUnsafe(t).fill(0)};var s=function(e,r,n){var i=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};t.unpadBuffer=function(e){return(0,a.assertIsBuffer)(e),f(e)};t.unpadArray=function(e){return(0,a.assertIsArray)(e),f(e)};t.unpadHexString=function(e){return(0,a.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),f(e)};t.toBuffer=function(r){if(null==r)return e.allocUnsafe(0);if(e.isBuffer(r))return e.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return e.from(r);if("string"==typeof r){if(!(0,o.isHexString)(r))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+r);return e.from((0,o.padToEven)((0,o.stripHexPrefix)(r)),"hex")}if("number"==typeof r)return(0,t.intToBuffer)(r);if(i.default.isBN(r))return r.toArrayLike(e);if(r.toArray)return e.from(r.toArray());if(r.toBuffer)return e.from(r.toBuffer());throw new Error("invalid type")};t.bufferToInt=function(e){return new i.default((0,t.toBuffer)(e)).toNumber()};t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")};t.fromSigned=function(e){return new i.default(e).fromTwos(256)};t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())};t.addHexPrefix=function(e){return"string"!=typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e};t.toUtf8=function(t){if((t=(0,o.stripHexPrefix)(t)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return e.from(t.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};t.baToJSON=function(r){if(e.isBuffer(r))return"0x"+r.toString("hex");if(r instanceof Array){for(var n=[],i=0;i + * @license MIT + */ +function o(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;f--)if(c[f]!==d[f])return!1;for(f=c.length-1;f>=0;f--)if(a=c[f],!w(e[a],t[a],r,n))return!1;return!0}(e,t,r,i))}return r?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function S(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&v(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!e&&i&&!r;if((!e&&s.isError(i)&&o&&k(i,r)||a)&&v(i,r,"Got unwanted exception"+n),e&&i&&r&&!k(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return y(m(e.actual),128)+" "+e.operator+" "+y(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=b(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},s.inherits(h.AssertionError,Error),h.fail=v,h.ok=g,h.equal=function(e,t,r){e!=t&&v(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&v(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){w(e,t,!1)||v(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){w(e,t,!0)||v(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){w(e,t,!1)&&v(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){w(t,r,!0)&&v(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&v(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&v(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){S(!0,e,t,r)},h.doesNotThrow=function(e,t,r){S(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=i((function e(t,r){t||v(t,!0,r,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var A=Object.keys||function(e){var t=[];for(var r in e)f.call(e,r)&&t.push(r);return t}}).call(this,r(7))},function(e,t,r){"use strict";(function(e){var n=r(0)(r(2));function i(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+(0,n.default)(e));return"0"===e[0]&&"x"===e[1]}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=i;function o(e){var t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+(0,n.default)(t));return t.length%2&&(t="0"+t),t}t.stripHexPrefix=function(e){if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+(0,n.default)(e));return i(e)?e.slice(2):e},t.padToEven=o,t.getBinarySize=function(t){if("string"!=typeof t)throw new Error("[getBinarySize] method requires input type 'string', recieved "+(0,n.default)(t));return e.byteLength(t,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error("[arrayContainsArray] method requires input 'superset' to be an array, got type '"+(0,n.default)(e)+"'");if(!0!==Array.isArray(t))throw new Error("[arrayContainsArray] method requires input 'subset' to be an array, got type '"+(0,n.default)(t)+"'");return t[r?"some":"every"]((function(t){return e.indexOf(t)>=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,f;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))f="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";f='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return f+=". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(145),o=r(149);r(4)(u,i);for(var a=n(o.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,f;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))f="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";f='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return f+=". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(152),o=r(156);r(4)(u,i);for(var a=n(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";e.exports=r(359)},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e){return"0x"+i.default.keccak_256((0,o.arrayify)(e))};var i=n(r(388)),o=r(15)},function(e,t,r){"use strict";var n=r(0)(r(2));var i={};function o(e,t,r){r||(r=Error);var n=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function a(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,f;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))f="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";f='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return f+=". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(215),o=r(219);r(4)(u,i);for(var a=n(o.prototype),s=0;s=0}))},t.toAscii=function(e){var t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,f;if("string"==typeof t&&(o="not ",t.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))f="The ".concat(e," ").concat(i," ").concat(a(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";f='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return f+=". Received type ".concat((0,n.default)(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=u;var i=r(244),o=r(248);r(10)(u,i);for(var a=n(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";var n=t;n.version=r(272).version,n.utils=r(18),n.rand=r(92),n.curve=r(138),n.curves=r(93),n.ec=r(284),n.eddsa=r(288)},function(e,t,r){"use strict";var n=r(25),i=r(19);function o(){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=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;or.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=r.slice(i,d)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)f=t(s),u.push(f.data),s=f.remainder;return{data:u,remainder:r.slice(d)}}(u(t));if(r)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var r=u(t),n=r[0];if(n<=127)return r.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var i=n-246;return i+o(r.slice(1,i).toString("hex"),16)}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=r(3),i=r(18),o=i.getNAF,a=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;c--)f=(f<<1)+n[c];u.push(f)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;u--){for(var c=0;u>=0&&0===a[u];u--)c++;if(u>=0&&c++,f=f.dblp(c),u<0)break;var d=a[u];s(0!==d),f="affine"===e.type?d>0?f.mixedAdd(i[d-1>>1]):f.mixedAdd(i[-d-1>>1].neg()):d>0?f.add(i[d-1>>1]):f.add(i[-d-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){var s,f,u,c=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(s=0;s=1;s-=2){var b=s-1,y=s;if(1===c[b]&&1===c[y]){var m=[t[b],null,null,t[y]];0===t[b].y.cmp(t[y].y)?(m[1]=t[b].add(t[y]),m[2]=t[b].toJ().mixedAdd(t[y].neg())):0===t[b].y.cmp(t[y].y.redNeg())?(m[1]=t[b].toJ().mixedAdd(t[y]),m[2]=t[b].add(t[y].neg())):(m[1]=t[b].toJ().mixedAdd(t[y]),m[2]=t[b].toJ().mixedAdd(t[y].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[b],r[y]);for(h=Math.max(g[0].length,h),l[b]=new Array(h),l[y]=new Array(h),f=0;f=0;s--){for(var A=0;s>=0;){var E=!0;for(f=0;f=0&&A++,k=k.dblp(A),s<0)break;for(f=0;f0?u=d[f][x-1>>1]:x<0&&(u=d[f][-x-1>>1].neg()),k="affine"===u.type?k.mixedAdd(u):k.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(c),l=["%","/","?",";","#"].concat(d),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(341);function w(e,t,r){if(e&&o.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,n.default)(e));var a=e.indexOf("?"),f=-1!==a&&a127?C+="x":C+=B[j];if(!C.match(p)){var N=M.slice(0,O),L=M.slice(O+1),F=B.match(b);F&&(N.push(F[1]),L.unshift(F[2])),L.length&&(w="/"+L.join(".")+w),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=i.toASCII(this.hostname));var D=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+D,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!y[S])for(O=0,I=d.length;O0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift());return r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=S.slice(-1)[0],x=(r.host||e.host||S.length>1)&&("."===E||".."===E)||""===E,P=0,O=S.length;O>=0;O--)"."===(E=S[O])?S.splice(O,1):".."===E?(S.splice(O,1),P++):P&&(S.splice(O,1),P--);if(!_&&!k)for(;P--;P)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),x&&"/"!==S.join("/").substr(-1)&&S.push("");var R,T=""===S[0]||S[0]&&"/"===S[0].charAt(0);A&&(r.hostname=r.host=T?"":S.length?S.shift():"",(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift()));return(_=_||r.host&&S.length)&&!T&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=f.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){"use strict";var n=r(103),i=function(e){var t,r,i=new Promise((function(){t=arguments[0],r=arguments[1]}));if(e)return{resolve:t,reject:r,eventEmitter:i};var o=new n;return i._events=o._events,i.emit=o.emit,i.on=o.on,i.once=o.once,i.off=o.off,i.listeners=o.listeners,i.addListener=o.addListener,i.removeListener=o.removeListener,i.removeAllListeners=o.removeAllListeners,{resolve:t,reject:r,eventEmitter:i}};i.resolve=function(e){var t=i(!0);return t.resolve(e),t.eventEmitter},e.exports=i},function(e,t,r){"use strict";var n=r(360),i=function(e){this.name=e.name,this.type=e.type,this.subscriptions=e.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.attachToObject=function(e){var t=this.buildCall(),r=this.name.split(".");r.length>1?(e[r[0]]=e[r[0]]||{},e[r[0]][r[1]]=t):e[r[0]]=t},i.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new n({subscription:e.subscriptions[arguments[0]]||{},requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},e.exports={subscriptions:i,subscription:n}},function(e,t,r){"use strict";var n=r(33),i=r(36),o=r(17),a=function(){var e=this;n.packageInit(this,arguments),[new i({name:"getId",call:"net_version",params:0,outputFormatter:parseInt}),new i({name:"isListening",call:"net_listening",params:0}),new i({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};n.addProviders(a),e.exports=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return o.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return o.Utf8ErrorFuncs}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return o.Utf8ErrorReason}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return o._toEscapedUtf8String}}),Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return n.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return i.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return n.parseBytes32String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return o.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return o.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return o.toUtf8String}});var n=r(403),i=r(405),o=r(108)},function(e){e.exports=JSON.parse('{"identity":0,"ip4":4,"tcp":6,"sha1":17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"dccp":33,"murmur3-128":34,"murmur3-32":35,"ip6":41,"ip6zone":42,"path":47,"multicodec":48,"multihash":49,"multiaddr":50,"multibase":51,"dns":53,"dns4":54,"dns6":55,"dnsaddr":56,"protobuf":80,"cbor":81,"raw":85,"dbl-sha2-256":86,"rlp":96,"bencode":99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,"sctp":132,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"zcash-block":192,"zcash-tx":193,"stellar-block":208,"stellar-tx":209,"md4":212,"md5":213,"bmt":214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,"zeronet":230,"ed25519-pub":237,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,"udp":273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,"udt":301,"utp":302,"unix":400,"p2p":421,"ipfs":421,"https":443,"onion":444,"onion3":445,"garlic64":446,"garlic32":447,"tls":448,"quic":460,"ws":477,"wss":478,"p2p-websocket-star":479,"http":480,"json":512,"messagepack":513,"x11":4352,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46000,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332}')},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(30),t.createHash=t.Hash=r(45),t.createHmac=t.Hmac=r(198);var n=r(460),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var a=r(201);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync;var s=r(462);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var f=r(477);t.DiffieHellmanGroup=f.DiffieHellmanGroup,t.createDiffieHellmanGroup=f.createDiffieHellmanGroup,t.getDiffieHellman=f.getDiffieHellman,t.createDiffieHellman=f.createDiffieHellman,t.DiffieHellman=f.DiffieHellman;var u=r(480);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=r(500);var c=r(501);t.publicEncrypt=c.publicEncrypt,t.privateEncrypt=c.privateEncrypt,t.publicDecrypt=c.publicDecrypt,t.privateDecrypt=c.privateDecrypt;var d=r(504);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,r){"use strict";var n=r(5).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i>>24]^c[p>>>16&255]^d[b>>>8&255]^l[255&y]^t[m++],a=u[p>>>24]^c[b>>>16&255]^d[y>>>8&255]^l[255&h]^t[m++],s=u[b>>>24]^c[y>>>16&255]^d[h>>>8&255]^l[255&p]^t[m++],f=u[y>>>24]^c[h>>>16&255]^d[p>>>8&255]^l[255&b]^t[m++],h=o,p=a,b=s,y=f;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&y])^t[m++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[y>>>8&255]<<8|n[255&h])^t[m++],s=(n[b>>>24]<<24|n[y>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[m++],f=(n[y>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[m++],[o>>>=0,a>>>=0,s>>>=0,f>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,f=0;f<256;++f){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var c=e[a],d=e[c],l=e[d],h=257*e[u]^16843008*u;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*l^65537*d^257*c^16843008*a,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===a?a=s=1:(a=c^e[e[e[l^c]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o>>24,a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a]),i[o]=i[o-t]^a}for(var u=[],c=0;c>>24]]^f.INV_SUB_MIX[1][f.SBOX[l>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[l>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=u},function(e,t,r){"use strict";var n=r(5).Buffer,i=r(96);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),f=n.alloc(o||0),u=n.alloc(0);a>0||o>0;){var c=new i;c.update(u),c.update(e),t&&c.update(t),u=c.digest();var d=0;if(a>0){var l=s.length-a;d=Math.min(a,u.length),u.copy(s,l,0,d),a-=d}if(d0){var h=f.length-o,p=Math.min(o,u.length-d);u.copy(f,h,d,d+p),o-=p}}return u.fill(0),{key:s,iv:f}}},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(490),o=r(497),a=r(498),s=r(111),f=r(201),u=r(5).Buffer;function c(e){var t;"object"!==(0,n.default)(e)||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var r,c,d=a(e,t),l=d.tag,h=d.data;switch(l){case"CERTIFICATE":c=i.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=i.PublicKey.decode(h,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=i.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=o[e.algorithm.decrypt.cipher.algo.join(".")],a=e.algorithm.decrypt.cipher.iv,c=e.subjectPrivateKey,d=parseInt(i.split("-")[1],10)/8,l=f.pbkdf2Sync(t,r,n,d,"sha1"),h=s.createDecipheriv(i,l,a),p=[];return p.push(h.update(c)),p.push(h.final()),u.concat(p)}(h=i.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(r=(c=i.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:i.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=i.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=i.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+l)}}e.exports=c,c.signature=i.signature},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLength=t.decode=t.encode=void 0;var i=n(r(3));function o(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function a(t,r){if(t<56)return e.from([t+r]);var n=f(t),i=f(r+55+n.length/2);return e.from(i+n,"hex")}function s(e){return"0x"===e.slice(0,2)}function f(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function u(t){if(!e.isBuffer(t)){if("string"==typeof t)return s(t)?e.from((n="string"!=typeof(o=t)?o:s(o)?o.slice(2):o).length%2?"0"+n:n,"hex"):e.from(t);if("number"==typeof t||"bigint"==typeof t)return t?(r=f(t),e.from(r,"hex")):e.from([]);if(null==t)return e.from([]);if(t instanceof Uint8Array)return e.from(t);if(i.default.isBN(t))return e.from(t.toArray());throw new Error("invalid type")}var r,n,o;return t}t.encode=function t(r){if(Array.isArray(r)){for(var n=[],i=0;ir.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(s=r.slice(i,d)).length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)f=t(s),u.push(f.data),s=f.remainder;return{data:u,remainder:r.slice(d)}}(u(t));if(r)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},t.getLength=function(t){if(!t||0===t.length)return e.from([]);var r=u(t),n=r[0];if(n<=127)return r.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var i=n-246;return i+o(r.slice(1,i).toString("hex"),16)}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=r(3),i=r(22),o=i.getNAF,a=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=a;c--)f=(f<<1)+n[c];u.push(f)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;u--){for(var c=0;u>=0&&0===a[u];u--)c++;if(u>=0&&c++,f=f.dblp(c),u<0)break;var d=a[u];s(0!==d),f="affine"===e.type?d>0?f.mixedAdd(i[d-1>>1]):f.mixedAdd(i[-d-1>>1].neg()):d>0?f.add(i[d-1>>1]):f.add(i[-d-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){var s,f,u,c=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(s=0;s=1;s-=2){var b=s-1,y=s;if(1===c[b]&&1===c[y]){var m=[t[b],null,null,t[y]];0===t[b].y.cmp(t[y].y)?(m[1]=t[b].add(t[y]),m[2]=t[b].toJ().mixedAdd(t[y].neg())):0===t[b].y.cmp(t[y].y.redNeg())?(m[1]=t[b].toJ().mixedAdd(t[y]),m[2]=t[b].add(t[y].neg())):(m[1]=t[b].toJ().mixedAdd(t[y]),m[2]=t[b].toJ().mixedAdd(t[y].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[b],r[y]);for(h=Math.max(g[0].length,h),l[b]=new Array(h),l[y]=new Array(h),f=0;f=0;s--){for(var A=0;s>=0;){var E=!0;for(f=0;f=0&&A++,k=k.dblp(A),s<0)break;for(f=0;f0?u=d[f][x-1>>1]:x<0&&(u=d[f][-x-1>>1].neg()),k="affine"===u.type?k.mixedAdd(u):k.add(u))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i>>32-t}function u(e,t,r,n,i,o,a){return f(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return f(e+(t&n|r&~n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return f(e+(t^r^n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return f(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=c(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=c(o,r,n,i,e[6],3225465664,9),i=c(i,o,r,n,e[11],643717713,14),n=c(n,i,o,r,e[0],3921069994,20),r=c(r,n,i,o,e[5],3593408605,5),o=c(o,r,n,i,e[10],38016083,9),i=c(i,o,r,n,e[15],3634488961,14),n=c(n,i,o,r,e[4],3889429448,20),r=c(r,n,i,o,e[9],568446438,5),o=c(o,r,n,i,e[14],3275163606,9),i=c(i,o,r,n,e[3],4107603335,14),n=c(n,i,o,r,e[8],1163531501,20),r=c(r,n,i,o,e[13],2850285829,5),o=c(o,r,n,i,e[2],4243563512,9),i=c(i,o,r,n,e[7],1735328473,14),r=d(r,n=c(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=d(o,r,n,i,e[8],2272392833,11),i=d(i,o,r,n,e[11],1839030562,16),n=d(n,i,o,r,e[14],4259657740,23),r=d(r,n,i,o,e[1],2763975236,4),o=d(o,r,n,i,e[4],1272893353,11),i=d(i,o,r,n,e[7],4139469664,16),n=d(n,i,o,r,e[10],3200236656,23),r=d(r,n,i,o,e[13],681279174,4),o=d(o,r,n,i,e[0],3936430074,11),i=d(i,o,r,n,e[3],3572445317,16),n=d(n,i,o,r,e[6],76029189,23),r=d(r,n,i,o,e[9],3654602809,4),o=d(o,r,n,i,e[12],3873151461,11),i=d(i,o,r,n,e[15],530742520,16),r=l(r,n=d(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=l(o,r,n,i,e[7],1126891415,10),i=l(i,o,r,n,e[14],2878612391,15),n=l(n,i,o,r,e[5],4237533241,21),r=l(r,n,i,o,e[12],1700485571,6),o=l(o,r,n,i,e[3],2399980690,10),i=l(i,o,r,n,e[10],4293915773,15),n=l(n,i,o,r,e[1],2240044497,21),r=l(r,n,i,o,e[8],1873313359,6),o=l(o,r,n,i,e[15],4264355552,10),i=l(i,o,r,n,e[6],2734768916,15),n=l(n,i,o,r,e[13],1309151649,21),r=l(r,n,i,o,e[4],4149444226,6),o=l(o,r,n,i,e[11],3174756917,10),i=l(i,o,r,n,e[2],718787259,15),n=l(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},function(e,t,r){"use strict";var n=r(46).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i>>32-t}function b(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,k=0|this._c,S=0|this._d,A=0|this._e,E=0;E<80;E+=1){var x,P;E<16?(x=b(r,n,i,o,h,e[s[E]],d[0],u[E]),P=g(w,_,k,S,A,e[f[E]],l[0],c[E])):E<32?(x=y(r,n,i,o,h,e[s[E]],d[1],u[E]),P=v(w,_,k,S,A,e[f[E]],l[1],c[E])):E<48?(x=m(r,n,i,o,h,e[s[E]],d[2],u[E]),P=m(w,_,k,S,A,e[f[E]],l[2],c[E])):E<64?(x=v(r,n,i,o,h,e[s[E]],d[3],u[E]),P=y(w,_,k,S,A,e[f[E]],l[3],c[E])):(x=g(r,n,i,o,h,e[s[E]],d[4],u[E]),P=b(w,_,k,S,A,e[f[E]],l[4],c[E])),r=h,h=o,o=p(i,10),i=n,n=x,w=A,A=S,S=p(k,10),k=_,_=P}var O=this._b+i+S|0;this._b=this._c+o+A|0,this._c=this._d+h+w|0,this._d=this._e+r+_|0,this._e=this._a+n+k|0,this._a=O},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,r){"use strict";var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(315),n.sha1=r(316),n.sha224=r(317),n.sha256=r(158),n.sha384=r(318),n.sha512=r(159)},function(e,t,r){"use strict";var n=r(1),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";(function(t,n,i){var o=r(76);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=v;var s,f=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:o.nextTick;v.WritableState=m;var u=Object.create(r(62));u.inherits=r(4);var c={deprecate:r(75)},d=r(162),l=r(100).Buffer,h=i.Uint8Array||function(){};var p,b=r(163);function y(){}function m(e,t){s=s||r(35),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),A(e,t))}(e,r,n,t,i);else{var a=k(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?f(w,e,r,a,i):w(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(e){if(s=s||r(35),!(p.call(v,this)||this instanceof s))return new v(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function g(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),A(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,f=!0;r;)i[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;i.allBuffers=f,g(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,d=r.callback;if(g(e,t,!1,t.objectMode?1:u.length,u,c,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=k(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(v,d),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===v&&(e&&e._writableState instanceof m)}})):p=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,l.isBuffer(n)||n instanceof h);return s&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=y),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r));return t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=b.destroy,v.prototype._undestroy=b.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(6),r(164).setImmediate,r(7))},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=t.bnToRlp=t.bnToUnpaddedBuffer=t.bnToHex=void 0;var i,o=n(r(3)),a=r(42),s=r(34);function f(t){return(0,s.unpadBuffer)(t.toArrayLike(e))}t.bnToHex=function(e){return"0x"+e.toString(16)},t.bnToUnpaddedBuffer=f,t.bnToRlp=function(e){return f(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0!==e){if("string"==typeof e&&!(0,a.isHexString)(e))throw new Error("A string must be provided with a 0x-prefix, given: "+e);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");var r=(0,s.toBuffer)(e);if(t===i.Buffer)return r;if(t===i.BN)return new o.default(r);if(t===i.Number){var n=new o.default(r),f=new o.default(Number.MAX_SAFE_INTEGER.toString());if(n.gt(f))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return n.toNumber()}return"0x"+r.toString("hex")}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,r,n,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new a(r,n||e,o),f=i?i+t:t;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],s]:e._events[f].push(s):(e._events[f]=s,e._eventsCount++),e}function f(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),u.prototype.eventNames=function(){var e,t,r=[];if(0===this._eventsCount)return r;for(t in e=this._events)n.call(e,t)&&r.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},u.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=new Array(o);n=0||"tuple"===e)&&m[t])return!0;return(y[t]||"payable"===t)&&p.throwArgumentError("invalid modifier","name",t),!1}function g(e,t){for(var r in t)(0,c.defineReadOnly)(e,r,t[r])}var w=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});t.FormatTypes=w;var _=new RegExp(/^(.*)\[([0-9]*)\]$/),k=function(){function e(t,r){(0,s.default)(this,e),t!==b&&p.throwError("use fromString",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),g(this,r);var n=this.type.match(_);g(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:e.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return(0,f.default)(e,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var r="";return"array"===this.baseType?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==w.sighash&&(r+=this.type),r+="("+this.components.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+")"):r+=this.type,e!==w.sighash&&(!0===this.indexed&&(r+=" indexed"),e===w.full&&this.name&&(r+=" "+this.name)),r}}],[{key:"from",value:function(t,r){return"string"==typeof t?e.fromString(t,r):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(b,{name:t.name||null,type:B(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,r){return function(t){return e.fromObject({name:t.name,type:t.type,indexed:t.indexed,components:t.components})}(function(e,t){var r=e;function n(t){p.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&p.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||p.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=u.BigNumber.from(r[1]),r[0]):e}function P(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function O(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&p.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&p.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||p.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&p.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&p.throwArgumentError("unable to determine stateMutability","value",e),t}t.EventFragment=E;var R=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,f.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===w.sighash&&p.throwError("cannot format a constructor for sighash",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isConstructorFragment(e))return e;"constructor"!==e.type&&p.throwArgumentError("invalid constructor object","value",e);var t=O(e);t.constant&&p.throwArgumentError("constructor cannot be constant","value",e);var n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(k.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.BigNumber.from(e.gas):null};return new r(b,n)}},{key:"fromString",value:function(e){var t={type:"constructor"},n=(e=x(e,t)).match(U);return n&&"constructor"===n[1].trim()||p.throwArgumentError("invalid constructor string","value",e),t.inputs=S(n[2].trim(),!1),P(n[3].trim(),t),r.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),r}(A);t.ConstructorFragment=R;var T=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,f.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ",e!==w.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isFunctionFragment(e))return e;"function"!==e.type&&p.throwArgumentError("invalid function object","value",e);var t=O(e),n={type:e.type,name:j(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(k.fromObject):[],outputs:e.outputs?e.outputs.map(k.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?u.BigNumber.from(e.gas):null};return new r(b,n)}},{key:"fromString",value:function(e){var t={type:"function"},n=(e=x(e,t)).split(" returns ");n.length>2&&p.throwArgumentError("invalid function string","value",e);var i=n[0].match(U);if(i||p.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&j(t.name),t.inputs=S(i[2],!1),P(i[3].trim(),t),n.length>1){var o=n[1].match(U);""==o[1].trim()&&""==o[3].trim()||p.throwArgumentError("unexpected tokens","value",e),t.outputs=S(o[2],!1)}else t.outputs=[];return r.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),r}(R);function M(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||p.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}t.FunctionFragment=T;var I=function(e){(0,i.default)(r,e);var t=h(r);function r(){return(0,s.default)(this,r),t.apply(this,arguments)}return(0,f.default)(r,[{key:"format",value:function(e){if(e||(e=w.sighash),w[e]||p.throwArgumentError("invalid format type","format",e),e===w.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==w.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===w.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"==typeof e?r.fromString(e):r.fromObject(e)}},{key:"fromObject",value:function(e){if(r.isErrorFragment(e))return e;"error"!==e.type&&p.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:j(e.name),inputs:e.inputs?e.inputs.map(k.fromObject):[]};return M(new r(b,t))}},{key:"fromString",value:function(e){var t={type:"error"},n=e.match(U);return n||p.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&j(t.name),t.inputs=S(n[2],!1),M(r.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),r}(A);function B(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}t.ErrorFragment=I;var C=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function j(e){return e&&e.match(C)||p.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var U=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=m,t.getContractAddress=function(e){var t=null;try{t=m(e.from)}catch(t){u.throwArgumentError("missing from address","transaction",e)}var r=(0,n.stripZeros)((0,n.arrayify)(i.BigNumber.from(e.nonce).toHexString()));return m((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))},t.getCreate2Address=function(e,t,r){32!==(0,n.hexDataLength)(t)&&u.throwArgumentError("salt must be 32 bytes","salt",t);32!==(0,n.hexDataLength)(r)&&u.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r);return m((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",m(e),t,r])),12))},t.getIcapAddress=function(e){var t=(0,i._base16To36)(m(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+y("XE00"+t)+t},t.isAddress=function(e){try{return m(e),!0}catch(e){}return!1};var n=r(15),i=r(38),o=r(50),a=r(389),s=r(16),f=r(391),u=new s.Logger(f.version);function c(e){(0,n.isHexString)(e,20)||u.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),i=0;i<40;i++)r[i]=t[i].charCodeAt(0);for(var a=(0,n.arrayify)((0,o.keccak256)(r)),s=0;s<40;s+=2)a[s>>1]>>4>=8&&(t[s]=t[s].toUpperCase()),(15&a[s>>1])>=8&&(t[s+1]=t[s+1].toUpperCase());return"0x"+t.join("")}for(var d={},l=0;l<10;l++)d[String(l)]=String(l);for(var h=0;h<26;h++)d[String.fromCharCode(65+h)]=String(10+h);var p,b=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function y(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return d[e]})).join("");t.length>=b;){var r=t.substring(0,b);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function m(e){var t=null;if("string"!=typeof e&&u.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==y(e)&&u.throwArgumentError("bad icap checksum","address",e),t=(0,i._base36To16)(e.substring(4));t.length<40;)t="0"+t;t=c("0x"+t)}else u.throwArgumentError("invalid address","address",e);return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ErrorReason=t.Utf8ErrorFuncs=t.UnicodeNormalizationForm=void 0,t._toEscapedUtf8String=function(e,t){return'"'+d(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?h(e):h(55296+((e-=65536)>>10&1023))+h(56320+(1023&e))})).join("")+'"'},t._toUtf8String=p,t.toUtf8Bytes=l,t.toUtf8CodePoints=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;return d(l(e,t))},t.toUtf8String=function(e,t){return p(d(e,t))};var n,i,o=r(15),a=r(16),s=r(404),f=new a.Logger(s.version);function u(e,t,r,n,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6==2;s++)a++;return a}return e===i.OVERRUN?r.length-t-1:0}t.UnicodeNormalizationForm=n,function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(n||(t.UnicodeNormalizationForm=n={})),t.Utf8ErrorReason=i,function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(i||(t.Utf8ErrorReason=i={}));var c=Object.freeze({error:function(e,t,r,n,i){return f.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",r)},ignore:u,replace:function(e,t,r,n,o){return e===i.OVERLONG?(n.push(o),0):(n.push(65533),u(e,t,r))}});function d(e,t){null==t&&(t=c.error),e=(0,o.arrayify)(e);for(var r=[],n=0;n>7!=0){var s=null,f=null;if(192==(224&a))s=1,f=127;else if(224==(240&a))s=2,f=2047;else{if(240!=(248&a)){n+=t(128==(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,n-1,e,r);continue}s=3,f=65535}if(n-1+s>=e.length)n+=t(i.OVERRUN,n-1,e,r);else{for(var u=a&(1<<8-s-1)-1,d=0;d1114111?n+=t(i.OUT_OF_RANGE,n-1-s,e,r,u):u>=55296&&u<=57343?n+=t(i.UTF16_SURROGATE,n-1-s,e,r,u):u<=f?n+=t(i.OVERLONG,n-1-s,e,r,u):r.push(u))}}else r.push(a)}return r}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.current;t!=n.current&&(f.checkNormalize(),e=e.normalize(t));for(var r=[],i=0;i>6|192),r.push(63&a|128);else if(55296==(64512&a)){i++;var s=e.charCodeAt(i);if(i>=e.length||56320!=(64512&s))throw new Error("invalid utf-8 string");var u=65536+((1023&a)<<10)+(1023&s);r.push(u>>18|240),r.push(u>>12&63|128),r.push(u>>6&63|128),r.push(63&u|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return(0,o.arrayify)(r)}function h(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function p(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}t.Utf8ErrorFuncs=c},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(429),o=r(66),a=r(435);function s(e){t.decode(e)}t.names=a.names,t.codes=a.codes,t.defaultLengths=a.defaultLengths,t.toHexString=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return e.toString("hex")},t.fromHexString=function(e){return n.from(e,"hex")},t.toB58String=function(e){if(!n.isBuffer(e))throw new Error("must be passed a buffer");return i.encode("base58btc",e).toString().slice(1)},t.fromB58String=function(e){var t=e;return n.isBuffer(e)&&(t=e.toString()),i.decode("z"+t)},t.decode=function(e){if(!n.isBuffer(e))throw new Error("multihash must be a Buffer");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");var r=o.decode(e);if(!t.isValidCode(r))throw new Error("multihash unknown function code: 0x".concat(r.toString(16)));e=e.slice(o.decode.bytes);var i=o.decode(e);if(i<0)throw new Error("multihash invalid length: ".concat(i));if((e=e.slice(o.decode.bytes)).length!==i)throw new Error("multihash length inconsistent: 0x".concat(e.toString("hex")));return{code:r,name:a.codes[r],length:i,digest:e}},t.encode=function(e,r,i){if(!e||void 0===r)throw new Error("multihash encode requires at least two args: digest, code");var a=t.coerceCode(r);if(!n.isBuffer(e))throw new Error("digest should be a Buffer");if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.");return n.concat([n.from(o.encode(a)),n.from(o.encode(i)),e])},t.coerceCode=function(e){var r=e;if("string"==typeof e){if(void 0===a.names[e])throw new Error("Unrecognized hash function named: ".concat(e));r=a.names[e]}if("number"!=typeof r)throw new Error("Hash function code should be a number. Got: ".concat(r));if(void 0===a.codes[r]&&!t.isAppCode(r))throw new Error("Unrecognized function code: ".concat(r));return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!a.codes[e]},t.validate=s,t.prefix=function(e){return s(e),e.slice(0,2)}},function(e,t,r){"use strict";var n=r(19);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,r){var i=function(e){var t=o(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(r),a=r.modulus.byteLength(),s=new n(e).mul(i.blinder).umod(r.modulus),f=s.toRed(n.mont(r.prime1)),u=s.toRed(n.mont(r.prime2)),c=r.coefficient,d=r.prime1,l=r.prime2,h=f.redPow(r.exponent1).fromRed(),p=u.redPow(r.exponent2).fromRed(),b=h.isub(p).imul(c).umod(d).imul(l);return p.iadd(b).imul(i.unblinder).umod(r.modulus).toArrayLike(t,"be",a)}a.getr=o,e.exports=a}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t){var n,i=r(0)(r(2)),o=r(1),a=o.Buffer,s={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(s[n]=o[n]);var f=s.Buffer={};for(n in a)a.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(f[n]=a[n]);if(s.Buffer.prototype=a.prototype,f.from&&f.from!==Uint8Array.from||(f.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+(0,i.default)(e));if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(0,i.default)(e));return a(e,t,r)}),f.alloc||(f.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+(0,i.default)(e));if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=a(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!s.kStringMaxLength)try{s.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s}).call(this,r(6))},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(117).Reporter,o=r(69).EncoderBuffer,a=r(69).DecoderBuffer,s=r(19),f=["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"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(f);function c(e,t,r){var n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=c;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};d.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==(0,n.default)(e)||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),f.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,o=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var f=null;if(null!==r.explicit?f=r.explicit:null!==r.implicit?f=r.implicit:null!==r.tag&&(f=r.tag),null!==f||r.any){if(o=this._peekTag(e,f,r.any),e.isError(o))return o}else{var u=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(u)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){var c=this._decodeTag(e,r.explicit);if(e.isError(c))return c;e=c}var d=e.offset;if(null===r.use&&null===r.choice){var l;r.any&&(l=e.save());var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(l):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=e.save(),s=r.choice[o];try{var f=s._decode(e,t);if(e.isError(f))return!1;n={type:o,value:f},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},c.prototype._encodeValue=function(e,t,r){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new i);var a=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var s=null,f=!1;if(o.any)a=this._createEncoderBuffer(e);else if(o.choice)a=this._encodeChoice(e,t);else if(o.contains)s=this._getUse(o.contains,r)._encode(e,t),f=!0;else if(o.children)s=o.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var i=t.enterKey(r._baseState.key);if("object"!==(0,n.default)(e))return t.error("Child expected, but input is not object");var o=r._encode(e[r._baseState.key],t,e);return t.leaveKey(i),o}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),u))}else null!==o.use?a=this._getUse(o.use,r)._encode(e,t):(s=this._encodePrimitive(o.tag,e),f=!0);if(!o.any&&null===o.choice){var c=null!==o.implicit?o.implicit:o.tag,d=null===o.implicit?"universal":"context";null===c?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(a=this._encodeComposite(c,f,d,s))}return null!==o.explicit&&(a=this._encodeComposite(o.explicit,!1,"context",a)),a},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.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,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,r){"use strict";var n=r(4);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,r){"use strict";function n(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(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=n(t.tag)},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTransaction=void 0;var f=o(r(120)),u=r(28),c=r(53),d=function(){function e(e){this.cache={hash:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=f.Chain.Mainnet,this.DEFAULT_HARDFORK=f.Hardfork.Istanbul;var t=e.nonce,r=e.gasLimit,n=e.to,i=e.value,o=e.data,a=e.v,s=e.r,c=e.s,d=e.type;this._type=new u.BN((0,u.toBuffer)(d)).toNumber();var l=(0,u.toBuffer)(""===n?"0x":n),h=(0,u.toBuffer)(""===a?"0x":a),p=(0,u.toBuffer)(""===s?"0x":s),b=(0,u.toBuffer)(""===c?"0x":c);this.nonce=new u.BN((0,u.toBuffer)(""===t?"0x":t)),this.gasLimit=new u.BN((0,u.toBuffer)(""===r?"0x":r)),this.to=l.length>0?new u.Address(l):void 0,this.value=new u.BN((0,u.toBuffer)(""===i?"0x":i)),this.data=(0,u.toBuffer)(""===o?"0x":o),this.v=h.length>0?new u.BN(h):void 0,this.r=p.length>0?new u.BN(p):void 0,this.s=b.length>0?new u.BN(b):void 0,this._validateCannotExceedMaxInteger({nonce:this.nonce,gasLimit:this.gasLimit,value:this.value,r:this.r,s:this.s})}return Object.defineProperty(e.prototype,"transactionType",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),e.prototype.supports=function(e){return this.activeCapabilities.includes(e)},e.prototype.validate=function(e){void 0===e&&(e=!1);var t=[];return this.getBaseFee().gt(this.gasLimit)&&t.push("gasLimit is too low. given "+this.gasLimit+", need at least "+this.getBaseFee()),this.isSigned()&&!this.verifySignature()&&t.push("Invalid Signature"),e?t:0===t.length},e.prototype.getBaseFee=function(){var e=this.getDataFee().addn(this.common.param("gasPrices","tx"));return this.common.gteHardfork("homestead")&&this.toCreationAddress()&&e.iaddn(this.common.param("gasPrices","txCreation")),e},e.prototype.getDataFee=function(){for(var e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=0,n=0;n-1&&this.activeCapabilities.splice(f,1)}return s},e.prototype._getCommon=function(e,t){var r;if(t){var n=new u.BN((0,u.toBuffer)(t));if(e){if(!e.chainIdBN().eq(n))throw new Error("The chain ID does not match the chain ID of Common");return e.copy()}return f.default.isSupportedChainId(n)?new f.default({chain:n,hardfork:this.DEFAULT_HARDFORK}):f.default.forCustomChain(this.DEFAULT_CHAIN,{name:"custom-chain",networkId:n,chainId:n},this.DEFAULT_HARDFORK)}return null!==(r=null==e?void 0:e.copy())&&void 0!==r?r:new f.default({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})},e.prototype._validateCannotExceedMaxInteger=function(e,t){var r,n;void 0===t&&(t=53);try{for(var i=a(Object.entries(e)),o=i.next();!o.done;o=i.next()){var f=s(o.value,2),c=f[0],d=f[1];if(53===t){if(null==d?void 0:d.gt(u.MAX_INTEGER))throw new Error(c+" cannot exceed MAX_INTEGER, given "+d)}else{if(256!==t)throw new Error("unimplemented bits value");if(null==d?void 0:d.gte(u.TWO_POW256))throw new Error(c+" must be less than 2^256, given "+d)}}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e}();t.BaseTransaction=d},function(e,t,r){"use strict";(function(e){var n,i=r(0)(r(2)),o=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsensusAlgorithm=t.ConsensusType=t.Hardfork=t.Chain=t.CustomChain=void 0;var f,u,c=r(20),d=r(513),l=r(28),h=r(514),p=r(520),b=r(535);!function(e){e.PolygonMainnet="polygon-mainnet",e.PolygonMumbai="polygon-mumbai",e.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",e.xDaiChain="x-dai-chain"}(f=t.CustomChain||(t.CustomChain={})),function(e){e[e.Mainnet=1]="Mainnet",e[e.Ropsten=3]="Ropsten",e[e.Rinkeby=4]="Rinkeby",e[e.Kovan=42]="Kovan",e[e.Goerli=5]="Goerli"}(t.Chain||(t.Chain={})),function(e){e.Chainstart="chainstart",e.Homestead="homestead",e.Dao="dao",e.TangerineWhistle="tangerineWhistle",e.SpuriousDragon="spuriousDragon",e.Byzantium="byzantium",e.Constantinople="constantinople",e.Petersburg="petersburg",e.Istanbul="istanbul",e.MuirGlacier="muirGlacier",e.Berlin="berlin",e.London="london",e.Shanghai="shanghai",e.Merge="merge"}(u=t.Hardfork||(t.Hardfork={})),function(e){e.ProofOfStake="pos",e.ProofOfWork="pow",e.ProofOfAuthority="poa"}(t.ConsensusType||(t.ConsensusType={})),function(e){e.Ethash="ethash",e.Clique="clique",e.Casper="casper"}(t.ConsensusAlgorithm||(t.ConsensusAlgorithm={}));var y=function(t){function n(e){var r,n,i,o,a=t.call(this)||this;a._supportedHardforks=[],a._eips=[],a._customChains=null!==(i=e.customChains)&&void 0!==i?i:[],a._chainParams=a.setChain(e.chain),a.DEFAULT_HARDFORK=null!==(o=a._chainParams.defaultHardfork)&&void 0!==o?o:u.Istanbul;try{for(var f=s(a._chainParams.hardforks),c=f.next();!c.done;c=f.next()){var d=c.value;d.forkHash||(d.forkHash=a._calcForkHash(d.name))}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return a._hardfork=a.DEFAULT_HARDFORK,e.supportedHardforks&&(a._supportedHardforks=e.supportedHardforks),e.hardfork&&a.setHardfork(e.hardfork),e.eips&&a.setEIPs(e.eips),a}return o(n,t),n.custom=function(e,t){var r;void 0===t&&(t={});var i=null!==(r=t.baseChain)&&void 0!==r?r:"mainnet",o=a({},n._getChainParams(i));if(o.name="custom-chain","string"!=typeof e)return new n(a({chain:a(a({},o),e)},t));if(e===f.PolygonMainnet)return n.custom({name:f.PolygonMainnet,chainId:137,networkId:137});if(e===f.PolygonMumbai)return n.custom({name:f.PolygonMumbai,chainId:80001,networkId:80001});if(e===f.ArbitrumRinkebyTestnet)return n.custom({name:f.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611});if(e===f.xDaiChain)return n.custom({name:f.xDaiChain,chainId:100,networkId:100});throw new Error("Custom chain "+e+" not supported")},n.forCustomChain=function(e,t,r,i){var o=n._getChainParams(e);return new n({chain:a(a({},o),t),hardfork:r,supportedHardforks:i})},n.isSupportedChainId=function(e){var t=(0,h._getInitializedChains)();return Boolean(t.names[e.toString()])},n._getChainParams=function(e,t){var r=(0,h._getInitializedChains)(t);if("number"==typeof e||l.BN.isBN(e)){if(e=e.toString(),r.names[e])return r[r.names[e]];throw new Error("Chain with ID "+e+" not supported")}if(r[e])return r[e];throw new Error("Chain with name "+e+" not supported")},n.prototype.setChain=function(e){var t,r;if("number"==typeof e||"string"==typeof e||l.BN.isBN(e)){var o=void 0;o=this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0])?this._customChains.map((function(e){return e[0]})):this._customChains,this._chainParams=n._getChainParams(e,o)}else{if("object"!==(0,i.default)(e))throw new Error("Wrong input format");if(this._customChains.length>0)throw new Error("Chain must be a string, number, or BN when initialized with customChains passed in");try{for(var a=s(["networkId","genesis","hardforks","bootstrapNodes"]),f=a.next();!f.done;f=a.next()){var u=f.value;if(void 0===e[u])throw new Error("Missing required chain parameter: "+u)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}this._chainParams=e}return this._chainParams},n.prototype.setHardfork=function(e){var t,r;if(!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks");var n=!1;try{for(var i=s(p.hardforks),o=i.next();!o.done;o=i.next()){o.value[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}if(!n)throw new Error("Hardfork with name "+e+" not supported")},n.prototype.getHardforkByBlockNumber=function(e,t){var r,n;e=(0,l.toType)(e,l.TypeOutput.BN),t=t?(0,l.toType)(t,l.TypeOutput.BN):void 0;var i,o,a,f=u.Chainstart;try{for(var c=s(this.hardforks()),d=c.next();!d.done;d=c.next()){var h=d.value;if(null!==h.block)e.gte(new l.BN(h.block))&&(f=h.name),t&&h.td&&(t.gten(h.td)?i=h.name:o=a),a=h.name;else if(t&&h.td&&t.gten(h.td))return h.name}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(t){var p="block number: "+e+" (-> "+f+"), ";if(i&&!this.hardforkGteHardfork(f,i)){var b="HF determined by block number is lower than the minimum total difficulty HF";throw p+="total difficulty: "+t+" (-> "+i+")",new Error(b+": "+p)}if(o&&!this.hardforkGteHardfork(o,f)){b="Maximum HF determined by total difficulty is lower than the block number HF";throw p+="total difficulty: "+t+" (-> "+o+")",new Error(b+": "+p)}}return f},n.prototype.setHardforkByBlockNumber=function(e,t){var r=this.getHardforkByBlockNumber(e,t);return this.setHardfork(r),r},n.prototype._chooseHardfork=function(e,t){if(void 0===t&&(t=!0),e){if(t&&!this._isSupportedHardfork(e))throw new Error("Hardfork "+e+" not set as supported in supportedHardforks")}else e=this._hardfork;return e},n.prototype._getHardfork=function(e){var t,r,n=this.hardforks();try{for(var i=s(n),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.name===e)return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw new Error("Hardfork "+e+" not defined for chain "+this.chainName())},n.prototype._isSupportedHardfork=function(e){var t,r;if(!(this._supportedHardforks.length>0))return!0;try{for(var n=s(this._supportedHardforks),i=n.next();!i.done;i=n.next()){if(e===i.value)return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},n.prototype.setEIPs=function(e){var t,r,n=this;void 0===e&&(e=[]);var i=function(t){if(!(t in b.EIPs))throw new Error(t+" not supported");var r=o.gteHardfork(b.EIPs[t].minimumHardfork);if(!r)throw new Error(t+" cannot be activated on hardfork "+o.hardfork()+", minimumHardfork: "+r);b.EIPs[t].requiredEIPs&&b.EIPs[t].requiredEIPs.forEach((function(r){if(!e.includes(r)&&!n.isActivatedEIP(r))throw new Error(t+" requires EIP "+r+", but is not included in the EIP list")}))},o=this;try{for(var a=s(e),f=a.next();!f.done;f=a.next()){i(f.value)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}this._eips=e},n.prototype.param=function(e,t){var r,n,i=null;try{for(var o=s(this._eips),a=o.next();!a.done;a=o.next()){var f=a.value;if(null!==(i=this.paramByEIP(e,t,f)))return i}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this.paramByHardfork(e,t,this._hardfork)},n.prototype.paramByHardfork=function(e,t,r){var n,i,o,a;r=this._chooseHardfork(r);var f=null;try{for(var u=s(p.hardforks),c=u.next();!c.done;c=u.next()){var d=c.value;if("eips"in d[1]){var l=d[1].eips;try{for(var h=(o=void 0,s(l)),b=h.next();!b.done;b=h.next()){var y=b.value,m=this.paramByEIP(e,t,y);f=null!==m?m:f}}catch(e){o={error:e}}finally{try{b&&!b.done&&(a=h.return)&&a.call(h)}finally{if(o)throw o.error}}}else{if(!d[1][e])throw new Error("Topic "+e+" not defined");void 0!==d[1][e][t]&&(f=d[1][e][t].v)}if(d[0]===r)break}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return f},n.prototype.paramByEIP=function(e,t,r){if(!(r in b.EIPs))throw new Error(r+" not supported");var n=b.EIPs[r];if(!(e in n))throw new Error("Topic "+e+" not defined");return void 0===n[e][t]?null:n[e][t].v},n.prototype.paramByBlock=function(e,t,r){var n=this.activeHardforks(r),i=n[n.length-1].name;return this.paramByHardfork(e,t,i)},n.prototype.isActivatedEIP=function(e){var t,r;if(this.eips().includes(e))return!0;try{for(var n=s(p.hardforks),i=n.next();!i.done;i=n.next()){var o=i.value[1];if(this.gteHardfork(o.name)&&"eips"in o&&o.eips.includes(e))return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},n.prototype.hardforkIsActiveOnBlock=function(e,t,r){var n;void 0===r&&(r={}),t=(0,l.toType)(t,l.TypeOutput.BN);var i=null!==(n=r.onlySupported)&&void 0!==n&&n;e=this._chooseHardfork(e,i);var o=this.hardforkBlockBN(e);return!(!o||!t.gte(o))},n.prototype.activeOnBlock=function(e,t){return this.hardforkIsActiveOnBlock(null,e,t)},n.prototype.hardforkGteHardfork=function(e,t,r){var n,i;void 0===r&&(r={});var o,a=void 0!==r.onlyActive&&r.onlyActive;e=this._chooseHardfork(e,r.onlySupported),o=a?this.activeHardforks(null,r):this.hardforks();var f=-1,u=-1,c=0;try{for(var d=s(o),l=d.next();!l.done;l=d.next()){var h=l.value;h.name===e&&(f=c),h.name===t&&(u=c),c+=1}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return f>=u&&-1!==u},n.prototype.gteHardfork=function(e,t){return this.hardforkGteHardfork(null,e,t)},n.prototype.hardforkIsActiveOnChain=function(e,t){var r,n,i;void 0===t&&(t={});var o=null!==(i=t.onlySupported)&&void 0!==i&&i;e=this._chooseHardfork(e,o);try{for(var a=s(this.hardforks()),f=a.next();!f.done;f=a.next()){var u=f.value;if(u.name===e&&null!==u.block)return!0}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!1},n.prototype.activeHardforks=function(e,t){var r,n;void 0===t&&(t={});var i=[],o=this.hardforks();try{for(var a=s(o),f=a.next();!f.done;f=a.next()){var u=f.value;if(null!==u.block){if(null!=e&&e0)return r[r.length-1].name;throw new Error("No (supported) active hardfork found")},n.prototype.hardforkBlock=function(e){var t=this.hardforkBlockBN(e);return t?(0,l.toType)(t,l.TypeOutput.Number):null},n.prototype.hardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).block;return null==t?null:new l.BN(t)},n.prototype.hardforkTD=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e).td;return null==t?null:new l.BN(t)},n.prototype.isHardforkBlock=function(e,t){e=(0,l.toType)(e,l.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.hardforkBlockBN(t);return!!r&&r.eq(e)},n.prototype.nextHardforkBlock=function(e){var t=this.nextHardforkBlockBN(e);return null===t?null:(0,l.toType)(t,l.TypeOutput.Number)},n.prototype.nextHardforkBlockBN=function(e){e=this._chooseHardfork(e,!1);var t=this.hardforkBlockBN(e);return null===t?null:this.hardforks().reduce((function(e,r){var n=new l.BN(r.block);return n.gt(t)&&null===e?n:e}),null)},n.prototype.isNextHardforkBlock=function(e,t){e=(0,l.toType)(e,l.TypeOutput.BN),t=this._chooseHardfork(t,!1);var r=this.nextHardforkBlockBN(t);return null!==r&&r.eq(e)},n.prototype._calcForkHash=function(t){var r,n,i=e.from(this.genesis().hash.substr(2),"hex"),o=e.alloc(0),a=0;try{for(var f=s(this.hardforks()),u=f.next();!u.done;u=f.next()){var c=u.value,h=c.block;if(0!==h&&null!==h&&h!==a){var p=e.from(h.toString(16).padStart(16,"0"),"hex");o=e.concat([o,p])}if(c.name===t)break;null!==h&&(a=h)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}var b=e.concat([i,o]);return"0x"+(0,l.intToBuffer)((0,d.buf)(b)>>>0).toString("hex")},n.prototype.forkHash=function(e){e=this._chooseHardfork(e,!1);var t=this._getHardfork(e);if(null===t.block){throw new Error("No fork hash calculation possible for non-applied or future hardfork")}return void 0!==t.forkHash?t.forkHash:this._calcForkHash(e)},n.prototype.hardforkForForkHash=function(e){var t=this.hardforks().filter((function(t){return t.forkHash===e}));return t.length>=1?t[t.length-1]:null},n.prototype.genesis=function(){return this._chainParams.genesis},n.prototype.genesisState=function(){var e,t;switch(this.chainName()){case"mainnet":return r(!function(){var e=new Error("Cannot find module './genesisStates/mainnet.json'");throw e.code="MODULE_NOT_FOUND",e}());case"ropsten":return r(!function(){var e=new Error("Cannot find module './genesisStates/ropsten.json'");throw e.code="MODULE_NOT_FOUND",e}());case"rinkeby":return r(!function(){var e=new Error("Cannot find module './genesisStates/rinkeby.json'");throw e.code="MODULE_NOT_FOUND",e}());case"kovan":return r(!function(){var e=new Error("Cannot find module './genesisStates/kovan.json'");throw e.code="MODULE_NOT_FOUND",e}());case"goerli":return r(!function(){var e=new Error("Cannot find module './genesisStates/goerli.json'");throw e.code="MODULE_NOT_FOUND",e}())}if(this._customChains&&this._customChains.length>0&&Array.isArray(this._customChains[0]))try{for(var n=s(this._customChains),i=n.next();!i.done;i=n.next()){var o=i.value;if(o[0].name===this.chainName())return o[1]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return{}},n.prototype.hardforks=function(){return this._chainParams.hardforks},n.prototype.bootstrapNodes=function(){return this._chainParams.bootstrapNodes},n.prototype.dnsNetworks=function(){return this._chainParams.dnsNetworks},n.prototype.hardfork=function(){return this._hardfork},n.prototype.chainId=function(){return(0,l.toType)(this.chainIdBN(),l.TypeOutput.Number)},n.prototype.chainIdBN=function(){return new l.BN(this._chainParams.chainId)},n.prototype.chainName=function(){return this._chainParams.name},n.prototype.networkId=function(){return(0,l.toType)(this.networkIdBN(),l.TypeOutput.Number)},n.prototype.networkIdBN=function(){return new l.BN(this._chainParams.networkId)},n.prototype.eips=function(){return this._eips},n.prototype.consensusType=function(){var e,t,r,n=this.hardfork();try{for(var i=s(p.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.type),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.type},n.prototype.consensusAlgorithm=function(){var e,t,r,n=this.hardfork();try{for(var i=s(p.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus.algorithm),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return r||this._chainParams.consensus.algorithm},n.prototype.consensusConfig=function(){var e,t,r,n=this.hardfork();try{for(var i=s(p.hardforks),o=i.next();!o.done;o=i.next()){var a=o.value;if("consensus"in a[1]&&(r=a[1].consensus[a[1].consensus.algorithm]),a[0]===n)break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}if(r)return r;var f=this.consensusAlgorithm();return this._chainParams.consensus[f]},n.prototype.copy=function(){return Object.assign(Object.create(Object.getPrototypeOf(this)),this)},n}(c.EventEmitter);t.default=y}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n,i=t,o=r(122),a=r(240),s=r(22).assert;function f(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new f(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=f,u("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:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("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:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("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:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("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:o.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"]}),u("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:o.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"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(566)}catch(e){n=void 0}u("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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(e,t,r){"use strict";var n=t;n.utils=r(26),n.common=r(70),n.sha=r(560),n.ripemd=r(564),n.hmac=r(565),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){"use strict";(function(e){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160FromArray=t.ripemd160FromString=t.ripemd160=t.sha256FromArray=t.sha256FromString=t.sha256=t.keccakFromArray=t.keccakFromHexString=t.keccakFromString=t.keccak256=t.keccak=void 0;var a=r(576),s=r(592),f=o(r(87)),u=r(40),c=r(89);t.keccak=function(e,t){switch(void 0===t&&(t=256),(0,c.assertIsBuffer)(e),t){case 224:return(0,a.keccak224)(e);case 256:return(0,a.keccak256)(e);case 384:return(0,a.keccak384)(e);case 512:return(0,a.keccak512)(e);default:throw new Error("Invald algorithm: keccak"+t)}};t.keccak256=function(e){return(0,t.keccak)(e)};t.keccakFromString=function(r,n){void 0===n&&(n=256),(0,c.assertIsString)(r);var i=e.from(r,"utf8");return(0,t.keccak)(i,n)};t.keccakFromHexString=function(e,r){return void 0===r&&(r=256),(0,c.assertIsHexString)(e),(0,t.keccak)((0,u.toBuffer)(e),r)};t.keccakFromArray=function(e,r){return void 0===r&&(r=256),(0,c.assertIsArray)(e),(0,t.keccak)((0,u.toBuffer)(e),r)};var d=function(e){return e=(0,u.toBuffer)(e),s("sha256").update(e).digest()};t.sha256=function(e){return(0,c.assertIsBuffer)(e),d(e)};t.sha256FromString=function(e){return(0,c.assertIsString)(e),d(e)};t.sha256FromArray=function(e){return(0,c.assertIsArray)(e),d(e)};var l=function(e,t){e=(0,u.toBuffer)(e);var r=s("rmd160").update(e).digest();return!0===t?(0,u.setLengthLeft)(r,32):r};t.ripemd160=function(e,t){return(0,c.assertIsBuffer)(e),l(e,t)};t.ripemd160FromString=function(e,t){return(0,c.assertIsString)(e),l(e,t)};t.ripemd160FromArray=function(e,t){return(0,c.assertIsArray)(e),l(e,t)};t.rlphash=function(e){return(0,t.keccak)(f.encode(e))}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(t=e.exports=r(244)).Stream=t,t.Readable=t,t.Writable=r(248),t.Duplex=r(56),t.Transform=r(249),t.PassThrough=r(587),t.finished=r(125),t.pipeline=r(588)},function(e,t,r){"use strict";var n=r(55).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),b(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),d(n,e,n.depth)}function u(e,t){var r=f.styles[t];return r?"["+f.colors[r][0]+"m"+e+"["+f.colors[r][1]+"m":e}function c(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return v(i)||(i=d(e,i,n)),i}var o=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(b(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,r);if(o)return o;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),S(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(A(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var u,c="",_=!1,E=["{","}"];(p(r)&&(_=!0,E=["[","]"]),A(r))&&(c=" [Function"+(r.name?": "+r.name:"")+"]");return w(r)&&(c=" "+RegExp.prototype.toString.call(r)),k(r)&&(c=" "+Date.prototype.toUTCString.call(r)),S(r)&&(c=" "+l(r)),0!==a.length||_&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=_?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,c,E)):E[0]+c+E[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,f;if((f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),R(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(f.value)<0?(s=y(r)?d(e,f.value,null):d(e,f.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function y(e){return null===e}function m(e){return"number"==typeof e}function v(e){return"string"==typeof e}function g(e){return void 0===e}function w(e){return _(e)&&"[object RegExp]"===E(e)}function _(e){return"object"===(0,n.default)(e)&&null!==e}function k(e){return _(e)&&"[object Date]"===E(e)}function S(e){return _(e)&&("[object Error]"===E(e)||e instanceof Error)}function A(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(g(a)&&(a=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(a)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},t.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=b,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=v,t.isSymbol=function(e){return"symbol"===(0,n.default)(e)},t.isUndefined=g,t.isRegExp=w,t.isObject=_,t.isDate=k,t.isError=S,t.isFunction=A,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(0,n.default)(e)||void 0===e},t.isBuffer=r(257);var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),P[e.getMonth()],t].join(" ")}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))},t.inherits=r(90),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(T&&e[T]){var t;if("function"!=typeof(t=e[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1;return!0},y=function(e){var t="";e=(e=(e=(e=(e=f.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x"+t.join("")},isHex:_,isHexStrict:w,stripHexPrefix:function(e){return 0!==e&&_(e)?e.replace(/^(-)?0x/i,"$1"):e},leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+h(e).toTwos(256).toString(16,64)},sha3:S,sha3Raw:function(e){return null===(e=S(e))?k:e},toNumber:function(e){return"number"==typeof e?e:m(g(e))}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,r){"use strict";var n=r(132);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},s=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var f=s(r(41)),u=s(r(3)),c=o(r(71)),d=r(135),l=r(42),h=r(133),p=r(34),b=r(94),y=r(74),m=r(102),v=function(){function e(e,t,r,n){void 0===e&&(e=new u.default(0)),void 0===t&&(t=new u.default(0)),void 0===r&&(r=h.KECCAK256_RLP),void 0===n&&(n=h.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,i=t.stateRoot,o=t.codeHash;return new e(r?new u.default((0,p.toBuffer)(r)):void 0,n?new u.default((0,p.toBuffer)(n)):void 0,i?(0,p.toBuffer)(i):void 0,o?(0,p.toBuffer)(o):void 0)},e.fromRlpSerializedAccount=function(e){var t=c.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=a(t,4),n=r[0],i=r[1],o=r[2],s=r[3];return new e(new u.default(n),new u.default(i),o,s)},e.prototype._validate=function(){if(this.nonce.lt(new u.default(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new u.default(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,m.bnToUnpaddedBuffer)(this.nonce),(0,m.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return c.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(h.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(h.KECCAK256_NULL)},e}();t.Account=v;t.isValidAddress=function(e){try{(0,y.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.toChecksumAddress=function(e,t){(0,y.assertIsHexString)(e);var r=(0,l.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,m.toType)(t,m.TypeOutput.BN).toString()+"0x");for(var i=(0,b.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a=8?o+=r[a].toUpperCase():o+=r[a];return o};t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e};t.generateAddress=function(t,r){(0,y.assertIsBuffer)(t),(0,y.assertIsBuffer)(r);var n=new u.default(r);return n.isZero()?(0,b.rlphash)([t,null]).slice(-20):(0,b.rlphash)([t,e.from(n.toArray())]).slice(-20)};t.generateAddress2=function(t,r,n){return(0,y.assertIsBuffer)(t),(0,y.assertIsBuffer)(r),(0,y.assertIsBuffer)(n),(0,f.default)(20===t.length),(0,f.default)(32===r.length),(0,b.keccak256)(e.concat([e.from("ff","hex"),t,r,(0,b.keccak256)(n)])).slice(-20)};t.isValidPrivate=function(e){return(0,d.privateKeyVerify)(e)};t.isValidPublic=function(t,r){return void 0===r&&(r=!1),(0,y.assertIsBuffer)(t),64===t.length?(0,d.publicKeyVerify)(e.concat([e.from([4]),t])):!!r&&(0,d.publicKeyVerify)(t)};t.pubToAddress=function(t,r){return void 0===r&&(r=!1),(0,y.assertIsBuffer)(t),r&&64!==t.length&&(t=e.from((0,d.publicKeyConvert)(t,!1).slice(1))),(0,f.default)(64===t.length),(0,b.keccak)(t).slice(-20)},t.publicToAddress=t.pubToAddress;t.privateToPublic=function(t){return(0,y.assertIsBuffer)(t),e.from((0,d.publicKeyCreate)(t,!1)).slice(1)};t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.importPublic=function(t){return(0,y.assertIsBuffer)(t),64!==t.length&&(t=e.from((0,d.publicKeyConvert)(t,!1).slice(1))),t};t.zeroAddress=function(){var e=(0,p.zeros)(20);return(0,p.bufferToHex)(e)};t.isZeroAddress=function(e){try{(0,y.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{f(n.next(e))}catch(e){o(e)}}function s(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},i=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n=t;n.base=r(72),n.short=r(274),n.mont=r(275),n.edwards=r(276)},function(e,t,r){"use strict";var n=r(25).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(25),i=r(60),o=r(139),a=r(19),s=n.sum32,f=n.sum32_4,u=n.sum32_5,c=o.ch32,d=o.maj32,l=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,y=i.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 v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(v,y),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?k(e,new _):P(e,a,t,!0);else if(a.ended)k(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?P(e,a,t,!1):M(e,a)):P(e,a,t,!1)}else n||(a.reading=!1,M(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function j(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function D(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):R(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){k(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:y;function s(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",l),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function f(){u("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var d=!1;function l(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==D(i.pipes,e))&&!d&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),y(),e.removeListener("error",h),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),y()}function b(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?R(this):i.reading||n.nextTick(C,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(7),r(6))},function(e,t,r){"use strict";e.exports=c;var n=r(43).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,f=r(44);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){"use strict";(function(t,n){var i;e.exports=E,E.ReadableState=A;r(20).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=r(153),s=r(1).Buffer,f=t.Uint8Array||function(){};var u,c=r(308);u=c&&c.debuglog?c.debuglog("stream"):function(){};var d,l,h,p=r(309),b=r(154),y=r(155).getHighWaterMark,m=r(46).codes,v=m.ERR_INVALID_ARG_TYPE,g=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(4)(E,a);var k=b.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(e,t,n){i=i||r(47),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(21).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function E(e){if(i=i||r(47),!(this instanceof E))return new E(e);var t=this instanceof i;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function x(e,t,r,n,i){u("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?R(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}(e,a);else if(i||(o=function(e,t){var r;n=t,s.isBuffer(n)||n instanceof f||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(a,t)),o)k(e,o);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?k(e,new _):P(e,a,t,!0);else if(a.ended)k(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?P(e,a,t,!1):M(e,a)):P(e,a,t,!1)}else n||(a.reading=!1,M(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function j(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function D(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):R(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){k(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:y;function s(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",l),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function f(){u("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var d=!1;function l(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==D(i.pipes,e))&&!d&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),y(),e.removeListener("error",h),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),y()}function b(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?R(this):i.reading||n.nextTick(C,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(7),r(6))},function(e,t,r){"use strict";e.exports=c;var n=r(46).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,f=r(47);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,y=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+h(r[m-15])+r[m-16];for(var v=0;v<64;++v){var g=y+l(f)+u(f,p,b)+a[v]+r[v]|0,w=d(n)+c(n,i,o)|0;y=b,b=p,p=f,f=s+g|0,s=o,o=i,i=n,n=g+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=y+this._h|0},f.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=f},function(e,t,r){"use strict";var n=r(4),i=r(48),o=r(5).Buffer,a=[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],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,f=0|this._fh,v=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,k=0|this._cl,S=0|this._dl,A=0|this._el,E=0|this._fl,x=0|this._gl,P=0|this._hl,O=0;O<32;O+=2)t[O]=e.readInt32BE(4*O),t[O+1]=e.readInt32BE(4*O+4);for(;O<160;O+=2){var R=t[O-30],T=t[O-30+1],M=h(R,T),I=p(T,R),B=b(R=t[O-4],T=t[O-4+1]),C=y(T,R),j=t[O-14],U=t[O-14+1],N=t[O-32],L=t[O-32+1],F=I+U|0,D=M+j+m(F,I)|0;D=(D=D+B+m(F=F+C|0,C)|0)+N+m(F=F+L|0,L)|0,t[O]=D,t[O+1]=F}for(var q=0;q<160;q+=2){D=t[q],F=t[q+1];var z=c(r,n,i),H=c(w,_,k),K=d(r,w),G=d(w,r),V=l(s,A),W=l(A,s),J=a[q],X=a[q+1],Z=u(s,f,v),Y=u(A,E,x),$=P+W|0,Q=g+V+m($,P)|0;Q=(Q=(Q=Q+Z+m($=$+Y|0,Y)|0)+J+m($=$+X|0,X)|0)+D+m($=$+F|0,F)|0;var ee=G+H|0,te=K+z+m(ee,G)|0;g=v,P=x,v=f,x=E,f=s,E=A,s=o+Q+m(A=S+$|0,S)|0,o=i,S=k,i=n,k=_,n=r,_=w,r=Q+te+m(w=$+ee|0,$)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+k|0,this._dl=this._dl+S|0,this._el=this._el+A|0,this._fl=this._fl+E|0,this._gl=this._gl+x|0,this._hl=this._hl+P|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,k)|0,this._dh=this._dh+o+m(this._dl,S)|0,this._eh=this._eh+s+m(this._el,A)|0,this._fh=this._fh+f+m(this._fl,E)|0,this._gh=this._gh+v+m(this._gl,x)|0,this._hh=this._hh+g+m(this._hl,P)|0},f.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=f},function(e,t,r){"use strict";e.exports=i;var n=r(20).EventEmitter;function i(){n.call(this)}r(4)(i,n),i.Readable=r(61),i.Writable=r(324),i.Duplex=r(325),i.Transform=r(326),i.PassThrough=r(327),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",f));var a=!1;function s(){a||(a=!0,e.end())}function f(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",f),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},function(e,t,r){"use strict";(function(t,n){var i=r(76);e.exports=g;var o,a=r(130);g.ReadableState=v;r(20).EventEmitter;var s=function(e,t){return e.listeners(t).length},f=r(162),u=r(100).Buffer,c=t.Uint8Array||function(){};var d=Object.create(r(62));d.inherits=r(4);var l=r(319),h=void 0;h=l&&l.debuglog?l.debuglog("stream"):function(){};var p,b=r(320),y=r(163);d.inherits(g,f);var m=["error","close","destroy","pause","resume"];function v(e,t){e=e||{};var n=t instanceof(o=o||r(35));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(21).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function g(e){if(o=o||r(35),!(this instanceof g))return new g(e);this._readableState=new v(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this)}function w(e,t,r,n,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,S(e)}(e,a)):(i||(o=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):E(e,a)):_(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){h("emit readable"),e.emit("readable"),R(e)}function E(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(I,t,e))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):S(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&M(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&M(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var f=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:g;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",m),e.removeListener("finish",v),e.removeListener("drain",d),e.removeListener("error",y),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",g),r.removeListener("data",b),l=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function c(){h("onend"),e.end()}o.endEmitted?i.nextTick(f):r.once("end",f),e.on("unpipe",u);var d=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",d);var l=!1;var p=!1;function b(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!l&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function y(t){h("onerror",t),g(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",v),g()}function v(){h("onfinish"),e.removeListener("close",m),g()}function g(){h("unpipe"),r.unpipe(e)}return r.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",m),e.once("finish",v),e.emit("pipe",r),o.flowing||(h("pipe resume"),r.resume()),e},g.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(322),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||void 0,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||void 0}).call(this,r(7))},function(e,t,r){"use strict";e.exports=a;var n=r(35),i=Object.create(r(62));function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=t&&n<=r?n-t+10:e})).join("")},u=function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97},c=function(){function e(t){(0,i.default)(this,e),this._iban=t}return(0,o.default)(e,[{key:"isValid",value:function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===u(f(this._iban))}},{key:"isDirect",value:function(){return 34===this._iban.length||35===this._iban.length}},{key:"isIndirect",value:function(){return 20===this._iban.length}},{key:"checksum",value:function(){return this._iban.slice(2,4)}},{key:"institution",value:function(){return this.isIndirect()?this._iban.slice(7,11):""}},{key:"client",value:function(){return this.isIndirect()?this._iban.slice(11):""}},{key:"toAddress",value:function(){if(this.isDirect()){var e=this._iban.slice(4),t=new s(e,36);return a.toChecksumAddress(t.toString(16,20))}return""}},{key:"toString",value:function(){return this._iban}}],[{key:"toAddress",value:function(t){if(!(t=new e(t)).isDirect())throw new Error("IBAN is indirect and can't be converted");return t.toAddress()}},{key:"toIban",value:function(t){return e.fromAddress(t).toString()}},{key:"fromAddress",value:function(t){if(!a.isAddress(t))throw new Error("Provided address is not a valid address: "+t);t=t.replace("0x","").replace("0X","");var r=function(e,t){for(var r=e;r.length<2*t;)r="0"+r;return r}(new s(t,16).toString(36),15);return e.fromBban(r.toUpperCase())}},{key:"fromBban",value:function(t){return new e("XE"+("0"+(98-u(f("XE00"+t)))).slice(-2)+t)}},{key:"createIndirect",value:function(t){return e.fromBban("ETH"+t.institution+t.identifier)}},{key:"isValid",value:function(t){return new e(t).isValid()}}]),e}();e.exports=c},function(e,t,r){"use strict";var n={messageId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),toPayload:function(e,t){if(!e)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(t)+'"!');return n.messageId===Number.MAX_SAFE_INTEGER?n.messageId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER):n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:e,params:t||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!(!e||e.error||"2.0"!==e.jsonrpc||"number"!=typeof e.id&&"string"!=typeof e.id||void 0===e.result)}},toBatchPayload:function(e){return e.map((function(e){return n.toPayload(e.method,e.params)}))}};e.exports=n},function(e,t,r){"use strict";(function(e,n){var i,o=r(0)(r(2));!function(a){var s="object"==(0,o.default)(t)&&t&&!t.nodeType&&t,f="object"==(0,o.default)(e)&&e&&!e.nodeType&&e,u="object"==(void 0===n?"undefined":(0,o.default)(n))&&n;u.global!==u&&u.window!==u&&u.self!==u||(a=u);var c,d,l=2147483647,h=/^xn--/,p=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,v=String.fromCharCode;function g(e){throw new RangeError(y[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function _(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(b,".")).split("."),t).join(".")}function k(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=v((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=v(e)})).join("")}function A(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,r){var n=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;n+=36)e=m(e/35);return m(n+36*e/(e+38))}function x(e){var t,r,n,i,o,a,s,f,u,c,d,h=[],p=e.length,b=0,y=128,v=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&g("not-basic"),h.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=p&&g("invalid-input"),((f=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||f>m((l-b)/a))&&g("overflow"),b+=f*a,!(f<(u=s<=v?1:s>=v+26?26:s-v));s+=36)a>m(l/(c=36-u))&&g("overflow"),a*=c;v=E(b-o,t=h.length+1,0==o),m(b/t)>l-y&&g("overflow"),y+=m(b/t),b%=t,h.splice(b++,0,y)}return S(h)}function P(e){var t,r,n,i,o,a,s,f,u,c,d,h,p,b,y,w=[];for(h=(e=k(e)).length,t=128,r=0,o=72,a=0;a=t&&dm((l-r)/(p=n+1))&&g("overflow"),r+=(s-t)*p,t=s,a=0;al&&g("overflow"),d==t){for(f=r,u=36;!(f<(c=u<=o?1:u>=o+26?26:u-o));u+=36)y=f-c,b=36-c,w.push(v(A(c+y%b,0))),f=m(y/b);w.push(v(A(f,0))),o=E(r,p,n==i),r=0,++n}++r,++t}return w.join("")}if(c={version:"1.4.1",ucs2:{decode:k,encode:S},decode:x,encode:P,toASCII:function(e){return _(e,(function(e){return p.test(e)?"xn--"+P(e):e}))},toUnicode:function(e){return _(e,(function(e){return h.test(e)?x(e.slice(4).toLowerCase()):e}))}},"object"==(0,o.default)(r(63))&&r(63))void 0===(i=function(){return c}.call(t,r,t,e))||(e.exports=i);else if(s&&f)if(e.exports==s)f.exports=c;else for(d in c)c.hasOwnProperty(d)&&(s[d]=c[d]);else a.punycode=c}(void 0)}).call(this,r(27)(e),r(7))},function(e,t,r){"use strict";(function(e){var n=r(349),i=r(171),o=r(172),a=r(351),s=r(77),f=t;f.request=function(t,r){t="string"==typeof t?s.parse(t):o(t);var i=-1===e.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||i,f=t.hostname||t.host,u=t.port,c=t.path||"/";f&&-1!==f.indexOf(":")&&(f="["+f+"]"),t.url=(f?a+"//"+f:"")+(u?":"+u:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new n(t);return r&&d.on("response",r),d},f.get=function(e,t){var r=f.request(e,t);return r.end(),r},f.ClientRequest=n,f.IncomingMessage=i.IncomingMessage,f.Agent=function(){},f.Agent.defaultMaxSockets=4,f.globalAgent=new f.Agent,f.STATUS_CODES=a,f.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(7))},function(e,t,r){"use strict";(function(e){t.fetch=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var r;function n(){if(void 0!==r)return r;if(e.XMLHttpRequest){r=new e.XMLHttpRequest;try{r.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function i(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var o=void 0!==e.ArrayBuffer,a=o&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||o&&i("arraybuffer"),t.msstream=!t.fetch&&a&&i("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o&&i("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!n()&&s(n().overrideMimeType),t.vbArray=s(e.VBArray),r=null}).call(this,r(7))},function(e,t,r){"use strict";(function(e,n,i){var o=r(170),a=r(90),s=r(61),f=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=t.IncomingMessage=function(t,r,a,f){var u=this;if(s.Readable.call(u),u._mode=a,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){e.nextTick((function(){u.emit("close")}))})),"fetch"===a){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var c=new WritableStream({write:function(e){return new Promise((function(t,r){u._destroyed?r():u.push(new i(e))?t():u._resumeFetch=t}))},close:function(){n.clearTimeout(f),u._destroyed||u.push(null)},abort:function(e){u._destroyed||u.emit("error",e)}});try{return void r.body.pipeTo(c).catch((function(e){n.clearTimeout(f),u._destroyed||u.emit("error",e)}))}catch(e){}}var d=r.body.getReader();!function e(){d.read().then((function(t){if(!u._destroyed){if(t.done)return n.clearTimeout(f),void u.push(null);u.push(new i(t.value)),e()}})).catch((function(e){n.clearTimeout(f),u._destroyed||u.emit("error",e)}))}()}else{if(u._xhr=t,u._pos=0,u.url=t.responseURL,u.statusCode=t.status,u.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var l=u.rawHeaders["mime-type"];if(l){var h=l.match(/;\s*charset=([^;])(;|$)/);h&&(u._charset=h[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};a(u,s.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==f.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new i(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var o=r.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new i(o.length),s=0;se._pos&&(e.push(new i(new Uint8Array(u.result.slice(e._pos)))),e._pos=u.result.byteLength)},u.onload=function(){e.push(null)},u.readAsArrayBuffer(r)}e._xhr.readyState===f.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,r(6),r(7),r(1).Buffer)},function(e,t,r){"use strict";e.exports=function(){for(var e={},t=0;t0&&(10===arguments[0]?h||(h=!0,d.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?d.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.Logger.errors.UNEXPECTED_ARGUMENT,{}):d.throwError("BigNumber.toString does not accept parameters",f.Logger.errors.UNEXPECTED_ARGUMENT,{})),m(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(l,b(t)):t.match(/^-?[0-9]+$/)?new e(l,b(new c(t))):d.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=9007199254740991||t<=-9007199254740991)&&v("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"==typeof r)return e.from(r.toString());if((0,s.isBytes)(r))return e.from((0,s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"==typeof i&&((0,s.isHexString)(i)||"-"===i[0]&&(0,s.isHexString)(i.substring(1))))return e.from(i)}return d.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function b(e){if("string"!=typeof e)return b(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&d.throwArgumentError("invalid hex","value",e),"0x00"===(e=b(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function y(e){return p.from(b(e))}function m(e){var t=p.from(e).toHexString();return"-"===t[0]?new c("-"+t.substring(3),16):new c(t.substring(2),16)}function v(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),d.throwError(e,f.Logger.errors.NUMERIC_FAULT,n)}t.BigNumber=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="bignumber/5.6.2"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e){return"0x"+i.default.keccak_256((0,o.arrayify)(e))};var i=n(r(366)),o=r(37)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){var t=(0,n.arrayify)(e),r=c(t,0);r.consumed!==t.length&&a.throwArgumentError("invalid rlp data","data",e);return r.result},t.encode=function(e){return(0,n.hexlify)(function e(t){if(Array.isArray(t)){var r=[];if(t.forEach((function(t){r=r.concat(e(t))})),r.length<=55)return r.unshift(192+r.length),r;var i=s(r.length);return i.unshift(247+i.length),i.concat(r)}(0,n.isBytesLike)(t)||a.throwArgumentError("RLP object must be BytesLike","object",t);var o=Array.prototype.slice.call((0,n.arrayify)(t));if(1===o.length&&o[0]<=127)return o;if(o.length<=55)return o.unshift(128+o.length),o;var f=s(o.length);return f.unshift(183+f.length),f.concat(o)}(e))};var n=r(37),i=r(32),o=r(367),a=new i.Logger(o.version);function s(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function f(e,t,r){for(var n=0,i=0;it+1+n&&a.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function c(e,t){if(0===e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&a.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var o=f(e,t+1,r);return t+1+r+o>e.length&&a.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+o)}if(e[t]>=192){var s=e[t]-192;return t+1+s>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,s)}if(e[t]>=184){var c=e[t]-183;t+1+c>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var d=f(e,t+1,c);return t+1+c+d>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+c+d,result:(0,n.hexlify)(e.slice(t+1+c,t+1+c+d))}}if(e[t]>=128){var l=e[t]-128;return t+1+l>e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+l,result:(0,n.hexlify)(e.slice(t+1,t+1+l))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.Description=void 0,t.checkProperties=function(e,t){e&&"object"===(0,a.default)(e)||c.throwArgumentError("invalid object","object",e);Object.keys(e).forEach((function(r){t[r]||c.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))},t.deepCopy=p,t.defineReadOnly=d,t.getStatic=function(e,t){for(var r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!==(0,a.default)(e.prototype))break;e=Object.getPrototypeOf(e.prototype).constructor}return null},t.resolveProperties=function(e){return u(this,void 0,void 0,i.default.mark((function t(){var r,n;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(r);case 3:return n=t.sent,t.abrupt("return",n.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))},t.shallowCopy=function(e){var t={};for(var r in e)t[r]=e[r];return t};var i=n(r(49)),o=n(r(8)),a=n(r(2)),s=r(32),f=r(374),u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{f(n.next(e))}catch(e){o(e)}}function s(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},c=new s.Logger(f.version);function d(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}var l={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function h(e){if(function e(t){if(null==t||l[(0,a.default)(t)])return!0;if(Array.isArray(t)||"object"===(0,a.default)(t)){if(!Object.isFrozen(t))return!1;for(var r=Object.keys(t),n=0;n0&&e.topics.length!==n+1&&(t={anonymous:!0,inputs:[]})}var i=t.anonymous?e.topics:e.topics.slice(1);return r.returnValues=b.decodeLog(t.inputs,e.data,i),delete r.returnValues.__length__,r.event=t.name,r.signature=t.anonymous||!e.topics[0]?null:e.topics[0],r.raw={data:r.data,topics:r.topics},delete r.data,delete r.topics,r},y.prototype._encodeMethodABI=function(){var e=this._method.signature,t=this.arguments||[],r=!1,n=this._parent.options.jsonInterface.filter((function(t){return"constructor"===e&&t.type===e||(t.signature===e||t.signature===e.replace("0x","")||t.name===e)&&"function"===t.type})).map((function(e){var n=Array.isArray(e.inputs)?e.inputs.length:0;if(n!==t.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+n+" arguments.");return"function"===e.type&&(r=e.signature),Array.isArray(e.inputs)?e.inputs:[]})).map((function(e){return b.encodeParameters(e,t).replace("0x","")}))[0]||"";if("constructor"===e){if(!this._deployData)throw new Error("The contract has no contract data option set. This is necessary to append the constructor parameters.");return this._deployData.startsWith("0x")||(this._deployData="0x"+this._deployData),this._deployData+n}var i=r?r+n:n;if(!i)throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".');return i},y.prototype._decodeMethodReturn=function(e,t){if(!t)return null;t=t.length>=2?t.slice(2):t;var r=b.decodeParameters(e,t);return 1===r.__length__?r[0]:(delete r.__length__,r)},y.prototype.deploy=function(e,t){if((e=e||{}).arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data){if("function"==typeof t)return t(h.ContractMissingDeployDataError());throw h.ContractMissingDeployDataError()}var r=this.options.jsonInterface.find((function(e){return"constructor"===e.type}))||{};return r.signature="constructor",this._createTxObject.apply({method:r,parent:this,deployData:e.data,_ethAccounts:this.constructor._ethAccounts},e.arguments)},y.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),r="object"===(!!e[e.length-1]&&(0,o.default)(e[e.length-1]))?e.pop():{},n="string"==typeof e[0]?e[0]:"allevents",i="allevents"===n.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find((function(e){return"event"===e.type&&(e.name===n||e.signature==="0x"+n.replace("0x",""))}));if(!i)throw h.ContractEventDoesNotExistError(n);if(!c.isAddress(this.options.address))throw h.ContractNoAddressDefinedError();return{params:this._encodeEventABI(i,r),event:i,callback:t}},y.prototype.clone=function(){return new this.constructor(this.options.jsonInterface,this.options.address,this.options)},y.prototype.once=function(e,t,r){var n=Array.prototype.slice.call(arguments);if(!(r=this._getCallback(n)))throw h.ContractOnceRequiresCallbackError();t&&delete t.fromBlock,this._on(e,t,(function(e,t,n){n.unsubscribe(),"function"==typeof r&&r(e,t,n)}))},y.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);e.params&&e.params.toBlock&&(delete e.params.toBlock,console.warn("Invalid option: toBlock. Use getPastEvents for specific range.")),this._checkListener("newListener",e.event.name),this._checkListener("removeListener",e.event.name);var t=new d({subscription:{params:1,inputFormatter:[l.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t},y.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new u({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[l.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var r=t.buildCall();return t=null,r(e.params,e.callback)},y.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),t.createAccessList=this.parent._executeMethod.bind(t,"createAccessList"),e&&this.method.inputs&&e.length!==this.method.inputs.length){if(this.nextMethod)return this.nextMethod.apply(null,e);throw h.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name)}return t.arguments=e||[],t._method=this.method,t._parent=this.parent,t._ethAccounts=this.parent.constructor._ethAccounts||this._ethAccounts,this.deployData&&(t._deployData=this.deployData),t},y.prototype._processExecuteArguments=function(e,t){var r={};if(r.type=e.shift(),r.callback=this._parent._getCallback(e),"call"!==r.type||!0===e[e.length-1]||"string"!=typeof e[e.length-1]&&!isFinite(e[e.length-1])||(r.defaultBlock=e.pop()),r.options="object"===(!!e[e.length-1]&&(0,o.default)(e[e.length-1]))?e.pop():{},r.generateRequest=!0===e[e.length-1]&&e.pop(),r.options=this._parent._getOrSetDefaultOptions(r.options),r.options.data=this.encodeABI(),!this._deployData&&!c.isAddress(this._parent.options.address))throw h.ContractNoAddressDefinedError();return this._deployData||(r.options.to=this._parent.options.address),r.options.data?r:c._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,r.callback)},y.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),r),r=p("send"!==t.type),n=e.constructor._ethAccounts||e._ethAccounts;if(t.generateRequest){var i={params:[l.inputCallFormatter.call(this._parent,t.options)],callback:t.callback};return"call"===t.type?(i.params.push(l.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)),i.method="eth_call",i.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):i.method="eth_sendTransaction",i}switch(t.type){case"createAccessList":if(!c.isAddress(t.options.from))return c._fireError(h.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);var o=new u({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[l.inputTransactionFormatter,l.inputDefaultBlockNumberFormatter],requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction();return o(t.options,t.callback);case"estimate":var a=new u({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[l.inputCallFormatter],outputFormatter:c.hexToNumber,requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction();return a(t.options,t.callback);case"call":var s=new u({name:"call",call:"eth_call",params:2,inputFormatter:[l.inputCallFormatter,l.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:n,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,handleRevert:e._parent.handleRevert,abiCoder:b}).createFunction();return s(t.options,t.defaultBlock,t.callback);case"send":if(!c.isAddress(t.options.from))return c._fireError(h.ContractNoFromAddressDefinedError(),r.eventEmitter,r.reject,t.callback);if("boolean"==typeof this._method.payable&&!this._method.payable&&t.options.value&&t.options.value>0)return c._fireError(new Error("Can not send value to non-payable contract method or constructor"),r.eventEmitter,r.reject,t.callback);var f={receiptFormatter:function(t){if(Array.isArray(t.logs)){var r=t.logs.map((function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)}));t.events={};var n=0;r.forEach((function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[n]=e,n++)})),delete t.logs}return t},contractDeployFormatter:function(t){var r=e._parent.clone();return r.options.address=t.contractAddress,r}},d=new u({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[l.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:e.constructor._ethAccounts||e._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,transactionBlockTimeout:e._parent.transactionBlockTimeout,transactionConfirmationBlocks:e._parent.transactionConfirmationBlocks,transactionPollingTimeout:e._parent.transactionPollingTimeout,transactionPollingInterval:e._parent.transactionPollingInterval,defaultCommon:e._parent.defaultCommon,defaultChain:e._parent.defaultChain,defaultHardfork:e._parent.defaultHardfork,handleRevert:e._parent.handleRevert,extraFormatters:f,abiCoder:b}).createFunction();return d(t.options,t.callback);default:throw new Error('Method "'+t.type+'" not implemented.')}},e.exports=y},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(1).Buffer,o=r(17),a=r(181).AbiCoder,s=r(181).ParamType,f=new a((function(e,t){return!e.match(/^u?int/)||Array.isArray(t)||t&&"object"===(0,n.default)(t)&&"BN"===t.constructor.name?t:t.toString()}));function u(){}var c=function(){};c.prototype.encodeFunctionSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e).slice(0,10)},c.prototype.encodeEventSignature=function(e){return("function"==typeof e||"object"===(0,n.default)(e)&&e)&&(e=o._jsonInterfaceMethodToString(e)),o.sha3(e)},c.prototype.encodeParameter=function(e,t){return this.encodeParameters([e],[t])},c.prototype.encodeParameters=function(e,t){var r=this;return e=r.mapTypes(e),t=t.map((function(t,i){var o=e[i];if("object"===(0,n.default)(o)&&o.type&&(o=o.type),t=r.formatParam(o,t),"string"==typeof o&&o.includes("tuple")){!function e(t,n){if("array"===t.name){if(!t.type.match(/\[(\d+)\]/))return n.map((function(r){return e(f._getCoder(s.from(t.type.replace("[]",""))),r)}));var i=parseInt(t.type.match(/\[(\d+)\]/)[1]);if(n.length!==i)throw new Error("Array length does not matches with the given input");return n.map((function(r){return e(f._getCoder(s.from(t.type.replace(/\[\d+\]/,""))),r)}))}t.coders.forEach((function(t,i){"tuple"===t.name?e(t,n[i]):n[i]=r.formatParam(t.name,n[i])}))}(f._getCoder(s.from(o)),t)}return t})),f.encode(e,t)},c.prototype.mapTypes=function(e){var t=this,r=[];return e.forEach((function(e){if("object"===(0,n.default)(e)&&"function"===e.type&&(e=Object.assign({},e,{type:"bytes24"})),t.isSimplifiedStructFormat(e)){var i=Object.keys(e)[0];r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))}else r.push(e)})),r},c.prototype.isSimplifiedStructFormat=function(e){return"object"===(0,n.default)(e)&&void 0===e.components&&void 0===e.name},c.prototype.mapStructNameAndType=function(e){var t="tuple";return e.indexOf("[]")>-1&&(t="tuple[]",e=e.slice(0,-2)),{type:t,name:e}},c.prototype.mapStructToCoderFormat=function(e){var t=this,r=[];return Object.keys(e).forEach((function(i){"object"!==(0,n.default)(e[i])?r.push({name:i,type:e[i]}):r.push(Object.assign(t.mapStructNameAndType(i),{components:t.mapStructToCoderFormat(e[i])}))})),r},c.prototype.formatParam=function(e,t){var r=this,n=new RegExp(/^bytes([0-9]*)$/),a=new RegExp(/^bytes([0-9]*)\[\]$/),s=new RegExp(/^(u?int)([0-9]*)$/),f=new RegExp(/^(u?int)([0-9]*)\[\]$/);if(o.isBN(t)||o.isBigNumber(t))return t.toString(10);if(e.match(a)||e.match(f))return t.map((function(t){return r.formatParam(e.replace("[]",""),t)}));var u=e.match(s);if(u){var c=parseInt(u[2]||"256");c/80&&(!t||"0x"===t||"0X"===t))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");var i=f.decode(this.mapTypes(e),"0x"+t.replace(/0x/i,""),r),o=new u;return o.__length__=0,e.forEach((function(e,t){var r=i[o.__length__],a="object"===(0,n.default)(e)&&e.type&&"string"===e.type;r="0x"!==r||a||"string"==typeof e&&"string"===e?r:null,o[t]=r,("function"==typeof e||e&&"object"===(0,n.default)(e))&&e.name&&(o[e.name]=r),o.__length__++})),o},c.prototype.decodeLog=function(e,t,r){var n=this;r=Array.isArray(r)?r:[r],t=t||"";var i=[],o=[],a=0;e.forEach((function(e,t){e.indexed?(o[t]=["bool","int","uint","address","fixed","ufixed"].find((function(t){return-1!==e.type.indexOf(t)}))?n.decodeParameter(e.type,r[a]):r[a],a++):i[t]=e}));var s=t,f=s?this.decodeParametersWith(i,s,!0):[],c=new u;return c.__length__=0,e.forEach((function(e,t){c[t]="string"===e.type?"":null,void 0!==f[t]&&(c[t]=f[t]),void 0!==o[t]&&(c[t]=o[t]),e.name&&(c[e.name]=c[t]),c.__length__++})),c};var d=new c;e.exports=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return n.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return n.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return n.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return n.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return n.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return n.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return o.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return o.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return o.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return n.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return o.TransactionDescription}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return o.checkResultErrors}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return i.defaultAbiCoder}});var n=r(106),i=r(184),o=r(407)},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.BigNumber=void 0,t._base16To36=function(e){return new c(e,16).toString(36)},t._base36To16=function(e){return new c(e,36).toString(16)},t.isBigNumberish=function(e){return null!=e&&(p.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,s.isHexString)(e)||"bigint"==typeof e||(0,s.isBytes)(e))};var i=n(r(8)),o=n(r(9)),a=n(r(3)),s=r(15),f=r(16),u=r(183),c=a.default.BN,d=new f.Logger(u.version),l={};var h=!1,p=function(){function e(t,r){(0,i.default)(this,e),t!==l&&d.throwError("cannot call constructor directly; use BigNumber.from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return(0,o.default)(e,[{key:"fromTwos",value:function(e){return y(m(this).fromTwos(e))}},{key:"toTwos",value:function(e){return y(m(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return y(m(this).add(m(e)))}},{key:"sub",value:function(e){return y(m(this).sub(m(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&v("division-by-zero","div"),y(m(this).div(m(t)))}},{key:"mul",value:function(e){return y(m(this).mul(m(e)))}},{key:"mod",value:function(e){var t=m(e);return t.isNeg()&&v("division-by-zero","mod"),y(m(this).umod(t))}},{key:"pow",value:function(e){var t=m(e);return t.isNeg()&&v("negative-power","pow"),y(m(this).pow(t))}},{key:"and",value:function(e){var t=m(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","and"),y(m(this).and(t))}},{key:"or",value:function(e){var t=m(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","or"),y(m(this).or(t))}},{key:"xor",value:function(e){var t=m(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","xor"),y(m(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","mask"),y(m(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shl"),y(m(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&v("negative-width","shr"),y(m(this).shrn(e))}},{key:"eq",value:function(e){return m(this).eq(m(e))}},{key:"lt",value:function(e){return m(this).lt(m(e))}},{key:"lte",value:function(e){return m(this).lte(m(e))}},{key:"gt",value:function(e){return m(this).gt(m(e))}},{key:"gte",value:function(e){return m(this).gte(m(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return m(this).isZero()}},{key:"toNumber",value:function(){try{return m(this).toNumber()}catch(e){v("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return d.throwError("this platform does not support BigInt",f.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,d.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?d.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.Logger.errors.UNEXPECTED_ARGUMENT,{}):d.throwError("BigNumber.toString does not accept parameters",f.Logger.errors.UNEXPECTED_ARGUMENT,{})),m(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"==typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(l,b(t)):t.match(/^-?[0-9]+$/)?new e(l,b(new c(t))):d.throwArgumentError("invalid BigNumber string","value",t);if("number"==typeof t)return t%1&&v("underflow","BigNumber.from",t),(t>=9007199254740991||t<=-9007199254740991)&&v("overflow","BigNumber.from",t),e.from(String(t));var r=t;if("bigint"==typeof r)return e.from(r.toString());if((0,s.isBytes)(r))return e.from((0,s.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if("string"==typeof n)return e.from(n)}else{var i=r._hex;if(null==i&&"BigNumber"===r.type&&(i=r.hex),"string"==typeof i&&((0,s.isHexString)(i)||"-"===i[0]&&(0,s.isHexString)(i.substring(1))))return e.from(i)}return d.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function b(e){if("string"!=typeof e)return b(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&d.throwArgumentError("invalid hex","value",e),"0x00"===(e=b(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function y(e){return p.from(b(e))}function m(e){var t=p.from(e).toHexString();return"-"===t[0]?new c("-"+t.substring(3),16):new c(t.substring(2),16)}function v(e,t,r){var n={fault:e,operation:t};return null!=r&&(n.value=r),d.throwError(e,f.Logger.errors.NUMERIC_FAULT,n)}t.BigNumber=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="bignumber/5.6.2"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.defaultAbiCoder=t.AbiCoder=void 0;var i=n(r(8)),o=n(r(9)),a=r(15),s=r(64),f=r(16),u=r(65),c=r(23),d=r(387),l=r(185),h=r(393),p=r(186),b=r(395),y=r(396),m=r(397),v=r(402),g=r(406),w=r(106),_=new f.Logger(u.version),k=new RegExp(/^bytes([0-9]*)$/),S=new RegExp(/^(u?int)([0-9]*)$/),A=function(){function e(t){(0,i.default)(this,e),(0,s.defineReadOnly)(this,"coerceFunc",t||null)}return(0,o.default)(e,[{key:"_getCoder",value:function(e){var t=this;switch(e.baseType){case"address":return new d.AddressCoder(e.name);case"bool":return new h.BooleanCoder(e.name);case"string":return new v.StringCoder(e.name);case"bytes":return new p.BytesCoder(e.name);case"array":return new l.ArrayCoder(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new g.TupleCoder((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new y.NullCoder(e.name)}var r=e.type.match(S);if(r){var n=parseInt(r[2]||"256");return(0===n||n>256||n%8!=0)&&_.throwArgumentError("invalid "+r[1]+" bit length","param",e),new m.NumberCoder(n/8,"int"===r[1],e.name)}if(r=e.type.match(k)){var i=parseInt(r[1]);return(0===i||i>32)&&_.throwArgumentError("invalid bytes length","param",e),new b.FixedBytesCoder(i,e.name)}return _.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new c.Reader(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new c.Writer(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,r=e.map((function(e){return t._getCoder(w.ParamType.from(e))}));return new g.TupleCoder(r,"_").defaultValue()}},{key:"encode",value:function(e,t){var r=this;e.length!==t.length&&_.throwError("types/values length mismatch",f.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var n=e.map((function(e){return r._getCoder(w.ParamType.from(e))})),i=new g.TupleCoder(n,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,r){var n=this,i=e.map((function(e){return n._getCoder(w.ParamType.from(e))}));return new g.TupleCoder(i,"_").decode(this._getReader((0,a.arrayify)(t),r))}}]),e}();t.AbiCoder=A;var E=new A;t.defaultAbiCoder=E},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=void 0,t.pack=y,t.unpack=m;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12)),u=n(r(2)),c=r(16),d=r(65),l=r(23),h=r(392);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var b=new c.Logger(d.version);function y(e,t,r){var n=null;if(Array.isArray(r))n=r;else if(r&&"object"===(0,u.default)(r)){var i={};n=t.map((function(e){var t=e.localName;return t||b.throwError("cannot encode object for signature with missing names",c.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]&&b.throwError("cannot encode object for signature with duplicate names",c.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),i[t]=!0,r[t]}))}else b.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&b.throwArgumentError("types/value length mismatch","tuple",r);var o=new l.Writer(e.wordSize),a=new l.Writer(e.wordSize),s=[];t.forEach((function(e,t){var r=n[t];if(e.dynamic){var i=a.length;e.encode(a,r);var f=o.writeUpdatableValue();s.push((function(e){f(e+i)}))}else e.encode(o,r)})),s.forEach((function(e){e(o.length)}));var f=e.appendWriter(o);return f+=e.appendWriter(a)}function m(e,t){var r=[],n=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=n.subReader(o.toNumber());try{i=t.decode(a)}catch(e){if(e.code===c.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===c.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));var i=t.reduce((function(e,t){var r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach((function(e,t){var n=e.localName;if(n&&1===i[n]&&("length"===n&&(n="_length"),null==r[n])){var o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:function(){throw o}}):r[n]=o}}));for(var o=function(e){var t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:function(){throw t}})},a=0;a=0?n:"")+"]",f=-1===n||e.dynamic;return(a=t.call(this,"array",s,o,f)).coder=e,a.length=n,a}return(0,o.default)(r,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],r=0;re._data.length&&b.throwError("insufficient data length",c.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var r=[],n=0;n=0;i--){var s=n(a[i]);r=n(new e(r+s,"hex"))}}return"0x"+r},t.normalize=o}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(66);function i(e){return parseInt(e.toString("hex"),16)}function o(e){var r=e.toString(16);return r.length%2==1&&(r="0"+r),t.from(r,"hex")}e.exports={numberToBuffer:o,bufferToNumber:i,varintBufferEncode:function(e){return t.from(n.encode(i(e)))},varintBufferDecode:function(e){return o(n.decode(e))},varintEncode:function(e){return t.from(n.encode(e))}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=r(0),i=n(r(8)),o=n(r(9)),a=r(1).Buffer,s=r(109),f=r(436),u=r(442),c=r(67),d=r(447),l=r(448)(function(e){function t(e,r,n,o){if((0,i.default)(this,t),l.isCID(e)){var c=e;return this.version=c.version,this.codec=c.codec,this.multihash=a.from(c.multihash),void(this.multibaseName=c.multibaseName||(0===c.version?"base58btc":"base32"))}if("string"==typeof e){var d=f.isEncoded(e);if(d){var h=f.decode(e);this.version=parseInt(h.slice(0,1).toString("hex"),16),this.codec=u.getCodec(h.slice(1)),this.multihash=u.rmPrefix(h.slice(1)),this.multibaseName=d}else this.version=0,this.codec="dag-pb",this.multihash=s.fromB58String(e),this.multibaseName="base58btc";return t.validateCID(this),void Object.defineProperty(this,"string",{value:e})}if(a.isBuffer(e)){var p=e.slice(0,1),b=parseInt(p.toString("hex"),16);if(1===b){var y=e;this.version=b,this.codec=u.getCodec(y.slice(1)),this.multihash=u.rmPrefix(y.slice(1)),this.multibaseName="base32"}else this.version=0,this.codec="dag-pb",this.multihash=e,this.multibaseName="base58btc";t.validateCID(this)}else this.version=e,this.codec=r,this.multihash=n,this.multibaseName=o||(0===e?"base58btc":"base32"),t.validateCID(this)}return(0,o.default)(t,[{key:"buffer",get:function(){var e=this._buffer;if(!e){if(0===this.version)e=this.multihash;else{if(1!==this.version)throw new Error("unsupported version");e=a.concat([a.from("01","hex"),u.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}},{key:"prefix",get:function(){return a.concat([a.from("0".concat(this.version),"hex"),u.getCodeVarint(this.codec),s.prefix(this.multihash)])}},{key:"toV0",value:function(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0");var e=s.decode(this.multihash),t=e.name,r=e.length;if("sha2-256"!==t)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");if(32!==r)throw new Error("Cannot convert non 32 byte multihash CID to CIDv0");return new l(0,this.codec,this.multihash)}},{key:"toV1",value:function(){return new l(1,this.codec,this.multihash)}},{key:"toBaseEncodedString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&e===this.multibaseName)return this.string;var t=null;if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");t=s.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");t=f.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}},{key:e,value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}}],[{key:"validateCID",value:function(e){var t=d.checkCIDComponents(e);if(t)throw new Error(t)}}]),t}(Symbol.for("nodejs.util.inspect.custom")),{className:"CID",symbolName:"@ipld/js-cid/CID"});l.codecs=c,e.exports=l},function(e,t,r){"use strict";var n=r(5).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,c=new Uint8Array(a);e[r];){var d=t[e.charCodeAt(r)];if(255===d)return;for(var l=0,h=a-1;(0!==d||l>>0,c[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");o=l,r++}if(" "!==e[r]){for(var p=a-o;p!==a&&0===c[p];)p++;var b=n.allocUnsafe(i+(a-p));b.fill(0,0,i);for(var y=i;p!==a;)b[y++]=c[p++];return b}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,a=t.length;o!==a&&0===t[o];)o++,r++;for(var u=(a-o)*c+1>>>0,d=new Uint8Array(u);o!==a;){for(var l=t[o],h=0,p=u-1;(0!==l||h>>0,d[p]=l%s>>>0,l=l/s>>>0;if(0!==l)throw new Error("Non-zero carry");i=h,o++}for(var b=u-i;b!==u&&0===d[b];)b++;for(var y=f.repeat(r);b>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},function(e,t,r){"use strict";var n=r(4),i=r(459),o=r(31),a=r(5).Buffer,s=r(199),f=r(98),u=r(99),c=a.alloc(128);function d(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new f:u(e)).update(t).digest():t.lengthn||t!=t)throw new TypeError("Bad key length")}},function(e,t,r){"use strict";(function(t,r){var n;if(t.process&&t.process.browser)n="utf-8";else if(t.process&&t.process.version){n=parseInt(r.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";e.exports=n}).call(this,r(7),r(6))},function(e,t,r){"use strict";var n=r(199),i=r(98),o=r(99),a=r(5).Buffer,s=r(202),f=r(203),u=r(205),c=a.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,r){var s=function(e){function t(t){return o(e).update(t).digest()}return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:t}(e),f="sha512"===e||"sha384"===e?128:64;t.length>f?t=s(t):t.length>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,i){for(var o=0,a=0,s=n.length>>>1,f=0;f>>n[f]&1;for(f=s;f>>n[f]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},f.prototype._update=function(e,t,r,n){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},f.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=l}o.rip(s,a,n,i)},f.prototype._decrypt=function(e,t,r,n,i){for(var a=r,s=t,f=e.keys.length-2;f>=0;f-=2){var u=e.keys[f],c=e.keys[f+1];o.expand(a,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var d=o.substitute(u,c),l=a;a=(s^o.permute(d))>>>0,s=l}o.rip(a,s,n,i)}},function(e,t,r){"use strict";var n=r(68),i=r(5).Buffer,o=r(209);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var s=0;se;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(f),t.cmp(f)){if(!t.cmp(u))for(;r.mod(c).cmp(d);)r.iadd(h)}else for(;r.mod(o).cmp(l);)r.iadd(h);if(y(p=r.shrn(1))&&y(r)&&m(p)&&m(r)&&a.test(p)&&a.test(r))return r}}},function(e,t,r){"use strict";var n=r(3),i=r(92);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),a=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),f=0;!s.testn(f);f++);for(var u=e.shrn(f),c=s.toRed(o);t>0;t--){var d=this._randrange(new n(2),s);r&&r(d);var l=d.toRed(o).redPow(u);if(0!==l.cmp(a)&&0!==l.cmp(c)){for(var h=1;h0;t--){var c=this._randrange(new n(2),a),d=e.gcd(c);if(0!==d.cmpn(1))return d;var l=c.toRed(i).redPow(f);if(0!==l.cmp(o)&&0!==l.cmp(u)){for(var h=1;h0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?k(e,new _):P(e,a,t,!0);else if(a.ended)k(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?P(e,a,t,!1):M(e,a)):P(e,a,t,!1)}else n||(a.reading=!1,M(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function j(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function D(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):R(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){k(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:y;function s(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",l),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function f(){u("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var d=!1;function l(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==D(i.pipes,e))&&!d&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),y(),e.removeListener("error",h),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),y()}function b(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?R(this):i.reading||n.nextTick(C,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(7),r(6))},function(e,t,r){"use strict";e.exports=c;var n=r(51).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,f=r(52);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=31)return n.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var f=1,u=n.length;u>=256;u>>=8)f++;var c=i.alloc(2+f);c[0]=o,c[1]=128|f;for(var d=1+f,l=n.length;l>0;d--,l>>=8)c[d]=255&l;return this._createEncoderBuffer([c,n])},f.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=i.alloc(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s=128;f>>=7)a++}for(var u=i.alloc(a),c=u.length-1,d=e.length-1;d>=0;d--){var l=e[d];for(u[c--]=127&l;(l>>=7)>0;)u[c--]=128|127&l}return this._createEncoderBuffer(u)},f.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[u(n.getUTCFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getUTCFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"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&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=i.from(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=i.alloc(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;s>=256;s>>=8)a++;for(var f=new Array(a),u=f.length-1;u>=0;u--)f[u]=255&e,e>>=8;return 128&f[0]&&f.unshift(0),this._createEncoderBuffer(i.from(f))},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,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function d(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o>>((3&t)<<3)&255;return o}}},function(e,t,r){"use strict";for(var n=[],i=0;i<256;++i)n[i]=(i+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},o=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeeMarketEIP1559Transaction=t.TransactionFactory=t.AccessListEIP2930Transaction=t.Transaction=void 0;var a=r(512);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return o(a).default}});var s=r(548);Object.defineProperty(t,"AccessListEIP2930Transaction",{enumerable:!0,get:function(){return o(s).default}});var f=r(549);Object.defineProperty(t,"TransactionFactory",{enumerable:!0,get:function(){return o(f).default}});var u=r(550);Object.defineProperty(t,"FeeMarketEIP1559Transaction",{enumerable:!0,get:function(){return o(u).default}}),i(r(53),t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessLists=void 0;var n=r(28),i=r(53),o=function(){function e(){}return e.getAccessListData=function(e){var t,r;if(e&&(0,i.isAccessList)(e)){t=e;for(var o=[],a=0;a0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},s=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;var f=s(r(41)),u=s(r(3)),c=o(r(87)),d=r(236),l=r(54),h=r(234),p=r(40),b=r(123),y=r(89),m=r(126),v=function(){function e(e,t,r,n){void 0===e&&(e=new u.default(0)),void 0===t&&(t=new u.default(0)),void 0===r&&(r=h.KECCAK256_RLP),void 0===n&&(n=h.KECCAK256_NULL),this.nonce=e,this.balance=t,this.stateRoot=r,this.codeHash=n,this._validate()}return e.fromAccountData=function(t){var r=t.nonce,n=t.balance,i=t.stateRoot,o=t.codeHash;return new e(r?new u.default((0,p.toBuffer)(r)):void 0,n?new u.default((0,p.toBuffer)(n)):void 0,i?(0,p.toBuffer)(i):void 0,o?(0,p.toBuffer)(o):void 0)},e.fromRlpSerializedAccount=function(e){var t=c.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)},e.fromValuesArray=function(t){var r=a(t,4),n=r[0],i=r[1],o=r[2],s=r[3];return new e(new u.default(n),new u.default(i),o,s)},e.prototype._validate=function(){if(this.nonce.lt(new u.default(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new u.default(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")},e.prototype.raw=function(){return[(0,m.bnToUnpaddedBuffer)(this.nonce),(0,m.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]},e.prototype.serialize=function(){return c.encode(this.raw())},e.prototype.isContract=function(){return!this.codeHash.equals(h.KECCAK256_NULL)},e.prototype.isEmpty=function(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(h.KECCAK256_NULL)},e}();t.Account=v;t.isValidAddress=function(e){try{(0,y.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};t.toChecksumAddress=function(e,t){(0,y.assertIsHexString)(e);var r=(0,l.stripHexPrefix)(e).toLowerCase(),n="";t&&(n=(0,m.toType)(t,m.TypeOutput.BN).toString()+"0x");for(var i=(0,b.keccakFromString)(n+r).toString("hex"),o="0x",a=0;a=8?o+=r[a].toUpperCase():o+=r[a];return o};t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e};t.generateAddress=function(t,r){(0,y.assertIsBuffer)(t),(0,y.assertIsBuffer)(r);var n=new u.default(r);return n.isZero()?(0,b.rlphash)([t,null]).slice(-20):(0,b.rlphash)([t,e.from(n.toArray())]).slice(-20)};t.generateAddress2=function(t,r,n){return(0,y.assertIsBuffer)(t),(0,y.assertIsBuffer)(r),(0,y.assertIsBuffer)(n),(0,f.default)(20===t.length),(0,f.default)(32===r.length),(0,b.keccak256)(e.concat([e.from("ff","hex"),t,r,(0,b.keccak256)(n)])).slice(-20)};t.isValidPrivate=function(e){return(0,d.privateKeyVerify)(e)};t.isValidPublic=function(t,r){return void 0===r&&(r=!1),(0,y.assertIsBuffer)(t),64===t.length?(0,d.publicKeyVerify)(e.concat([e.from([4]),t])):!!r&&(0,d.publicKeyVerify)(t)};t.pubToAddress=function(t,r){return void 0===r&&(r=!1),(0,y.assertIsBuffer)(t),r&&64!==t.length&&(t=e.from((0,d.publicKeyConvert)(t,!1).slice(1))),(0,f.default)(64===t.length),(0,b.keccak)(t).slice(-20)},t.publicToAddress=t.pubToAddress;t.privateToPublic=function(t){return(0,y.assertIsBuffer)(t),e.from((0,d.publicKeyCreate)(t,!1)).slice(1)};t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))};t.importPublic=function(t){return(0,y.assertIsBuffer)(t),64!==t.length&&(t=e.from((0,d.publicKeyConvert)(t,!1).slice(1))),t};t.zeroAddress=function(){var e=(0,p.zeros)(20);return(0,p.bufferToHex)(e)};t.isZeroAddress=function(e){try{(0,y.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{f(n.next(e))}catch(e){o(e)}}function s(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}f((n=n.apply(e,t||[])).next())}))},i=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,r){"use strict";var n,i=r(0)(r(2));function o(e){this.rand=e}if(e.exports=function(e){return n||(n=new o(null)),n.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=r(26),i=r(70),o=r(241),a=r(39),s=n.sum32,f=n.sum32_4,u=n.sum32_5,c=o.ch32,d=o.maj32,l=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,y=i.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 v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(v,y),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)a.endEmitted?k(e,new _):P(e,a,t,!0);else if(a.ended)k(e,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?P(e,a,t,!1):M(e,a)):P(e,a,t,!1)}else n||(a.reading=!1,M(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function R(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(T,e))}function T(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function C(e){u("readable nexttick read 0"),e.read(0)}function j(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(F,t,e))}function F(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function D(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):R(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&L(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){k(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?f:y;function s(t,n){u("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",b),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),r.removeListener("end",f),r.removeListener("end",y),r.removeListener("data",l),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function f(){u("onend"),e.end()}i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var d=!1;function l(t){u("ondata");var n=e.write(t);u("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==D(i.pipes,e))&&!d&&(u("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){u("onerror",t),y(),e.removeListener("error",h),0===o(e,"error")&&k(e,t)}function p(){e.removeListener("finish",b),y()}function b(){u("onfinish"),e.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",b),e.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?R(this):i.reading||n.nextTick(C,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(B,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(B,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(j,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new b("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,M(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=d.destroy,E.prototype._undestroy=d.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this,r(7),r(6))},function(e,t,r){"use strict";e.exports=c;var n=r(55).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,f=r(56);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){"use strict";var n=r(10),i=r(57),o=r(24).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,y=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+h(r[m-15])+r[m-16];for(var v=0;v<64;++v){var g=y+l(f)+u(f,p,b)+a[v]+r[v]|0,w=d(n)+c(n,i,o)|0;y=b,b=p,p=f,f=s+g|0,s=o,o=i,i=n,n=g+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=y+this._h|0},f.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=f},function(e,t,r){"use strict";var n=r(10),i=r(57),o=r(24).Buffer,a=[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],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,f=0|this._fh,v=0|this._gh,g=0|this._hh,w=0|this._al,_=0|this._bl,k=0|this._cl,S=0|this._dl,A=0|this._el,E=0|this._fl,x=0|this._gl,P=0|this._hl,O=0;O<32;O+=2)t[O]=e.readInt32BE(4*O),t[O+1]=e.readInt32BE(4*O+4);for(;O<160;O+=2){var R=t[O-30],T=t[O-30+1],M=h(R,T),I=p(T,R),B=b(R=t[O-4],T=t[O-4+1]),C=y(T,R),j=t[O-14],U=t[O-14+1],N=t[O-32],L=t[O-32+1],F=I+U|0,D=M+j+m(F,I)|0;D=(D=D+B+m(F=F+C|0,C)|0)+N+m(F=F+L|0,L)|0,t[O]=D,t[O+1]=F}for(var q=0;q<160;q+=2){D=t[q],F=t[q+1];var z=c(r,n,i),H=c(w,_,k),K=d(r,w),G=d(w,r),V=l(s,A),W=l(A,s),J=a[q],X=a[q+1],Z=u(s,f,v),Y=u(A,E,x),$=P+W|0,Q=g+V+m($,P)|0;Q=(Q=(Q=Q+Z+m($=$+Y|0,Y)|0)+J+m($=$+X|0,X)|0)+D+m($=$+F|0,F)|0;var ee=G+H|0,te=K+z+m(ee,G)|0;g=v,P=x,v=f,x=E,f=s,E=A,s=o+Q+m(A=S+$|0,S)|0,o=i,S=k,i=n,k=_,n=r,_=w,r=Q+te+m(w=$+ee|0,$)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+k|0,this._dl=this._dl+S|0,this._el=this._el+A|0,this._fl=this._fl+E|0,this._gl=this._gl+x|0,this._hl=this._hl+P|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,k)|0,this._dh=this._dh+o+m(this._dl,S)|0,this._eh=this._eh+s+m(this._el,A)|0,this._fh=this._fh+f+m(this._fl,E)|0,this._gh=this._gh+v+m(this._gl,x)|0,this._hh=this._hh+g+m(this._hl,P)|0},f.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=f},function(e,t,r){"use strict";r(621);var n=function(e,t){return parseInt(e.slice(2*t+2,2*t+4),16)},i=function(e){return(e.length-2)/2},o=function(e){for(var t=[],r=2,n=e.length;r>6|192);else{if(i>55295&&i<56320){if(++n==e.length)return null;var o=e.charCodeAt(n);if(o<56320||o>57343)return null;r+=t((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=t(i>>12&63|128)}else r+=t(i>>12|224);r+=t(i>>6&63|128)}r+=t(63&i|128)}}return r},toString:function(e){for(var t="",r=0,o=i(e);r127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(e,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(e,r))<<6|63&n(e,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(e,r))<<12|(63&n(e,++r))<<6|63&n(e,++r)}++r}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},function(e,t,r){"use strict";var n=r(255).version,i=r(33),o=r(379),a=r(80),s=r(196),f=r(606),u=r(607),c=r(17),d=function(){var e=this;i.packageInit(this,arguments),this.version=n,this.utils=c,this.eth=new o(this),this.shh=new f(this),this.bzz=new u(this);var t=this.setProvider;this.setProvider=function(r,n){return t.apply(e,arguments),e.eth.setRequestManager(e._requestManager),e.shh.setRequestManager(e._requestManager),e.bzz.setProvider(r),!0}};d.version=n,d.utils=c,d.modules={Eth:o,Net:a,Personal:s,Shh:f,Bzz:u},i.addProviders(d),e.exports=d},function(e){e.exports=JSON.parse('{"name":"web3","version":"1.8.0","description":"Ethereum JavaScript API","repository":"https://github.com/ethereum/web3.js","license":"LGPL-3.0","engines":{"node":">=8.0.0"},"main":"lib/index.js","browser":"dist/web3.min.js","bugs":{"url":"https://github.com/ethereum/web3.js/issues"},"keywords":["Ethereum","JavaScript","API"],"author":"ethereum.org","types":"types/index.d.ts","scripts":{"compile":"tsc -b tsconfig.json","dtslint":"dtslint --localTs ../../node_modules/typescript/lib types","postinstall":"echo \\"Web3.js 4.x alpha has been released for early testing and feedback. Checkout doc at https://docs.web3js.org/ \\""},"authors":[{"name":"Fabian Vogelsteller","email":"fabian@ethereum.org","homepage":"http://frozeman.de"},{"name":"Marek Kotewicz","email":"marek@parity.io","url":"https://github.com/debris"},{"name":"Marian Oancea","url":"https://github.com/cubedro"},{"name":"Gav Wood","email":"g@parity.io","homepage":"http://gavwood.com"},{"name":"Jeffery Wilcke","email":"jeffrey.wilcke@ethereum.org","url":"https://github.com/obscuren"}],"dependencies":{"web3-bzz":"1.8.0","web3-core":"1.8.0","web3-eth":"1.8.0","web3-eth-personal":"1.8.0","web3-net":"1.8.0","web3-shh":"1.8.0","web3-utils":"1.8.0"},"devDependencies":{"@types/node":"^12.12.6","dtslint":"^3.4.1","typescript":"^3.9.5","web3-core-helpers":"1.8.0"}}')},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(127).callbackify,o=r(11).errors,a=r(167),s=r(336),f=r(337),u=function e(t,r){this.provider=null,this.providers=e.providers,this.setProvider(t,r),this.subscriptions=new Map};u.givenProvider=f,u.providers={WebsocketProvider:r(338),HttpProvider:r(348),IpcProvider:r(356)},u.prototype.setProvider=function(e,t){var r=this;if(e&&"string"==typeof e&&this.providers)if(/^http(s)?:\/\//i.test(e))e=new this.providers.HttpProvider(e);else if(/^ws(s)?:\/\//i.test(e))e=new this.providers.WebsocketProvider(e);else if(e&&"object"===(0,n.default)(t)&&"function"==typeof t.connect)e=new this.providers.IpcProvider(e,t);else if(e)throw new Error("Can't autodetect provider for \""+e+'"');if(this.provider&&this.provider.connected&&this.clearSubscriptions(),this.provider=e||null,this.provider&&this.provider.on){"function"==typeof e.request?this.provider.on("message",(function(e){if(e&&"eth_subscription"===e.type&&e.data){var t=e.data;t.subscription&&r.subscriptions.has(t.subscription)&&r.subscriptions.get(t.subscription).callback(null,t.result)}})):this.provider.on("data",(function(e,t){(e=e||t).method&&e.params&&e.params.subscription&&r.subscriptions.has(e.params.subscription)&&r.subscriptions.get(e.params.subscription).callback(null,e.params.result)})),this.provider.on("connect",(function(){r.subscriptions.forEach((function(e){e.subscription.resubscribe()}))})),this.provider.on("error",(function(e){r.subscriptions.forEach((function(t){t.callback(e)}))}));this.provider.on("disconnect",(function(e){r._isCleanCloseEvent(e)&&!r._isIpcCloseError(e)||(r.subscriptions.forEach((function(t){t.callback(o.ConnectionCloseError(e)),r.subscriptions.delete(t.subscription.id)})),r.provider&&r.provider.emit&&r.provider.emit("error",o.ConnectionCloseError(e))),r.provider&&r.provider.emit&&r.provider.emit("end",e)}))}},u.prototype.send=function(e,t){if(t=t||function(){},!this.provider)return t(o.InvalidProvider());var r=e.method,n=e.params,s=a.toPayload(r,n),f=this._jsonrpcResultCallback(t,s);if(this.provider.request)i(this.provider.request.bind(this.provider))({method:r,params:n},t);else if(this.provider.sendAsync)this.provider.sendAsync(s,f);else{if(!this.provider.send)throw new Error("Provider does not have a request or send method to use.");this.provider.send(s,f)}},u.prototype.sendBatch=function(e,t){if(!this.provider)return t(o.InvalidProvider());var r=a.toBatchPayload(e);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,(function(e,r){return e?t(e):Array.isArray(r)?void t(null,r):t(o.InvalidResponse(r))}))},u.prototype.addSubscription=function(e,t){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions.set(e.id,{callback:t,subscription:e})},u.prototype.removeSubscription=function(e,t){if(this.subscriptions.has(e)){var r=this.subscriptions.get(e).subscription.options.type;return this.subscriptions.delete(e),void this.send({method:r+"_unsubscribe",params:[e]},t)}"function"==typeof t&&t(null)},u.prototype.clearSubscriptions=function(e){try{var t=this;return this.subscriptions.size>0&&this.subscriptions.forEach((function(r,n){e&&"syncing"===r.name||t.removeSubscription(n)})),this.provider.reset&&this.provider.reset(),!0}catch(e){throw new Error("Error while clearing subscriptions: ".concat(e))}},u.prototype._isCleanCloseEvent=function(e){return"object"===(0,n.default)(e)&&([1e3].includes(e.code)||!0===e.wasClean)},u.prototype._isIpcCloseError=function(e){return"boolean"==typeof e&&e},u.prototype._jsonrpcResultCallback=function(e,t){return function(r,n){return n&&n.id&&t.id!==n.id?e(new Error("Wrong response id ".concat(n.id," (expected: ").concat(t.id,") in ").concat(JSON.stringify(t)))):r?e(r):n&&n.error?e(o.ErrorResponse(n)):a.isValidResponse(n)?void e(null,n.result):e(o.InvalidResponse(n))}},e.exports={Manager:u,BatchManager:s}},function(e,t,r){"use strict";var n=r(0)(r(2));e.exports=function(e){return e&&"object"===(0,n.default)(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t,r){"use strict";var n=r(0)(r(2));e.exports={ErrorResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:JSON.stringify(e),r=e.error&&e.error.data?e.error.data:null,n=new Error("Returned error: "+t);return n.data=r,n},InvalidNumberOfParams:function(e,t,r){return new Error('Invalid number of parameters for "'+r+'". Got '+e+" expected "+t+"!")},InvalidConnection:function(e,t){return this.ConnectionError("CONNECTION ERROR: Couldn't connect to node "+e+".",t)},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)},ConnectionTimeout:function(e){return new Error("CONNECTION TIMEOUT: timeout of "+e+" ms achived")},ConnectionNotOpenError:function(e){return this.ConnectionError("connection not open on send()",e)},ConnectionCloseError:function(e){return"object"===(0,n.default)(e)&&e.code&&e.reason?this.ConnectionError("CONNECTION ERROR: The connection got closed with the close code `"+e.code+"` and the following reason string `"+e.reason+"`",e):new Error("CONNECTION ERROR: The connection closed unexpectedly")},MaxAttemptsReachedOnReconnectingError:function(){return new Error("Maximum number of reconnect attempts reached!")},PendingRequestsOnReconnectingError:function(){return new Error("CONNECTION ERROR: Provider started to reconnect before the response got received!")},ConnectionError:function(e,t){var r=new Error(e);return t&&(r.code=t.code,r.reason=t.reason),r},RevertInstructionError:function(e,t){var r=new Error("Your request got reverted with the following reason string: "+e);return r.reason=e,r.signature=t,r},TransactionRevertInstructionError:function(e,t,r){var n=new Error("Transaction has been reverted by the EVM:\n"+JSON.stringify(r,null,2));return n.reason=e,n.signature=t,n.receipt=r,n},TransactionError:function(e,t){var r=new Error(e);return r.receipt=t,r},NoContractAddressFoundError:function(e){return this.TransactionError("The transaction receipt didn't contain a contract address.",e)},ContractCodeNotStoredError:function(e){return this.TransactionError("The contract code couldn't be stored, please check your gas limit.",e)},TransactionRevertedWithoutReasonError:function(e){return this.TransactionError("Transaction has been reverted by the EVM:\n"+JSON.stringify(e,null,2),e)},TransactionOutOfGasError:function(e){return this.TransactionError("Transaction ran out of gas. Please provide more gas:\n"+JSON.stringify(e,null,2),e)},ResolverMethodMissingError:function(e,t){return new Error("The resolver at "+e+'does not implement requested method: "'+t+'".')},ContractMissingABIError:function(){return new Error("You must provide the json interface of the contract when instantiating a contract object.")},ContractOnceRequiresCallbackError:function(){return new Error("Once requires a callback as the second parameter.")},ContractEventDoesNotExistError:function(e){return new Error('Event "'+e+"\" doesn't exist in this contract.")},ContractReservedEventError:function(e){return new Error('The event "'+e+"\" is a reserved event name, you can't use it.")},ContractMissingDeployDataError:function(){return new Error('No "data" specified in neither the given options, nor the default options.')},ContractNoAddressDefinedError:function(){return new Error("This contract object doesn't have address set yet, please set an address first.")},ContractNoFromAddressDefinedError:function(){return new Error('No "from" address specified in neither the given options, nor the default options.')}}},function(e,t,r){"use strict";var n=r(0),i=n(r(58)),o=n(r(2));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var l=d[0],h=d[1];if(l||(l="0"),h||(h="0"),h.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;h.length0?a-4:a;for(r=0;r>16&255,f[c++]=t>>8&255,f[c++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,f[c++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,f[c++]=t>>8&255,f[c++]=255&t);return f},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;as?s:a+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,r){"use strict"; +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,f=(1<>1,c=-7,d=r?i-1:0,l=r?-1:1,h=e[t+d];for(d+=l,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=l,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+d],d+=l,c-=8);if(0===o)o=1-u;else{if(o===f)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,f,u=8*o-i-1,c=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),(t+=a+d>=1?l/f:l*Math.pow(2,1-d))*f>=2&&(a++,f/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*f-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*b}},function(e,t,r){"use strict";e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw i}}return o}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict"; +/*! https://mths.be/utf8js v3.0.0 by @mathias */!function(e){var t,r,n,i=String.fromCharCode;function o(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function f(e){if(0==(4294967168&e))return i(e);var t="";return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(a(e),t=i(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+=i(63&e|128)}function u(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function c(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|u())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|u()<<6|u())>=2048)return a(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|u()<<12|u()<<6|u())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(s)}}(t)},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),v("output",e,t),e}function _(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){switch(m(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&v("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(f)}},privateKeyVerify:function(t){return v("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(v("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(o)}},privateKeyTweakAdd:function(t,r){switch(v("private key",t,32),v("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(a)}},privateKeyTweakMul:function(t,r){switch(v("private key",t,32),v("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(s)}},publicKeyVerify:function(t){return v("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(v("private key",t,32),g(r),n=w(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(u);case 2:throw new Error(d)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(v("public key",t,[33,65]),g(r),n=w(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(d)}},publicKeyNegate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(v("public key",t,[33,65]),g(r),n=w(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(o);case 3:throw new Error(d)}},publicKeyCombine:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;m(Array.isArray(t),"Expected public keys to be an Array"),m(t.length>0,"Expected public keys array will have more than zero items");var o,a=n(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;v("public key",s,[33,65])}}catch(e){a.e(e)}finally{a.f()}switch(g(r),i=w(i,r?33:65),e.publicKeyCombine(i,t)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(d)}},publicKeyTweakAdd:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(v("public key",t,[33,65]),v("tweak",r,32),g(n),i=w(i,n?33:65),e.publicKeyTweakAdd(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(a)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(v("public key",t,[33,65]),v("tweak",r,32),g(n),i=w(i,n?33:65),e.publicKeyTweakMul(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(s)}},signatureNormalize:function(t){switch(v("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(h)}},signatureExport:function(t,r){v("signature",t,64);var n={output:r=w(r,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(h);case 2:throw new Error(o)}},signatureImport:function(t,r){switch(v("signature",t),r=w(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(h);case 2:throw new Error(o)}},ecdsaSign:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;v("message",t,32),v("private key",r,32),m("Object"===_(n),"Expected options to be an Object"),void 0!==n.data&&v("options.data",n.data),void 0!==n.noncefn&&m("Function"===_(n.noncefn),"Expected options.noncefn to be a Function");var a={signature:i=w(i,64),recid:null};switch(e.ecdsaSign(a,t,r,n.data,n.noncefn)){case 0:return a;case 1:throw new Error(p);case 2:throw new Error(o)}},ecdsaVerify:function(t,r,n){switch(v("signature",t,64),v("message",r,32),v("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(h);case 2:throw new Error(c)}},ecdsaRecover:function(t,r,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(v("signature",t,64),m("Number"===_(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),v("message",n,32),g(i),a=w(a,i?33:65),e.ecdsaRecover(a,t,r,n)){case 0:return a;case 1:throw new Error(h);case 2:throw new Error(b);case 3:throw new Error(o)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(v("public key",t,[33,65]),v("private key",r,32),m("Object"===_(n),"Expected options to be an Object"),void 0!==n.data&&v("options.data",n.data),void 0!==n.hashfn?(m("Function"===_(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&v("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&v("options.ybuf",n.ybuf,32),v("output",i)):i=w(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(y)}}}}},function(e,t,r){"use strict";var n=new(0,r(59).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var f=a.redSqr().redIMul(a);return s.redSqr().redISub(f.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var f=n.getPublic().add(i.g.mul(r));return f.isInfinity()?2:(s(e,f),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var f=33,u=0;f>1&&0===s[u]&&!(128&s[u+1]);--f,++u);if(128&(s=s.subarray(u))[0])return 1;if(f>1&&0===s[0]&&!(128&s[1]))return 1;var c=a.subarray(39,72);c[0]=0,c.set(n,1);for(var d=33,l=0;d>1&&0===c[l]&&!(128&c[l+1]);--d,++l);return 128&(c=c.subarray(l))[0]||d>1&&0===c[0]&&!(128&c[1])?1:(e.outputlen=6+f+d,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+f]=2,a[5+f]=c.length,a.set(c,6+f),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var f=new o(a);f.cmp(i.n)>=0&&(f=new o(0));var u=new o(t.subarray(6+r));return u.cmp(i.n)>=0&&(u=new o(0)),e.set(f.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var f=s;s=function(e){var n=f(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var u,c=new o(r);if(c.cmp(i.n)>=0||c.isZero())return 1;try{u=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(e){return 1}return e.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),e.recid=u.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},f=new o(s.r),u=new o(s.s);if(f.cmp(i.n)>=0||u.cmp(i.n)>=0)return 1;if(1===u.cmp(n.nh)||f.isZero()||u.isZero())return 3;var c=a(r);if(null===c)return 2;var d=c.getPublic();return n.verify(t,s,d)?0:3},ecdsaRecover:function(e,t,r,a){var f,u={r:t.slice(0,32),s:t.slice(32,64)},c=new o(u.r),d=new o(u.s);if(c.cmp(i.n)>=0||d.cmp(i.n)>=0)return 1;if(c.isZero()||d.isZero())return 2;try{f=n.recoverPubKey(a,u,r)}catch(e){return 2}return s(e,f),0},ecdh:function(e,t,r,s,f,u,c){var d=a(t);if(null===d)return 1;var l=new o(r);if(l.cmp(i.n)>=0||l.isZero())return 2;var h=d.getPublic().mul(l);if(void 0===f)for(var p=h.encode(null,!0),b=n.hash().update(p).digest(),y=0;y<32;++y)e[y]=b[y];else{u||(u=new Uint8Array(32));for(var m=h.getX().toArray("be",32),v=0;v<32;++v)u[v]=m[v];c||(c=new Uint8Array(32));for(var g=h.getY().toArray("be",32),w=0;w<32;++w)c[w]=g[w];var _=f(u,c,s);if(!(_ instanceof Uint8Array&&_.length===e.length))return 2;e.set(_)}return 0}}},function(e){e.exports=JSON.parse('{"_args":[["elliptic@6.5.4","/home/user1/Desktop/work/web3_releases/1.8.0/web3.js"]],"_from":"elliptic@6.5.4","_id":"elliptic@6.5.4","_inBundle":false,"_integrity":"sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"elliptic@6.5.4","name":"elliptic","escapedName":"elliptic","rawSpec":"6.5.4","saveSpec":null,"fetchSpec":"6.5.4"},"_requiredBy":["/@ethersproject/signing-key","/@ethersproject/transactions/@ethersproject/signing-key","/browserify-sign","/create-ecdh","/eth-lib","/secp256k1","/swarm-js/eth-lib"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz","_spec":"6.5.4","_where":"/home/user1/Desktop/work/web3_releases/1.8.0/web3.js","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},"description":"EC cryptography","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.4"}')},function(e,t){},function(e,t,r){"use strict";var n=r(18),i=r(3),o=r(4),a=r(72),s=n.assert;function f(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(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 u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(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 c(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,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}o(f,a),e.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},f.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,f,u,c,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new i(1),b=new i(0),y=new i(0),m=new i(1),v=0;0!==l.cmpn(0);){var g=h.div(l);u=h.sub(g.mul(l)),c=y.sub(g.mul(p));var w=m.sub(g.mul(b));if(!n&&u.cmp(d)<0)t=f.neg(),r=p,n=u.neg(),o=c;else if(n&&2==++v)break;f=u,h=l,l=u,y=p,p=c,m=b,b=w}a=u.neg(),s=c;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:f.add(u).neg()}},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.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 r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.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,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(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)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.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))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,a.BasePoint),f.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),d=n.redMul(u),l=f.redSqr().redIAdd(c).redISub(d).redISub(d),h=f.redMul(d.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),c=r.redMul(f),d=s.redSqr().redIAdd(u).redISub(c).redISub(c),l=s.redMul(c.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},c.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 r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(3),i=r(4),o=r(72),a=r(18);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(f,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new f(this,e,t)},s.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),f=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,f)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(18),i=r(3),o=r(4),a=r(72),s=n.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(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 i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,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()))))}o(f,a),e.exports=f,f.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var f=s.fromRed().isOdd();return(t&&!f||!t&&f)&&(s=s.redNeg()),this.point(e,s)},f.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(u,a.BasePoint),f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},f.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),f=i.redMul(a),u=o.redMul(s),c=i.redMul(s),d=a.redMul(o);return this.curve.point(f,u,d,c)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),f=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(f);this.zOne?(e=a.redSub(s).redSub(f).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(f)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(f).redMul(o),t=u.redMul(n.redSub(f)),r=u.redMul(o))}else n=s.redAdd(f),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(f)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),u=o.redMul(a),c=s.redMul(f),d=o.redMul(f),l=a.redMul(s);return this.curve.point(u,c,l,d)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(f).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=f.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(f).redMul(u)),this.curve.point(d,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.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},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,r){"use strict";t.sha1=r(278),t.sha224=r(279),t.sha256=r(140),t.sha384=r(280),t.sha512=r(141)},function(e,t,r){"use strict";var n=r(25),i=r(60),o=r(139),a=n.rotl32,s=n.sum32,f=n.sum32_5,u=o.ft_1,c=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,c),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,r,a){"object"===(0,n.default)(r)&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),f=t.getPrivate().toArray("be",s),u=e.toArray("be",s),c=new o({hash:this.hash,entropy:f,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),l=this.n.sub(new i(1)),h=0;;h++){var p=a.k?a.k(h):new i(c.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(l)>=0)){var b=this.g.mul(p);if(!b.isInfinity()){var y=b.getX(),m=y.umod(this.n);if(0!==m.cmpn(0)){var v=p.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var g=(b.getY().isOdd()?1:0)|(0!==y.cmp(m)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),g^=1),new d({r:m,s:v,recoveryParam:g})}}}}}},l.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new d(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,f=a.invm(this.n),u=f.mul(e).umod(this.n),c=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,r,n){u((3&r)===r,"The recovery param is more than two bits"),t=new d(t,n);var o=this.n,a=new i(e),s=t.r,f=t.s,c=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),b=f.mul(h).umod(o);return this.g.mulAdd(p,s,b)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new d(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(73),i=r(137),o=r(19);function a(e){if(!(this instanceof a))return new a(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=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length"}},function(e,t,r){"use strict";var n=r(3),i=r(18),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=f(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=f(e,r);if(!1===a)return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var c=f(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var d=e.slice(r.place,c+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(u),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),a=[48];return c(a,o.length),a=a.concat(o),i.encode(a,e)}},function(e,t,r){"use strict";var n=r(73),i=r(93),o=r(18),a=o.assert,s=o.parseBytes,f=r(289),u=r(290);function c(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[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=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),f=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:o})},c.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";(function(t){var n=r(0),i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=r(144).Transform;e.exports=function(e){return function(r){(0,a.default)(s,r);var n=u(s);function s(t,r,o,a){var f;return(0,i.default)(this,s),(f=n.call(this,a))._rate=t,f._capacity=r,f._delimitedSuffix=o,f._options=a,f._state=new e,f._state.initialize(t,r),f._finalized=!1,f}return(0,o.default)(s,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(){}},{key:"_read",value:function(e){this.push(this.squeeze(e))}},{key:"update",value:function(e,r){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return t.isBuffer(e)||(e=t.from(e,r)),this._state.absorb(e),this}},{key:"squeeze",value:function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new s(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),s}(c)}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(306);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},i.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=[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];t.p1600=function(e){for(var t=0;t<24;++t){var r=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],l=e[9]^e[19]^e[29]^e[39]^e[49],h=d^(o<<1|a>>>31),p=l^(a<<1|o>>>31),b=e[0]^h,y=e[1]^p,m=e[10]^h,v=e[11]^p,g=e[20]^h,w=e[21]^p,_=e[30]^h,k=e[31]^p,S=e[40]^h,A=e[41]^p;h=r^(s<<1|f>>>31),p=i^(f<<1|s>>>31);var E=e[2]^h,x=e[3]^p,P=e[12]^h,O=e[13]^p,R=e[22]^h,T=e[23]^p,M=e[32]^h,I=e[33]^p,B=e[42]^h,C=e[43]^p;h=o^(u<<1|c>>>31),p=a^(c<<1|u>>>31);var j=e[4]^h,U=e[5]^p,N=e[14]^h,L=e[15]^p,F=e[24]^h,D=e[25]^p,q=e[34]^h,z=e[35]^p,H=e[44]^h,K=e[45]^p;h=s^(d<<1|l>>>31),p=f^(l<<1|d>>>31);var G=e[6]^h,V=e[7]^p,W=e[16]^h,J=e[17]^p,X=e[26]^h,Z=e[27]^p,Y=e[36]^h,$=e[37]^p,Q=e[46]^h,ee=e[47]^p;h=u^(r<<1|i>>>31),p=c^(i<<1|r>>>31);var te=e[8]^h,re=e[9]^p,ne=e[18]^h,ie=e[19]^p,oe=e[28]^h,ae=e[29]^p,se=e[38]^h,fe=e[39]^p,ue=e[48]^h,ce=e[49]^p,de=b,le=y,he=v<<4|m>>>28,pe=m<<4|v>>>28,be=g<<3|w>>>29,ye=w<<3|g>>>29,me=k<<9|_>>>23,ve=_<<9|k>>>23,ge=S<<18|A>>>14,we=A<<18|S>>>14,_e=E<<1|x>>>31,ke=x<<1|E>>>31,Se=O<<12|P>>>20,Ae=P<<12|O>>>20,Ee=R<<10|T>>>22,xe=T<<10|R>>>22,Pe=I<<13|M>>>19,Oe=M<<13|I>>>19,Re=B<<2|C>>>30,Te=C<<2|B>>>30,Me=U<<30|j>>>2,Ie=j<<30|U>>>2,Be=N<<6|L>>>26,Ce=L<<6|N>>>26,je=D<<11|F>>>21,Ue=F<<11|D>>>21,Ne=q<<15|z>>>17,Le=z<<15|q>>>17,Fe=K<<29|H>>>3,De=H<<29|K>>>3,qe=G<<28|V>>>4,ze=V<<28|G>>>4,He=J<<23|W>>>9,Ke=W<<23|J>>>9,Ge=X<<25|Z>>>7,Ve=Z<<25|X>>>7,We=Y<<21|$>>>11,Je=$<<21|Y>>>11,Xe=ee<<24|Q>>>8,Ze=Q<<24|ee>>>8,Ye=te<<27|re>>>5,$e=re<<27|te>>>5,Qe=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|fe>>>24,it=fe<<8|se>>>24,ot=ue<<14|ce>>>18,at=ce<<14|ue>>>18;e[0]=de^~Se&je,e[1]=le^~Ae&Ue,e[10]=qe^~Qe&be,e[11]=ze^~et&ye,e[20]=_e^~Be&Ge,e[21]=ke^~Ce&Ve,e[30]=Ye^~he&Ee,e[31]=$e^~pe&xe,e[40]=Me^~He&tt,e[41]=Ie^~Ke&rt,e[2]=Se^~je&We,e[3]=Ae^~Ue&Je,e[12]=Qe^~be&Pe,e[13]=et^~ye&Oe,e[22]=Be^~Ge&nt,e[23]=Ce^~Ve&it,e[32]=he^~Ee&Ne,e[33]=pe^~xe&Le,e[42]=He^~tt&me,e[43]=Ke^~rt&ve,e[4]=je^~We&ot,e[5]=Ue^~Je&at,e[14]=be^~Pe&Fe,e[15]=ye^~Oe&De,e[24]=Ge^~nt&ge,e[25]=Ve^~it&we,e[34]=Ee^~Ne&Xe,e[35]=xe^~Le&Ze,e[44]=tt^~me&Re,e[45]=rt^~ve&Te,e[6]=We^~ot&de,e[7]=Je^~at&le,e[16]=Pe^~Fe&qe,e[17]=Oe^~De&ze,e[26]=nt^~ge&_e,e[27]=it^~we&ke,e[36]=Ne^~Xe&Ye,e[37]=Le^~Ze&$e,e[46]=me^~Re&Me,e[47]=ve^~Te&Ie,e[8]=ot^~de&Se,e[9]=at^~le&Ae,e[18]=Fe^~qe&Qe,e[19]=De^~ze&et,e[28]=ge^~_e&Be,e[29]=we^~ke&Ce,e[38]=Xe^~Ye&he,e[39]=Ze^~$e&pe,e[48]=Re^~Me&He,e[49]=Te^~Ie&Ke,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},function(e,t,r){"use strict";(t=e.exports=r(152)).Stream=t,t.Readable=t,t.Writable=r(156),t.Duplex=r(47),t.Transform=r(157),t.PassThrough=r(313),t.finished=r(97),t.pipeline=r(314)},function(e,t){},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";var n=r(4),i=r(48),o=r(5).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=r[d-3]^r[d-8]^r[d-14]^r[d-16];for(var l=0;l<80;++l){var h=~~(l/20),p=0|((t=n)<<5|t>>>27)+c(h,i,o,s)+f+r[l]+a[h];f=s,s=o,o=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){"use strict";var n=r(4),i=r(48),o=r(5).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),b=u(n)+d(p,i,o,s)+f+r[h]+a[p]|0;f=s,s=o,o=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){"use strict";var n=r(4),i=r(158),o=r(48),a=r(5).Buffer,s=new Array(64);function f(){this.init(),this._w=s,o.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=f},function(e,t,r){"use strict";var n=r(4),i=r(159),o=r(48),a=r(5).Buffer,s=new Array(160);function f(){this.init(),this._w=s,o.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=f},function(e,t){},function(e,t,r){"use strict";var n=r(100).Buffer,i=r(321);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){"use strict";(function(e,t){!function(e,r){if(!e.setImmediate){var n,i,o,a,s,f=1,u={},c=!1,d=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,n=function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(a+t,"*")}),l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r28&&o%2==1||1===o||28===o)&&((s=e.from(n))[0]|=128),(0,a.bufferToHex)(e.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(s,32)]))};t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}};t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o.default("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o.default("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!d(c(e,i)))return!1;var f=new o.default(t),u=new o.default(r);return!(f.isZero()||f.gt(s)||u.isZero()||u.gt(s))&&(!n||1!==u.cmp(a))};t.hashPersonalMessage=function(t){(0,f.assertIsBuffer)(t);var r=e.from("Ethereum Signed Message:\n"+t.length,"utf-8");return(0,s.keccak)(e.concat([r,t]))}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n=r(0)(r(2)),i=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},s=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var f=s(r(41)),u=r(42),c=a(r(71)),d=r(34);t.defineProperties=function(t,r,i){if(t.raw=[],t._fields=[],t.toJSON=function(e){if(void 0===e&&(e=!1),e){var r={};return t._fields.forEach((function(e){r[e]="0x"+t[e].toString("hex")})),r}return(0,d.baToJSON)(t.raw)},t.serialize=function(){return c.encode(t.raw)},r.forEach((function(r,n){function i(){return t.raw[n]}function o(i){"00"!==(i=(0,d.toBuffer)(i)).toString("hex")||r.allowZero||(i=e.allocUnsafe(0)),r.allowLess&&r.length?(i=(0,d.unpadBuffer)(i),(0,f.default)(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||(0,f.default)(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[n]=i}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),i)if("string"==typeof i&&(i=e.from((0,u.stripHexPrefix)(i),"hex")),e.isBuffer(i)&&(i=c.decode(i)),Array.isArray(i)){if(i.length>t._fields.length)throw new Error("wrong number of fields in data");i.forEach((function(e,r){t[t._fields[r]]=(0,d.toBuffer)(e)}))}else{if("object"!==(0,n.default)(i))throw new Error("invalid data");var o=Object.keys(i);r.forEach((function(e){-1!==o.indexOf(e.name)&&(t[e.name]=i[e.name]),-1!==o.indexOf(e.alias)&&(t[e.alias]=i[e.alias])}))}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var s=a(r(3));t.BN=s.default;var f=o(r(71));t.rlp=f},function(e,t,r){"use strict";var n=r(0)(r(2));Object.defineProperty(t,"__esModule",{value:!0});var i=r(333);function o(e){return"string"==typeof e&&(!!/^(0x)?[0-9a-f]{512}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e)))}function a(e,t){"object"===(0,n.default)(t)&&t.constructor===Uint8Array&&(t=i.bytesToHex(t));for(var r=i.keccak256(t).replace("0x",""),o=0;o<12;o+=4){var a=(parseInt(r.substr(o,2),16)<<8)+parseInt(r.substr(o+2,2),16)&2047,f=1<=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom")}function f(e){return"string"==typeof e&&(!!/^(0x)?[0-9a-f]{64}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e)))}function u(e){return"string"==typeof e&&(!!e.match(/^(0x)?[0-9a-fA-F]{40}$/)||!!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=o,t.isInBloom=a,t.isUserEthereumAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error('Invalid ethereum address given: "'.concat(t,'"'));return a(e,i.padLeft(t,64))},t.isContractAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!u(t))throw new Error('Invalid contract address given: "'.concat(t,'"'));return a(e,t)},t.isTopicInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!f(t))throw new Error("Invalid topic");return a(e,t)},t.isTopic=f,t.isAddress=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(334);function i(e){if(null==e)throw new Error("cannot convert null value to array");if("string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e);for(var r=[],n=0;n=256||parseInt(String(r))!=r)return!1}return!0}(e))return o(new Uint8Array(e));throw new Error("invalid arrayify value")}function o(e){var t=arguments;return void 0!==e.slice||(e.slice=function(){var r=Array.prototype.slice.call(t);return o(new Uint8Array(Array.prototype.slice.apply(e,r)))}),e}t.keccak256=function(e){return"0x"+n.keccak_256(i(e))},t.padLeft=function(e,t){var r=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return"0x".concat(t.join("").replace(/^0+/,""))},t.toByteArray=i},function(e,t,r){"use strict";(function(e,n,i){var o,a=r(0)(r(2)); +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +!function(){var s="input is invalid type",f="object"===("undefined"==typeof window?"undefined":(0,a.default)(window)),u=f?window:{};u.JS_SHA3_NO_WINDOW&&(f=!1);var c=!f&&"object"===("undefined"==typeof self?"undefined":(0,a.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":(0,a.default)(e))&&e.versions&&e.versions.node?u=n:c&&(u=self);var d=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,a.default)(i)&&i.exports,l=r(63),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),b=[4,1024,262144,67108864],y=[0,8,16,24],m=[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],v=[224,256,384,512],g=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,a.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new N(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new N(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return R["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return R["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){N.call(this,e,t,r)}N.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,i,o=this.blocks,f=this.byteCount,u=e.length,c=this.blockCount,d=0,l=this.s;d>2]|=e[d]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=f){for(this.start=n-f,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(e){var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(f=65536+((1023&f)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},N.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},N.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var f=new Uint32Array(e);a>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],f[e]=255&t,o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f},L.prototype=new N,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,f,u,c,d,l,h,p,b,y,v,g,w,_,k,S,A,E,x,P,O,R,T,M,I,B,C,j,U,N,L,F,D,q,z,H,K,G,V,W,J,X,Z,Y,$,Q,ee,te,re,ne,ie,oe,ae,se,fe,ue,ce;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(f<<1|u>>>31),r=o^(u<<1|f>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(c<<1|d>>>31),r=s^(d<<1|c>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=f^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=c^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=p^~y&g,e[1]=b^~v&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~g&_,e[3]=v^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&p,e[7]=k^~A&b,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~p&y,e[9]=A^~b&v,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(d)i.exports=R;else{for(M=0;M32||n256)throw new Error("Invalid uint"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s.lt(new i(0)))throw new Error("Supplied uint "+s.toString()+" is negative");return n?o.leftPad(s.toString("hex"),n/8*2):s}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size");if((s=a(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.lt(new i(0))?s.toTwos(n).toString("hex"):n?o.leftPad(s.toString("hex"),n/8*2):s}throw new Error("Unsupported or invalid type: "+e)},f=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,a="";if(e&&"object"===(0,n.default)(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,a=e.hasOwnProperty("v")?e.v:e.value):(t=o.toHex(e,!0),a=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new i(a)),Array.isArray(a)){if((r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null}(t))&&a.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(a));r=a.length}return Array.isArray(a)?a.map((function(e){return s(t,e,r).toString("hex").replace("0x","")})).join(""):s(t,a,r).toString("hex").replace("0x","")};e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments),t=e.map(f);return o.sha3("0x"+t.join(""))},soliditySha3Raw:function(){return o.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(f).join(""))},encodePacked:function(){var e=Array.prototype.slice.call(arguments),t=e.map(f);return"0x"+t.join("").toLowerCase()}}},function(e,t,r){"use strict";var n=r(167),i=r(11).errors,o=function(e){this.requestManager=e,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests,t=this._sortResponses.bind(this);this.requestManager.sendBatch(e,(function(r,o){o=t(o),e.map((function(e,t){return o[t]||{}})).forEach((function(t,r){if(e[r].callback){if(t&&t.error)return e[r].callback(i.ErrorResponse(t));if(!n.isValidResponse(t))return e[r].callback(i.InvalidResponse(t));try{e[r].callback(null,e[r].format?e[r].format(t.result):t.result)}catch(t){e[r].callback(t)}}}))}))},o.prototype._sortResponses=function(e){return(e||[]).sort((function(e,t){return e.id-t.id}))},e.exports=o},function(e,t,r){"use strict";var n=r(0)(r(2)),i=null,o="object"===("undefined"==typeof globalThis?"undefined":(0,n.default)(globalThis))?globalThis:void 0;if(!o)try{o=Function("return this")()}catch(e){o=self}void 0!==o.ethereum?i=o.ethereum:void 0!==o.web3&&o.web3.currentProvider&&(o.web3.currentProvider.sendAsync&&(o.web3.currentProvider.send=o.web3.currentProvider.sendAsync,delete o.web3.currentProvider.sendAsync),!o.web3.currentProvider.on&&o.web3.currentProvider.connection&&"ipcProviderWrapper"===o.web3.currentProvider.connection.constructor.name&&(o.web3.currentProvider.on=function(e,t){if("function"!=typeof t)throw new Error("The second parameter callback must be a function.");switch(e){case"data":this.connection.on("data",(function(e){var r="";e=e.toString();try{r=JSON.parse(e)}catch(r){return t(new Error("Couldn't parse response data"+e))}r.id||-1===r.method.indexOf("_subscription")||t(null,r)}));break;default:this.connection.on(e,t)}}),i=o.web3.currentProvider),e.exports=i},function(e,t,r){"use strict";var n=r(103),i=r(339),o=r(11).errors,a=r(344).w3cwebsocket,s=function(e,t){n.call(this),t=t||{},this.url=e,this._customTimeout=t.timeout||15e3,this.headers=t.headers||{},this.protocol=t.protocol||void 0,this.reconnectOptions=Object.assign({auto:!1,delay:5e3,maxAttempts:!1,onTimeout:!1},t.reconnect),this.clientConfig=t.clientConfig||void 0,this.requestOptions=t.requestOptions||void 0,this.DATA="data",this.CLOSE="close",this.ERROR="error",this.CONNECT="connect",this.RECONNECT="reconnect",this.connection=null,this.requestQueue=new Map,this.responseQueue=new Map,this.reconnectAttempts=0,this.reconnecting=!1;var r=i.parseURL(e);r.username&&r.password&&(this.headers.authorization="Basic "+i.btoa(r.username+":"+r.password)),r.auth&&(this.headers.authorization="Basic "+i.btoa(r.auth)),Object.defineProperty(this,"connected",{get:function(){return this.connection&&this.connection.readyState===this.connection.OPEN},enumerable:!0}),this.connect()};(s.prototype=Object.create(n.prototype)).constructor=s,s.prototype.connect=function(){this.connection=new a(this.url,this.protocol,void 0,this.headers,this.requestOptions,this.clientConfig),this._addSocketListeners()},s.prototype._onMessage=function(e){var t=this;this._parseResponse("string"==typeof e.data?e.data:"").forEach((function(e){if(e.method&&-1!==e.method.indexOf("_subscription"))t.emit(t.DATA,e);else{var r=e.id;Array.isArray(e)&&(r=e[0].id),t.responseQueue.has(r)&&(void 0!==t.responseQueue.get(r).callback&&t.responseQueue.get(r).callback(!1,e),t.responseQueue.delete(r))}}))},s.prototype._onConnect=function(){if(this.emit(this.CONNECT),this.reconnectAttempts=0,this.reconnecting=!1,this.requestQueue.size>0){var e=this;this.requestQueue.forEach((function(t,r){e.send(t.payload,t.callback),e.requestQueue.delete(r)}))}},s.prototype._onClose=function(e){var t=this;!this.reconnectOptions.auto||[1e3,1001].includes(e.code)&&!1!==e.wasClean?(this.emit(this.CLOSE,e),this.requestQueue.size>0&&this.requestQueue.forEach((function(r,n){r.callback(o.ConnectionNotOpenError(e)),t.requestQueue.delete(n)})),this.responseQueue.size>0&&this.responseQueue.forEach((function(r,n){r.callback(o.InvalidConnection("on WS",e)),t.responseQueue.delete(n)})),this._removeSocketListeners(),this.removeAllListeners()):this.reconnect()},s.prototype._addSocketListeners=function(){this.connection.addEventListener("message",this._onMessage.bind(this)),this.connection.addEventListener("open",this._onConnect.bind(this)),this.connection.addEventListener("close",this._onClose.bind(this))},s.prototype._removeSocketListeners=function(){this.connection.removeEventListener("message",this._onMessage),this.connection.removeEventListener("open",this._onConnect),this.connection.removeEventListener("close",this._onClose)},s.prototype._parseResponse=function(e){var t=this,r=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((function(e){t.lastChunk&&(e=t.lastChunk+e);var n=null;try{n=JSON.parse(e)}catch(r){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout((function(){t.reconnectOptions.auto&&t.reconnectOptions.onTimeout?t.reconnect():(t.emit(t.ERROR,o.ConnectionTimeout(t._customTimeout)),t.requestQueue.size>0&&t.requestQueue.forEach((function(e,r){e.callback(o.ConnectionTimeout(t._customTimeout)),t.requestQueue.delete(r)})))}),t._customTimeout))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,n&&r.push(n)})),r},s.prototype.send=function(e,t){var r=e.id,n={payload:e,callback:t};if(Array.isArray(e)&&(r=e[0].id),this.connection.readyState===this.connection.CONNECTING||this.reconnecting)this.requestQueue.set(r,n);else{if(this.connection.readyState!==this.connection.OPEN)return this.requestQueue.delete(r),this.emit(this.ERROR,o.ConnectionNotOpenError()),void n.callback(o.ConnectionNotOpenError());this.responseQueue.set(r,n),this.requestQueue.delete(r);try{this.connection.send(JSON.stringify(n.payload))}catch(e){n.callback(e),this.responseQueue.delete(r)}}},s.prototype.reset=function(){this.responseQueue.clear(),this.requestQueue.clear(),this.removeAllListeners(),this._removeSocketListeners(),this._addSocketListeners()},s.prototype.disconnect=function(e,t){this._removeSocketListeners(),this.connection.close(e||1e3,t)},s.prototype.supportsSubscriptions=function(){return!0},s.prototype.reconnect=function(){var e=this;this.reconnecting=!0,this.responseQueue.size>0&&this.responseQueue.forEach((function(t,r){t.callback(o.PendingRequestsOnReconnectingError()),e.responseQueue.delete(r)})),!this.reconnectOptions.maxAttempts||this.reconnectAttempts0&&this.requestQueue.forEach((function(t,r){t.callback(o.MaxAttemptsReachedOnReconnectingError()),e.requestQueue.delete(r)})))},e.exports=s},function(e,t,r){"use strict";(function(t,n){var i=r(0)(r(2)),o="[object process]"===Object.prototype.toString.call(void 0!==t?t:0),a="undefined"!=typeof navigator&&"ReactNative"===navigator.product,s=null,f=null;if(o||a){s=function(e){return n.from(e).toString("base64")};var u=r(77);if(u.URL){var c=u.URL;f=function(e){return new c(e)}}else f=r(77).parse}else s=btoa.bind("object"===("undefined"==typeof globalThis?"undefined":(0,i.default)(globalThis))?globalThis:self),f=function(e){return new URL(e)};e.exports={parseURL:f,btoa:s}}).call(this,r(6),r(1).Buffer)},function(e,t,r){"use strict";var n=r(0)(r(2));e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===(0,n.default)(e)&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(342),t.encode=t.stringify=r(343)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,o){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var f=1e3;o&&"number"==typeof o.maxKeys&&(f=o.maxKeys);var u=e.length;f>0&&u>f&&(u=f);for(var c=0;c=0?(d=b.substr(0,y),l=b.substr(y+1)):(d=b,l=""),h=decodeURIComponent(d),p=decodeURIComponent(l),n(a,h)?i(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=r(0)(r(2)),i=function(e){switch((0,n.default)(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,f){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===(0,n.default)(e)?a(s(e),(function(n){var s=encodeURIComponent(i(n))+r;return o(e[n])?a(e[n],(function(e){return s+encodeURIComponent(i(e))})).join(t):s+encodeURIComponent(i(e[n]))})).join(t):f?encodeURIComponent(i(f))+r+encodeURIComponent(i(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n=4.0.0"},"homepage":"https://github.com/theturtle32/WebSocket-Node","keywords":["websocket","websockets","socket","networking","comet","push","RFC-6455","realtime","server","client"],"license":"Apache-2.0","main":"index","name":"websocket","repository":{"type":"git","url":"git+https://github.com/theturtle32/WebSocket-Node.git"},"scripts":{"gulp":"gulp","test":"tape test/unit/*.js"},"version":"1.0.34"}')},function(e,t,r){"use strict";var n=r(11).errors,i=r(169),o=r(352);r(353),r(354).polyfill(),r(355);var a=function(e,t){t=t||{},this.withCredentials=t.withCredentials,this.timeout=t.timeout||0,this.headers=t.headers,this.agent=t.agent,this.connected=!1;var r=!1!==t.keepAlive;this.host=e||"http://localhost:8545",this.agent||("https"===this.host.substring(0,5)?this.httpsAgent=new o.Agent({keepAlive:r}):this.httpAgent=new i.Agent({keepAlive:r}))};a.prototype.send=function(e,t){var r,i={method:"POST",body:JSON.stringify(e)},o={};if("undefined"!=typeof AbortController?r=new AbortController:"undefined"!=typeof window&&void 0!==window.AbortController&&(r=new window.AbortController),void 0!==r&&(i.signal=r.signal),"undefined"==typeof XMLHttpRequest){var a={httpsAgent:this.httpsAgent,httpAgent:this.httpAgent};this.agent&&(a.httpsAgent=this.agent.https,a.httpAgent=this.agent.http),"https"===this.host.substring(0,5)?i.agent=a.httpsAgent:i.agent=a.httpAgent}this.headers&&this.headers.forEach((function(e){o[e.name]=e.value})),o["Content-Type"]||(o["Content-Type"]="application/json"),this.withCredentials?i.credentials="include":i.credentials="omit",i.headers=o,this.timeout>0&&void 0!==r&&(this.timeoutId=setTimeout((function(){r.abort()}),this.timeout));fetch(this.host,i).then(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),e.json().then((function(e){t(null,e)})).catch((function(r){t(n.InvalidResponse(e))}))}.bind(this)).catch(function(e){void 0!==this.timeoutId&&clearTimeout(this.timeoutId),"AbortError"===e.name&&t(n.ConnectionTimeout(this.timeout)),t(n.InvalidConnection(this.host))}.bind(this))},a.prototype.disconnect=function(){},a.prototype.supportsSubscriptions=function(){return!1},e.exports=a},function(e,t,r){"use strict";(function(t,n,i){var o=r(170),a=r(90),s=r(171),f=r(61),u=r(350),c=s.IncomingMessage,d=s.readyStates;var l=e.exports=function(e){var r,n=this;f.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new t(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}(r,i),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};a(l,f.Writable),l.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===h.indexOf(r)&&(this._headers[r]={name:e,value:t})},l.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},l.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},l.prototype._onFinish=function(){var e=this;if(!e._destroyed){var r=e._opts,a=e._headers,s=null;"GET"!==r.method&&"HEAD"!==r.method&&(s=o.arraybuffer?u(t.concat(e._body)):o.blobConstructor?new n.Blob(e._body.map((function(e){return u(e)})),{type:(a["content-type"]||{}).value||""}):t.concat(e._body).toString());var f=[];if(Object.keys(a).forEach((function(e){var t=a[e].name,r=a[e].value;Array.isArray(r)?r.forEach((function(e){f.push([t,e])})):f.push([t,r])})),"fetch"===e._mode){var c=null;if(o.abortController){var l=new AbortController;c=l.signal,e._fetchAbortController=l,"requestTimeout"in r&&0!==r.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),r.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:f,body:s||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:c}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){n.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var h=e._xhr=new n.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in h&&(h.responseType=e._mode.split(":")[0]),"withCredentials"in h&&(h.withCredentials=!!r.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(h.timeout=r.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),f.forEach((function(e){h.setRequestHeader(e[0],e[1])})),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{h.send(s)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},l.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},l.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},l.prototype._write=function(e,t,r){this._body.push(e),r()},l.prototype.abort=l.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},l.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),f.Writable.prototype.end.call(this,e,t,r)},l.prototype.flushHeaders=function(){},l.prototype.setTimeout=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var h=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(1).Buffer,r(7),r(6))},function(e,t,r){"use strict";var n=r(1).Buffer;e.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i-1};function u(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 c(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function b(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function y(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:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||f(e))?this._bodyArrayBuffer=y(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):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=p(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function _(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)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},m.call(g.prototype),m.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];_.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,r){return new Promise((function(n,o){var a=new g(e,r);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function f(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new l,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new _(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",f),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",f)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=l,e.Request=g,e.Response=_),t.Headers=l,t.Request=g,t.Response=_,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:void 0)},function(e,t,r){"use strict";(function(n,i){var o,a,s,f=r(0)(r(2)); +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.8+1e68dce6 + */ +s=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,a=void 0,s=function(e,t){b[r]=e,b[r+1]=t,2===(r+=2)&&(a?a(y):_())},u="undefined"!=typeof window?window:void 0,c=u||{},d=c.MutationObserver||c.WebKitMutationObserver,l="undefined"==typeof self&&void 0!==n&&"[object process]"==={}.toString.call(n),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(y,1)}}var b=new Array(1e3);function y(){for(var e=0;e0&&(i=r),r=e[u++]);)switch(q++,"\n"===r?(H++,z=0):z++,U){case l:if("{"===r)U=p;else if("["===r)U=y;else if(!G(r))return K("Non-whitespace before {[.");continue;case g:case p:if(G(r))continue;if(U===g)N.push(w);else{if("}"===r){s({}),f(),U=N.pop()||h;continue}N.push(b)}if('"'!==r)return K('Malformed object key should start with " ');U=v;continue;case w:case b:if(G(r))continue;if(":"===r)U===b?(N.push(b),void 0!==o&&(s({}),a(o),o=void 0),D++):void 0!==o&&(a(o),o=void 0),U=h;else if("}"===r)void 0!==o&&(s(o),f(),o=void 0),f(),D--,U=N.pop()||h;else{if(","!==r)return K("Bad object");U===b&&N.push(b),void 0!==o&&(s(o),f(),o=void 0),U=g}continue;case y:case h:if(G(r))continue;if(U===y){if(s([]),D++,U=h,"]"===r){f(),D--,U=N.pop()||h;continue}N.push(m)}if('"'===r)U=v;else if("{"===r)U=p;else if("["===r)U=y;else if("t"===r)U=_;else if("f"===r)U=A;else if("n"===r)U=O;else if("-"===r)B+=r;else if("0"===r)B+=r,U=20;else{if(-1==="123456789".indexOf(r))return K("Bad value");B+=r,U=20}continue;case m:if(","===r)N.push(m),void 0!==o&&(s(o),f(),o=void 0),U=h;else{if("]"!==r){if(G(r))continue;return K("Bad array")}void 0!==o&&(s(o),f(),o=void 0),f(),D--,U=N.pop()||h}continue;case v:void 0===o&&(o="");var d=u-1;e:for(;;){for(;F>0;)if(L+=r,r=e.charAt(u++),4===F?(o+=String.fromCharCode(parseInt(L,16)),F=0,d=u-1):F++,!r)break e;if('"'===r&&!C){U=N.pop()||h,o+=e.substring(d,u-1);break}if(!("\\"!==r||C||(C=!0,o+=e.substring(d,u-1),r=e.charAt(u++))))break;if(C){if(C=!1,"n"===r?o+="\n":"r"===r?o+="\r":"t"===r?o+="\t":"f"===r?o+="\f":"b"===r?o+="\b":"u"===r?(F=1,L=""):o+=r,r=e.charAt(u++),d=u-1,r)continue;break}c.lastIndex=u;var V=c.exec(e);if(!V){u=e.length+1,o+=e.substring(d,u-1);break}if(u=V.index+1,!(r=e.charAt(V.index))){o+=e.substring(d,u-1);break}}continue;case _:if(!r)continue;if("r"!==r)return K("Invalid true started with t"+r);U=k;continue;case k:if(!r)continue;if("u"!==r)return K("Invalid true started with tr"+r);U=S;continue;case S:if(!r)continue;if("e"!==r)return K("Invalid true started with tru"+r);s(!0),f(),U=N.pop()||h;continue;case A:if(!r)continue;if("a"!==r)return K("Invalid false started with f"+r);U=E;continue;case E:if(!r)continue;if("l"!==r)return K("Invalid false started with fa"+r);U=x;continue;case x:if(!r)continue;if("s"!==r)return K("Invalid false started with fal"+r);U=P;continue;case P:if(!r)continue;if("e"!==r)return K("Invalid false started with fals"+r);s(!1),f(),U=N.pop()||h;continue;case O:if(!r)continue;if("u"!==r)return K("Invalid null started with n"+r);U=R;continue;case R:if(!r)continue;if("l"!==r)return K("Invalid null started with nu"+r);U=T;continue;case T:if(!r)continue;if("l"!==r)return K("Invalid null started with nul"+r);s(null),f(),U=N.pop()||h;continue;case M:if("."!==r)return K("Leading zero not followed by .");B+=r,U=20;continue;case 20:if(-1!=="0123456789".indexOf(r))B+=r;else if("."===r){if(-1!==B.indexOf("."))return K("Invalid number has two dots");B+=r}else if("e"===r||"E"===r){if(-1!==B.indexOf("e")||-1!==B.indexOf("E"))return K("Invalid number has two exponential");B+=r}else if("+"===r||"-"===r){if("e"!==i&&"E"!==i)return K("Invalid symbol in number");B+=r}else B&&(s(parseFloat(B)),f(),B=""),u--,U=N.pop()||h;continue;default:return K("Unknown state: "+U)}q>=I&&(n=0,void 0!==o&&o.length>65536&&(K("Max buffer length exceeded: textNode"),n=Math.max(n,o.length)),B.length>65536&&(K("Max buffer length exceeded: numberNode"),n=Math.max(n,B.length)),I=65536-n+q)}})),e(n.n).on((function(){if(U===l)return s({}),f(),void(j=!0);U===h&&0===D||K("Unexpected end"),void 0!==o&&(s(o),f(),o=void 0),j=!0}))}},function(e,t,r){r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return u}));var n=r(19),i=r(3),o=r(2),a=r(20),s=r(0);function f(){return new XMLHttpRequest}function u(e,t,r,f,u,c,d){var l=e(i.m).emit,h=e(i.b).emit,p=0,b=!0;function y(){if("2"===String(t.status)[0]){var e=t.responseText,r=(" "+e.substr(p)).substr(1);r&&l(r),p=Object(o.e)(e)}}function m(t){try{b&&e(i.c).emit(t.status,Object(a.a)(t.getAllResponseHeaders())),b=!1}catch(e){}}e(i.a).on((function(){t.onreadystatechange=null,t.abort()})),"onprogress"in t&&(t.onprogress=y),t.onreadystatechange=function(){switch(t.readyState){case 2:case 3:return m(t);case 4:m(t),"2"===String(t.status)[0]?(y(),e(i.n).emit()):h(Object(i.o)(t.status,t.responseText))}};try{for(var v in t.open(r,f,!0),c)t.setRequestHeader(v,c[v]);Object(n.a)(window.location,Object(n.b)(f))||t.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.withCredentials=d,t.send(u)}catch(e){window.setTimeout(Object(s.j)(h,Object(i.o)(void 0,void 0,e)),0)}}},function(e,t,r){function n(e,t){function r(t){return String(t.port||{"http:":80,"https:":443}[t.protocol||e.protocol])}return!!(t.protocol&&t.protocol!==e.protocol||t.host&&t.host!==e.host||t.host&&r(t)!==r(e))}function i(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}))},function(e,t,r){function n(e){var t={};return e&&e.split("\r\n").forEach((function(e){var r=e.indexOf(": ");t[e.substring(0,r)]=e.substring(r+2)})),t}r.d(t,"a",(function(){return n}))}]).default},"object"===(0,s.default)(t)&&"object"===(0,s.default)(e)?e.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(27)(e))},function(e,t,r){"use strict";var n=r(11).formatters,i=r(36),o=r(17);e.exports=function(e){var t=function(t){var r;return t.property?(e[t.property]||(e[t.property]={}),r=e[t.property]):r=e,t.methods&&t.methods.forEach((function(t){t instanceof i||(t=new i(t)),t.attachToObject(r),t.setRequestManager(e._requestManager)})),e};return t.formatters=n,t.utils=o,t.Method=i,t}},function(e,t,r){"use strict";(function(e){var t=r(0)(r(2)),n=function(e){var r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var i=t&&t.prototype instanceof l?t:l,o=Object.create(i.prototype),a=new A(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return x()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=c(e,t,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===d)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(e,r,a),o}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function l(){}function h(){}function p(){}var b={};f(b,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==r&&n.call(m,o)&&(b=m);var v=p.prototype=l.prototype=Object.create(b);function g(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,r){var i;this._invoke=function(o,a){function s(){return new r((function(i,s){!function i(o,a,s,f){var u=c(e[o],e,a);if("throw"!==u.type){var d=u.arg,l=d.value;return l&&"object"===(0,t.default)(l)&&n.call(l,"__await")?r.resolve(l.__await).then((function(e){i("next",e,s,f)}),(function(e){i("throw",e,s,f)})):r.resolve(l).then((function(e){d.value=e,s(d)}),(function(e){return i("throw",e,s,f)}))}f(u.arg)}(o,a,i,s)}))}return i=i?i.then(s,s):s()}}function _(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=c(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),f=n.call(o,"finallyLoc");if(s&&f){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}("object"===(0,t.default)(e)?e.exports:{});try{regeneratorRuntime=n}catch(e){"object"===("undefined"==typeof globalThis?"undefined":(0,t.default)(globalThis))?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}).call(this,r(27)(e))},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(11).errors,o=r(103),a=r(11).formatters;function s(e){return e}function f(e){o.call(this),this.id=null,this.callback=s,this.arguments=null,this.lastBlock=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}f.prototype=Object.create(o.prototype),f.prototype.constructor=f,f.prototype._extractCallback=function(e){if("function"==typeof e[e.length-1])return e.pop()},f.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw i.InvalidNumberOfParams(e.length,t.params,t.subscriptionName)},f.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map((function(t,r){return t?t(e[r]):e[r]})):e},f.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},f.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e)||s,this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},f.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.lastBlock=null,this.removeAllListeners()},f.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),r=this._toPayload(t);if(!r)return this;if(!this.options.requestManager.provider)return setTimeout((function(){var t=new Error("No provider set.");e.callback(t,null,e),e.emit("error",t)}),0),this;if(!this.options.requestManager.provider.on)return setTimeout((function(){var t=new Error("The current provider doesn't support subscriptions: "+e.options.requestManager.provider.constructor.name);e.callback(t,null,e),e.emit("error",t)}),0),this;if(this.lastBlock&&this.options.params&&"object"===(0,n.default)(this.options.params)&&(r.params[1]=this.options.params,r.params[1].fromBlock=a.inputBlockNumberFormatter(this.lastBlock+1)),this.id&&this.unsubscribe(),this.options.params=r.params[1],"logs"===r.params[0]&&r.params[1]&&"object"===(0,n.default)(r.params[1])&&r.params[1].hasOwnProperty("fromBlock")&&isFinite(r.params[1].fromBlock)){var i=Object.assign({},r.params[1]);this.options.requestManager.send({method:"eth_getLogs",params:[i]},(function(t,r){t?setTimeout((function(){e.callback(t,null,e),e.emit("error",t)}),0):r.forEach((function(t){var r=e._formatOutput(t);e.callback(null,r,e),e.emit("data",r)}))}))}return"object"===(0,n.default)(r.params[1])&&delete r.params[1].fromBlock,this.options.requestManager.send(r,(function(t,i){!t&&i?(e.id=i,e.method=r.params[0],e.options.requestManager.addSubscription(e,(function(t,r){t?(e.callback(t,!1,e),e.emit("error",t)):(Array.isArray(r)||(r=[r]),r.forEach((function(t){var r=e._formatOutput(t);if(e.lastBlock=r&&"object"===(0,n.default)(r)?r.blockNumber:null,"function"==typeof e.options.subscription.subscriptionHandler)return e.options.subscription.subscriptionHandler.call(e,r);e.emit("data",r),e.callback(null,r,e)})))})),e.emit("connected",i)):setTimeout((function(){e.callback(t,!1,e),e.emit("error",t)}),0)})),this},f.prototype.resubscribe=function(){this.options.requestManager.removeSubscription(this.id),this.id=null,this.subscribe(this.callback)},e.exports=f},function(e,t,r){"use strict";var n=r(2);Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionTypes=void 0,t.accessListify=E,t.computeAddress=_,t.parse=function(e){var t=(0,a.arrayify)(e);if(t[0]>127)return function(e){var t=c.decode(e);9!==t.length&&6!==t.length&&y.throwArgumentError("invalid raw transaction","rawTransaction",e);var r={nonce:v(t[0]).toNumber(),gasPrice:v(t[1]),gasLimit:v(t[2]),to:m(t[3]),value:v(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=o.BigNumber.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,a.hexZeroPad)(t[7],32),r.s=(0,a.hexZeroPad)(t[8],32),o.BigNumber.from(r.r).isZero()&&o.BigNumber.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,i=t.slice(0,6);0!==r.chainId&&(i.push((0,a.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);var s=(0,f.keccak256)(c.encode(i));try{r.from=k(s,{r:(0,a.hexlify)(r.r),s:(0,a.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,f.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){var t=c.decode(e.slice(1));8!==t.length&&11!==t.length&&y.throwArgumentError("invalid component count for transaction type: 1","payload",(0,a.hexlify)(e));var r={type:1,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),gasPrice:v(t[2]),gasLimit:v(t[3]),to:m(t[4]),value:v(t[5]),data:t[6],accessList:E(t[7])};if(8===t.length)return r;return r.hash=(0,f.keccak256)(e),R(r,t.slice(8),O),r}(t);case 2:return function(e){var t=c.decode(e.slice(1));9!==t.length&&12!==t.length&&y.throwArgumentError("invalid component count for transaction type: 2","payload",(0,a.hexlify)(e));var r=v(t[2]),n=v(t[3]),i={type:2,chainId:v(t[0]).toNumber(),nonce:v(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:v(t[4]),to:m(t[5]),value:v(t[6]),data:t[7],accessList:E(t[8])};if(9===t.length)return i;return i.hash=(0,f.keccak256)(e),R(i,t.slice(9),P),i}(t)}return y.throwError("unsupported transaction type: ".concat(t[0]),l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})},t.recoverAddress=k,t.serialize=function(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&y.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,u.checkProperties)(e,w);var r=[];g.forEach((function(t){var n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=(0,a.arrayify)((0,a.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&y.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,a.stripZeros)(n)).length>t.maxLength&&y.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push((0,a.hexlify)(n))}));var n=0;null!=e.chainId?"number"!=typeof(n=e.chainId)&&y.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,a.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2));0!==n&&(r.push((0,a.hexlify)(n)),r.push("0x"),r.push("0x"));if(!t)return c.encode(r);var i=(0,a.splitSignature)(t),o=27+i.recoveryParam;0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&y.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&y.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t);return r.push((0,a.hexlify)(o)),r.push((0,a.stripZeros)((0,a.arrayify)(i.r))),r.push((0,a.stripZeros)((0,a.arrayify)(i.s))),c.encode(r)}(e,t);switch(e.type){case 1:return O(e,t);case 2:return P(e,t)}return y.throwError("unsupported transaction type: ".concat(e.type),l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})};var i=r(362),o=r(105),a=r(37),s=r(369),f=r(175),u=r(177),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}i.default=e,r&&r.set(e,i);return i}(r(176)),d=r(375),l=r(32),h=r(378);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}var b,y=new l.Logger(h.version);function m(e){return"0x"===e?null:(0,i.getAddress)(e)}function v(e){return"0x"===e?s.Zero:o.BigNumber.from(e)}t.TransactionTypes=b,function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(b||(t.TransactionTypes=b={}));var g=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],w={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function _(e){var t=(0,d.computePublicKey)(e);return(0,i.getAddress)((0,a.hexDataSlice)((0,f.keccak256)((0,a.hexDataSlice)(t,1)),12))}function k(e,t){return _((0,d.recoverPublicKey)((0,a.arrayify)(e),t))}function S(e,t){var r=(0,a.stripZeros)(o.BigNumber.from(e).toHexString());return r.length>32&&y.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function A(e,t){return{address:(0,i.getAddress)(e),storageKeys:(t||[]).map((function(t,r){return 32!==(0,a.hexDataLength)(t)&&y.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(r,"]"),t),t.toLowerCase()}))}}function E(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&y.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),A(e[0],e[1])):A(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var r=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return A(t,Object.keys(r).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function x(e){return E(e).map((function(e){return[e.address,e.storageKeys]}))}function P(e,t){if(null!=e.gasPrice){var r=o.BigNumber.from(e.gasPrice),n=o.BigNumber.from(e.maxFeePerGas||0);r.eq(n)||y.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var s=[S(e.chainId||0,"chainId"),S(e.nonce||0,"nonce"),S(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),S(e.maxFeePerGas||0,"maxFeePerGas"),S(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",S(e.value||0,"value"),e.data||"0x",x(e.accessList||[])];if(t){var f=(0,a.splitSignature)(t);s.push(S(f.recoveryParam,"recoveryParam")),s.push((0,a.stripZeros)(f.r)),s.push((0,a.stripZeros)(f.s))}return(0,a.hexConcat)(["0x02",c.encode(s)])}function O(e,t){var r=[S(e.chainId||0,"chainId"),S(e.nonce||0,"nonce"),S(e.gasPrice||0,"gasPrice"),S(e.gasLimit||0,"gasLimit"),null!=e.to?(0,i.getAddress)(e.to):"0x",S(e.value||0,"value"),e.data||"0x",x(e.accessList||[])];if(t){var n=(0,a.splitSignature)(t);r.push(S(n.recoveryParam,"recoveryParam")),r.push((0,a.stripZeros)(n.r)),r.push((0,a.stripZeros)(n.s))}return(0,a.hexConcat)(["0x01",c.encode(r)])}function R(e,t,r){try{var n=v(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(e){y.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,a.hexZeroPad)(t[1],32),e.s=(0,a.hexZeroPad)(t[2],32);try{var i=(0,f.keccak256)(r(e));e.from=k(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAddress=m,t.getContractAddress=function(e){var t=null;try{t=m(e.from)}catch(t){u.throwArgumentError("missing from address","transaction",e)}var r=(0,n.stripZeros)((0,n.arrayify)(i.BigNumber.from(e.nonce).toHexString()));return m((0,n.hexDataSlice)((0,o.keccak256)((0,a.encode)([t,r])),12))},t.getCreate2Address=function(e,t,r){32!==(0,n.hexDataLength)(t)&&u.throwArgumentError("salt must be 32 bytes","salt",t);32!==(0,n.hexDataLength)(r)&&u.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r);return m((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",m(e),t,r])),12))},t.getIcapAddress=function(e){var t=(0,i._base16To36)(m(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+y("XE00"+t)+t},t.isAddress=function(e){try{return m(e),!0}catch(e){}return!1};var n=r(37),i=r(105),o=r(175),a=r(176),s=r(32),f=r(368),u=new s.Logger(f.version);function c(e){(0,n.isHexString)(e,20)||u.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),i=0;i<40;i++)r[i]=t[i].charCodeAt(0);for(var a=(0,n.arrayify)((0,o.keccak256)(r)),s=0;s<40;s+=2)a[s>>1]>>4>=8&&(t[s]=t[s].toUpperCase()),(15&a[s>>1])>=8&&(t[s+1]=t[s+1].toUpperCase());return"0x"+t.join("")}for(var d={},l=0;l<10;l++)d[String(l)]=String(l);for(var h=0;h<26;h++)d[String.fromCharCode(65+h)]=String(10+h);var p,b=Math.floor((p=9007199254740991,Math.log10?Math.log10(p):Math.log(p)/Math.LN10));function y(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return d[e]})).join("");t.length>=b;){var r=t.substring(0,b);t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n;return n}function m(e){var t=null;if("string"!=typeof e&&u.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==y(e)&&u.throwArgumentError("bad icap checksum","address",e),t=(0,i._base36To16)(e.substring(4));t.length<40;)t="0"+t;t=c("0x"+t)}else u.throwArgumentError("invalid address","address",e);return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="logger/5.6.0"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="bytes/5.6.1"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=t.FixedFormat=void 0,t.formatFixed=v,t.parseFixed=g;var i=n(r(2)),o=n(r(8)),a=n(r(9)),s=r(37),f=r(32),u=r(174),c=r(173),d=new f.Logger(u.version),l={},h=c.BigNumber.from(0),p=c.BigNumber.from(-1);function b(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),d.throwError(e,f.Logger.errors.NUMERIC_FAULT,i)}for(var y="0";y.length<256;)y+=y;function m(e){if("number"!=typeof e)try{e=c.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+y.substring(0,e):d.throwArgumentError("invalid decimal size","decimals",e)}function v(e,t){null==t&&(t=0);var r=m(t),n=(e=c.BigNumber.from(e)).lt(h);n&&(e=e.mul(p));for(var i=e.mod(r).toString();i.length2&&d.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&b("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&d.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new e(l,r,n,o)}}]),e}();t.FixedFormat=w;var _=function(){function e(t,r,n,i){(0,o.default)(this,e),t!==l&&d.throwError("cannot use FixedNumber constructor; use FixedNumber.from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,a.default)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&d.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(k.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(k.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&d.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+y.substring(0,t),this.format),i=S.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&d.throwArgumentError("invalid byte width","width",e);var t=c.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,c.isBigNumberish)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(v(t,r),w.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=w.from(r),i=g(t,n.decimals);!n.signed&&i.lt(h)&&b("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=(0,s.hexZeroPad)(o,n.width/8));var a=v(i,n.decimals);return new e(l,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=w.from(r);if((0,s.arrayify)(t).length>n.width/8)throw new Error("overflow");var i=c.BigNumber.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=v(i,n.decimals);return new e(l,o,a,n)}},{key:"from",value:function(t,r){if("string"==typeof t)return e.fromString(t,r);if((0,s.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(e){if(e.code!==f.Logger.errors.INVALID_ARGUMENT)throw e}return d.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}();t.FixedNumber=_;var k=_.from(1),S=_.from("0.5")},function(e,t,r){"use strict";(function(e,n,i){var o,a=r(0)(r(2)); +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +!function(){var s="input is invalid type",f="object"===("undefined"==typeof window?"undefined":(0,a.default)(window)),u=f?window:{};u.JS_SHA3_NO_WINDOW&&(f=!1);var c=!f&&"object"===("undefined"==typeof self?"undefined":(0,a.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":(0,a.default)(e))&&e.versions&&e.versions.node?u=n:c&&(u=self);var d=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,a.default)(i)&&i.exports,l=r(63),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),b=[4,1024,262144,67108864],y=[0,8,16,24],m=[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],v=[224,256,384,512],g=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,a.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new N(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new N(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return R["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return R["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){N.call(this,e,t,r)}N.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,i,o=this.blocks,f=this.byteCount,u=e.length,c=this.blockCount,d=0,l=this.s;d>2]|=e[d]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=f){for(this.start=n-f,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(e){var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(f=65536+((1023&f)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},N.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},N.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var f=new Uint32Array(e);a>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],f[e]=255&t,o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f},L.prototype=new N,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,f,u,c,d,l,h,p,b,y,v,g,w,_,k,S,A,E,x,P,O,R,T,M,I,B,C,j,U,N,L,F,D,q,z,H,K,G,V,W,J,X,Z,Y,$,Q,ee,te,re,ne,ie,oe,ae,se,fe,ue,ce;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(f<<1|u>>>31),r=o^(u<<1|f>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(c<<1|d>>>31),r=s^(d<<1|c>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=f^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=c^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=p^~y&g,e[1]=b^~v&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~g&_,e[3]=v^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&p,e[7]=k^~A&b,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~p&y,e[9]=A^~b&v,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(d)i.exports=R;else{for(M=0;M>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),d=s((function(e,t){var r=t;r.assert=f,r.toArray=c.toArray,r.zero2=c.zero2,r.toHex=c.toHex,r.encode=c.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-f:f,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,f=e.andln(3)+i&3,u=t.andln(3)+o&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?f:-f,r[0].push(a),s=0==(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==f?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o.default(e,"hex","le")}})),l=d.getNAF,h=d.getJSF,p=d.assert;function b(e,t){this.type=e,this.p=new o.default(t.p,16),this.red=t.prime?o.default.red(t.prime):o.default.mont(this.p),this.zero=new o.default(0).toRed(this.red),this.one=new o.default(1).toRed(this.red),this.two=new o.default(2).toRed(this.red),this.n=t.n&&new o.default(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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var y=b;function m(e,t){this.curve=e,this.type=t,this.precomputed=null}b.prototype.point=function(){throw new Error("Not implemented")},b.prototype.validate=function(){throw new Error("Not implemented")},b.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=l(t,1,this._bitLength),i=(1<=o;f--)a=(a<<1)+n[f];s.push(a)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o=0;s--){for(var f=0;s>=0&&0===o[s];s--)f++;if(s>=0&&f++,a=a.dblp(f),s<0)break;var u=o[s];p(0!==u),a="affine"===e.type?u>0?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):u>0?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},b.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,f=this._wnafT1,u=this._wnafT2,c=this._wnafT3,d=0;for(o=0;o=1;o-=2){var b=o-1,y=o;if(1===f[b]&&1===f[y]){var m=[t[b],null,null,t[y]];0===t[b].y.cmp(t[y].y)?(m[1]=t[b].add(t[y]),m[2]=t[b].toJ().mixedAdd(t[y].neg())):0===t[b].y.cmp(t[y].y.redNeg())?(m[1]=t[b].toJ().mixedAdd(t[y]),m[2]=t[b].add(t[y].neg())):(m[1]=t[b].toJ().mixedAdd(t[y]),m[2]=t[b].toJ().mixedAdd(t[y].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],g=h(r[b],r[y]);for(d=Math.max(g[0].length,d),c[b]=new Array(d),c[y]=new Array(d),a=0;a=0;o--){for(var A=0;o>=0;){var E=!0;for(a=0;a=0&&A++,k=k.dblp(A),o<0)break;for(a=0;a0?s=u[a][x-1>>1]:x<0&&(s=u[a][-x-1>>1].neg()),k="affine"===s.type?k.mixedAdd(s):k.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},m.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:f.add(u).neg()}},w.prototype.pointFromX=function(e,t){(e=new o.default(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},k.prototype.isInfinity=function(){return this.inf},k.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 r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},k.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,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},k.prototype.getX=function(){return this.x.fromRed()},k.prototype.getY=function(){return this.y.fromRed()},k.prototype.mul=function(e){return e=new o.default(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)},k.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},k.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},k.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))},k.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},k.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},v(S,y.BasePoint),w.prototype.jpoint=function(e,t,r){return new S(this,e,t,r)},S.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},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(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),d=n.redMul(u),l=f.redSqr().redIAdd(c).redISub(d).redISub(d),h=f.redMul(d.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},S.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),c=r.redMul(f),d=s.redSqr().redIAdd(u).redISub(c).redISub(c),l=s.redMul(c.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},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 r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},S.prototype.inspect=function(){return this.isInfinity()?"":""},S.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var A=s((function(e,t){var r=t;r.base=y,r.short=_,r.mont=null,r.edwards=null})),E=s((function(e,t){var r,n=t,i=d.assert;function o(e){"short"===e.type?this.curve=new A.short(e):"edwards"===e.type?this.curve=new A.edwards(e):this.curve=new A.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("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.default.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("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.default.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("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.default.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("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.default.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"]}),s("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.default.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"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.default.sha256,gRed:!1,g:["9"]}),s("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.default.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("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.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function x(e){if(!(this instanceof x))return new x(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=c.toArray(e.entropy,e.entropyEnc||"hex"),r=c.toArray(e.nonce,e.nonceEnc||"hex"),n=c.toArray(e.pers,e.persEnc||"hex");f(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var P=x;x.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},x.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=c.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var M=d.assert;function I(e,t){if(e instanceof I)return e;this._importDER(e,t)||(M(e.r&&e.s,"Signature without r or s"),this.r=new o.default(e.r,16),this.s=new o.default(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var B=I;function C(){this.place=0}function j(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function U(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}I.prototype._importDER=function(e,t){e=d.toArray(e,t);var r=new C;if(48!==e[r.place++])return!1;var n=j(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=j(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var s=j(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var f=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new o.default(a),this.s=new o.default(f),this.recoveryParam=null,!0},I.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=U(t),r=U(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];N(n,t.length),(n=n.concat(t)).push(2),N(n,r.length);var i=n.concat(r),o=[48];return N(o,i.length),o=o.concat(i),d.encode(o,e)};var L=function(){throw new Error("unsupported")},F=d.assert;function D(e){if(!(this instanceof D))return new D(e);"string"==typeof e&&(F(Object.prototype.hasOwnProperty.call(E,e),"Unknown curve "+e),e=E[e]),e instanceof E.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}var q=D;D.prototype.keyPair=function(e){return new T(this,e)},D.prototype.keyFromPrivate=function(e,t){return T.fromPrivate(this,e,t)},D.prototype.keyFromPublic=function(e,t){return T.fromPublic(this,e,t)},D.prototype.genKeyPair=function(e){e||(e={});for(var t=new P({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||L(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new o.default(2));;){var i=new o.default(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},D.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},D.prototype.sign=function(e,t,r,n){"object"===(0,i.default)(r)&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new o.default(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),f=e.toArray("be",a),u=new P({hash:this.hash,entropy:s,nonce:f,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new o.default(1)),d=0;;d++){var l=n.k?n.k(d):new o.default(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var h=this.g.mul(l);if(!h.isInfinity()){var p=h.getX(),b=p.umod(this.n);if(0!==b.cmpn(0)){var y=l.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var m=(h.getY().isOdd()?1:0)|(0!==p.cmp(b)?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),m^=1),new B({r:b,s:y,recoveryParam:m})}}}}}},D.prototype.verify=function(e,t,r,n){e=this._truncateToN(new o.default(e,16)),r=this.keyFromPublic(r,n);var i=(t=new B(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,f=a.invm(this.n),u=f.mul(e).umod(this.n),c=f.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},D.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new B(t,n);var i=this.n,a=new o.default(e),s=t.r,f=t.s,u=1&r,c=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");s=c?this.curve.pointFromX(s.add(this.curve.n),u):this.curve.pointFromX(s,u);var d=t.r.invm(i),l=i.sub(a).mul(d).umod(i),h=f.mul(d).umod(i);return this.g.mulAdd(l,s,h)},D.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new B(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var z=s((function(e,t){var r=t;r.version="6.5.4",r.utils=d,r.rand=function(){throw new Error("unsupported")},r.curve=A,r.curves=E,r.ec=q,r.eddsa=null})).ec;t.EC=z}).call(this,r(7))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="signing-key/5.6.2"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="transactions/5.6.2"},function(e,t,r){"use strict";var n=r(33),i=r(11),o=r(79).subscriptions,a=r(36),s=r(17),f=r(80),u=r(380),c=r(196),d=r(179),l=r(166),h=r(452),p=r(180),b=r(605),y=i.formatters,m=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},v=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},g=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},w=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},_=function(e){return"string"==typeof e[0]&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},k=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),e.personal.setRequestManager(r),e.accounts.setRequestManager(r),e.Contract._requestManager=e._requestManager,e.Contract.currentProvider=e._provider,!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager),e.ens._detectedAddress=null,e.ens._lastSyncCheck=null};var i,k,S,A=!1,E=null,x="latest",P=50,O=24,R=750,T=1e3,M=10,I=100;Object.defineProperty(this,"handleRevert",{get:function(){return A},set:function(t){A=t,e.Contract.handleRevert=A,j.forEach((function(e){e.handleRevert=A}))},enumerable:!0}),Object.defineProperty(this,"defaultCommon",{get:function(){return S},set:function(t){S=t,e.Contract.defaultCommon=S,j.forEach((function(e){e.defaultCommon=S}))},enumerable:!0}),Object.defineProperty(this,"defaultHardfork",{get:function(){return k},set:function(t){k=t,e.Contract.defaultHardfork=k,j.forEach((function(e){e.defaultHardfork=k}))},enumerable:!0}),Object.defineProperty(this,"defaultChain",{get:function(){return i},set:function(t){i=t,e.Contract.defaultChain=i,j.forEach((function(e){e.defaultChain=i}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingTimeout",{get:function(){return R},set:function(t){R=t,e.Contract.transactionPollingTimeout=R,j.forEach((function(e){e.transactionPollingTimeout=R}))},enumerable:!0}),Object.defineProperty(this,"transactionPollingInterval",{get:function(){return T},set:function(t){T=t,e.Contract.transactionPollingInterval=T,j.forEach((function(e){e.transactionPollingInterval=T}))},enumerable:!0}),Object.defineProperty(this,"transactionConfirmationBlocks",{get:function(){return O},set:function(t){O=t,e.Contract.transactionConfirmationBlocks=O,j.forEach((function(e){e.transactionConfirmationBlocks=O}))},enumerable:!0}),Object.defineProperty(this,"transactionBlockTimeout",{get:function(){return P},set:function(t){P=t,e.Contract.transactionBlockTimeout=P,j.forEach((function(e){e.transactionBlockTimeout=P}))},enumerable:!0}),Object.defineProperty(this,"blockHeaderTimeout",{get:function(){return M},set:function(t){M=t,e.Contract.blockHeaderTimeout=M,j.forEach((function(e){e.blockHeaderTimeout=M}))},enumerable:!0}),Object.defineProperty(this,"defaultAccount",{get:function(){return E},set:function(t){return t&&(E=s.toChecksumAddress(y.inputAddressFormatter(t))),e.Contract.defaultAccount=E,e.personal.defaultAccount=E,j.forEach((function(e){e.defaultAccount=E})),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return x},set:function(t){return x=t,e.Contract.defaultBlock=x,e.personal.defaultBlock=x,j.forEach((function(e){e.defaultBlock=x})),t},enumerable:!0}),Object.defineProperty(this,"maxListenersWarningThreshold",{get:function(){return I},set:function(t){e.currentProvider&&e.currentProvider.setMaxListeners&&(I=t,e.currentProvider.setMaxListeners(t))},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions.bind(e._requestManager),this.removeSubscriptionById=e._requestManager.removeSubscription.bind(e._requestManager),this.net=new f(this),this.net.getNetworkType=b.bind(this),this.accounts=new h(this),this.personal=new c(this),this.personal.defaultAccount=this.defaultAccount,this.maxListenersWarningThreshold=I;var B=this,C=function(){d.apply(this,arguments);var e=this,t=B.setProvider;B.setProvider=function(){t.apply(B,arguments),n.packageInit(e,[B])}};C.setProvider=function(){d.setProvider.apply(this,arguments)},C.prototype=Object.create(d.prototype),C.prototype.constructor=C,this.Contract=C,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.transactionBlockTimeout=this.transactionBlockTimeout,this.Contract.transactionConfirmationBlocks=this.transactionConfirmationBlocks,this.Contract.transactionPollingTimeout=this.transactionPollingTimeout,this.Contract.transactionPollingInterval=this.transactionPollingInterval,this.Contract.blockHeaderTimeout=this.blockHeaderTimeout,this.Contract.handleRevert=this.handleRevert,this.Contract._requestManager=this._requestManager,this.Contract._ethAccounts=this.accounts,this.Contract.currentProvider=this._requestManager.provider,this.Iban=l,this.abi=p,this.ens=new u(this);var j=[new a({name:"getNodeInfo",call:"web3_clientVersion"}),new a({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new a({name:"getCoinbase",call:"eth_coinbase",params:0}),new a({name:"isMining",call:"eth_mining",params:0}),new a({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:s.hexToNumber}),new a({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:y.outputSyncingFormatter}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:y.outputBigNumberFormatter}),new a({name:"getFeeHistory",call:"eth_feeHistory",params:3,inputFormatter:[s.numberToHex,y.inputBlockNumberFormatter,null]}),new a({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:s.hexToNumber}),new a({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[y.inputAddressFormatter,y.inputDefaultBlockNumberFormatter],outputFormatter:y.outputBigNumberFormatter}),new a({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[y.inputAddressFormatter,s.numberToHex,y.inputDefaultBlockNumberFormatter]}),new a({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[y.inputAddressFormatter,y.inputDefaultBlockNumberFormatter]}),new a({name:"getBlock",call:m,params:2,inputFormatter:[y.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:y.outputBlockFormatter}),new a({name:"getUncle",call:g,params:2,inputFormatter:[y.inputBlockNumberFormatter,s.numberToHex],outputFormatter:y.outputBlockFormatter}),new a({name:"getBlockTransactionCount",call:w,params:1,inputFormatter:[y.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getBlockUncleCount",call:_,params:1,inputFormatter:[y.inputBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:y.outputTransactionFormatter}),new a({name:"getTransactionFromBlock",call:v,params:2,inputFormatter:[y.inputBlockNumberFormatter,s.numberToHex],outputFormatter:y.outputTransactionFormatter}),new a({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:y.outputTransactionReceiptFormatter}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[y.inputAddressFormatter,y.inputDefaultBlockNumberFormatter],outputFormatter:s.hexToNumber}),new a({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null],abiCoder:p}),new a({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[y.inputTransactionFormatter]}),new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[y.inputTransactionFormatter],abiCoder:p}),new a({name:"sign",call:"eth_sign",params:2,inputFormatter:[y.inputSignFormatter,y.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new a({name:"call",call:"eth_call",params:2,inputFormatter:[y.inputCallFormatter,y.inputDefaultBlockNumberFormatter],abiCoder:p}),new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[y.inputCallFormatter],outputFormatter:s.hexToNumber}),new a({name:"submitWork",call:"eth_submitWork",params:3}),new a({name:"getWork",call:"eth_getWork",params:0}),new a({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[y.inputLogFormatter],outputFormatter:y.outputLogFormatter}),new a({name:"getChainId",call:"eth_chainId",params:0,outputFormatter:s.hexToNumber}),new a({name:"requestAccounts",call:"eth_requestAccounts",params:0,outputFormatter:s.toChecksumAddress}),new a({name:"getProof",call:"eth_getProof",params:3,inputFormatter:[y.inputAddressFormatter,y.inputStorageKeysFormatter,y.inputDefaultBlockNumberFormatter],outputFormatter:y.outputProofFormatter}),new a({name:"getPendingTransactions",call:"eth_pendingTransactions",params:0,outputFormatter:y.outputTransactionFormatter}),new a({name:"createAccessList",call:"eth_createAccessList",params:2,inputFormatter:[y.inputTransactionFormatter,y.inputDefaultBlockNumberFormatter]}),new o({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:y.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[y.inputLogFormatter],outputFormatter:y.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),"function"==typeof this.callback&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:y.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),"function"==typeof this.callback&&this.callback(null,t._isSyncing,this),setTimeout((function(){t.emit("data",e),"function"==typeof t.callback&&t.callback(null,e,t)}),0)):(this.emit("data",e),"function"==typeof t.callback&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout((function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),"function"==typeof t.callback&&t.callback(null,t._isSyncing,t))}),500))}}}})];j.forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount,t.transactionBlockTimeout=e.transactionBlockTimeout,t.transactionConfirmationBlocks=e.transactionConfirmationBlocks,t.transactionPollingTimeout=e.transactionPollingTimeout,t.transactionPollingInterval=e.transactionPollingInterval,t.handleRevert=e.handleRevert}))};n.addProviders(k),e.exports=k},function(e,t,r){"use strict";var n=r(381);e.exports=n},function(e,t,r){"use strict";var n=r(0),i=n(r(49)),o=n(r(104)),a=r(178),s=r(11).formatters,f=r(17),u=r(382),c=r(417),d=r(418);function l(e){this.eth=e;var t=null;this._detectedAddress=null,this._lastSyncCheck=null,Object.defineProperty(this,"registry",{get:function(){return new u(this)},enumerable:!0}),Object.defineProperty(this,"resolverMethodHandler",{get:function(){return new c(this.registry)},enumerable:!0}),Object.defineProperty(this,"registryAddress",{get:function(){return t},set:function(e){t=null!==e?s.inputAddressFormatter(e):e},enumerable:!0})}l.prototype.supportsInterface=function(e,t,r){return this.getResolver(e).then((function(e){return f.isHexStrict(t)||(t=f.sha3(t).slice(0,10)),e.methods.supportsInterface(t).call(r)})).catch((function(e){if("function"!=typeof r)throw e;r(e,null)}))},l.prototype.resolver=function(e,t){return this.registry.resolver(e,t)},l.prototype.getResolver=function(e,t){return this.registry.getResolver(e,t)},l.prototype.setResolver=function(e,t,r,n){return this.registry.setResolver(e,t,r,n)},l.prototype.setRecord=function(e,t,r,n,i,o){return this.registry.setRecord(e,t,r,n,i,o)},l.prototype.setSubnodeRecord=function(e,t,r,n,i,o,a){return this.registry.setSubnodeRecord(e,t,r,n,i,o,a)},l.prototype.setApprovalForAll=function(e,t,r,n){return this.registry.setApprovalForAll(e,t,r,n)},l.prototype.isApprovedForAll=function(e,t,r){return this.registry.isApprovedForAll(e,t,r)},l.prototype.recordExists=function(e,t){return this.registry.recordExists(e,t)},l.prototype.setSubnodeOwner=function(e,t,r,n,i){return this.registry.setSubnodeOwner(e,t,r,n,i)},l.prototype.getTTL=function(e,t){return this.registry.getTTL(e,t)},l.prototype.setTTL=function(e,t,r,n){return this.registry.setTTL(e,t,r,n)},l.prototype.getOwner=function(e,t){return this.registry.getOwner(e,t)},l.prototype.setOwner=function(e,t,r,n){return this.registry.setOwner(e,t,r,n)},l.prototype.getAddress=function(e,t){return this.resolverMethodHandler.method(e,"addr",[]).call(t)},l.prototype.setAddress=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setAddr",[t]).send(r,n)},l.prototype.getPubkey=function(e,t){return this.resolverMethodHandler.method(e,"pubkey",[],null,t).call(t)},l.prototype.setPubkey=function(e,t,r,n,i){return this.resolverMethodHandler.method(e,"setPubkey",[t,r]).send(n,i)},l.prototype.getContent=function(e,t){return this.resolverMethodHandler.method(e,"content",[]).call(t)},l.prototype.setContent=function(e,t,r,n){return this.resolverMethodHandler.method(e,"setContent",[t]).send(r,n)},l.prototype.getContenthash=function(e,t){return this.resolverMethodHandler.method(e,"contenthash",[],d.decode).call(t)},l.prototype.setContenthash=function(e,t,r,n){var i;try{i=d.encode(t)}catch(e){var o=new Error("Could not encode "+t+". See docs for supported hash protocols.");if("function"==typeof n)return void n(o,null);throw o}return this.resolverMethodHandler.method(e,"setContenthash",[i]).send(r,n)},l.prototype.getMultihash=function(e,t){return this.resolverMethodHandler.method(e,"multihash",[]).call(t)},l.prototype.setMultihash=function(e,t,r,n){return this.resolverMethodHandler.method(e,"multihash",[t]).send(r,n)},l.prototype.checkNetwork=(0,o.default)(i.default.mark((function e(){var t,r,n,o,s;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new Date/1e3,this._lastSyncCheck&&!(t-this._lastSyncCheck>3600)){e.next=9;break}return e.next=4,this.eth.getBlock("latest");case 4:if(r=e.sent,!((n=t-r.timestamp)>3600)){e.next=8;break}throw new Error("Network not synced; last block was "+n+" seconds ago");case 8:this._lastSyncCheck=t;case 9:if(!this.registryAddress){e.next=11;break}return e.abrupt("return",this.registryAddress);case 11:if(this._detectedAddress){e.next=20;break}return e.next=14,this.eth.net.getNetworkType();case 14:if(o=e.sent,void 0!==(s=a.addresses[o])){e.next=18;break}throw new Error("ENS is not supported on network "+o);case 18:return this._detectedAddress=s,e.abrupt("return",this._detectedAddress);case 20:return e.abrupt("return",this._detectedAddress);case 21:case"end":return e.stop()}}),e,this)}))),e.exports=l},function(e,t,r){"use strict";var n=r(179),i=r(191),o=r(78),a=r(11).formatters,s=r(17),f=r(415),u=r(416);function c(e){var t=this;this.ens=e,this.contract=e.checkNetwork().then((function(e){var r=new n(f,e);return r.setProvider(t.ens.eth.currentProvider),r}))}c.prototype.owner=function(e,t){return console.warn('Deprecated: Please use the "getOwner" method instead of "owner".'),this.getOwner(e,t)},c.prototype.getOwner=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.owner(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},c.prototype.setOwner=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setOwner(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},c.prototype.getTTL=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.ttl(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},c.prototype.setTTL=function(e,t,r,n){var a=new o(!0);return this.contract.then((function(n){return n.methods.setTTL(i.hash(e),t).send(r)})).then((function(e){"function"!=typeof n?a.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?a.reject(e):n(e,null)})),a.eventEmitter},c.prototype.setSubnodeOwner=function(e,t,r,n,f){var u=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeOwner(i.hash(e),t,a.inputAddressFormatter(r)).send(n)})).then((function(e){"function"!=typeof f?u.resolve(e):f(e,e)})).catch((function(e){"function"!=typeof f?u.reject(e):f(e,null)})),u.eventEmitter},c.prototype.setRecord=function(e,t,r,n,s,f){var u=new o(!0);return this.contract.then((function(o){return o.methods.setRecord(i.hash(e),a.inputAddressFormatter(t),a.inputAddressFormatter(r),n).send(s)})).then((function(e){"function"!=typeof f?u.resolve(e):f(e,e)})).catch((function(e){"function"!=typeof f?u.reject(e):f(e,null)})),u.eventEmitter},c.prototype.setSubnodeRecord=function(e,t,r,n,f,u,c){var d=new o(!0);return s.isHexStrict(t)||(t=s.sha3(t)),this.contract.then((function(o){return o.methods.setSubnodeRecord(i.hash(e),t,a.inputAddressFormatter(r),a.inputAddressFormatter(n),f).send(u)})).then((function(e){"function"!=typeof c?d.resolve(e):c(e,e)})).catch((function(e){"function"!=typeof c?d.reject(e):c(e,null)})),d.eventEmitter},c.prototype.setApprovalForAll=function(e,t,r,n){var i=new o(!0);return this.contract.then((function(n){return n.methods.setApprovalForAll(a.inputAddressFormatter(e),t).send(r)})).then((function(e){"function"!=typeof n?i.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?i.reject(e):n(e,null)})),i.eventEmitter},c.prototype.isApprovedForAll=function(e,t,r){var n=new o(!0);return this.contract.then((function(r){return r.methods.isApprovedForAll(a.inputAddressFormatter(e),a.inputAddressFormatter(t)).call()})).then((function(e){"function"!=typeof r?n.resolve(e):r(e,e)})).catch((function(e){"function"!=typeof r?n.reject(e):r(e,null)})),n.eventEmitter},c.prototype.recordExists=function(e,t){var r=new o(!0);return this.contract.then((function(t){return t.methods.recordExists(i.hash(e)).call()})).then((function(e){"function"!=typeof t?r.resolve(e):t(e,e)})).catch((function(e){"function"!=typeof t?r.reject(e):t(e,null)})),r.eventEmitter},c.prototype.resolver=function(e,t){return console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".'),this.getResolver(e,t)},c.prototype.getResolver=function(e,t){var r=this;return this.contract.then((function(t){return t.methods.resolver(i.hash(e)).call()})).then((function(e){var i=new n(u,e);if(i.setProvider(r.ens.eth.currentProvider),"function"!=typeof t)return i;t(i,i)})).catch((function(e){if("function"!=typeof t)throw e;t(e,null)}))},c.prototype.setResolver=function(e,t,r,n){var s=new o(!0);return this.contract.then((function(n){return n.methods.setResolver(i.hash(e),a.inputAddressFormatter(t)).send(r)})).then((function(e){"function"!=typeof n?s.resolve(e):n(e,e)})).catch((function(e){"function"!=typeof n?s.reject(e):n(e,null)})),s.eventEmitter},e.exports=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="logger/5.6.0"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="bytes/5.6.1"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=t.FixedFormat=void 0,t.formatFixed=v,t.parseFixed=g;var i=n(r(2)),o=n(r(8)),a=n(r(9)),s=r(15),f=r(16),u=r(183),c=r(182),d=new f.Logger(u.version),l={},h=c.BigNumber.from(0),p=c.BigNumber.from(-1);function b(e,t,r,n){var i={fault:t,operation:r};return void 0!==n&&(i.value=n),d.throwError(e,f.Logger.errors.NUMERIC_FAULT,i)}for(var y="0";y.length<256;)y+=y;function m(e){if("number"!=typeof e)try{e=c.BigNumber.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+y.substring(0,e):d.throwArgumentError("invalid decimal size","decimals",e)}function v(e,t){null==t&&(t=0);var r=m(t),n=(e=c.BigNumber.from(e)).lt(h);n&&(e=e.mul(p));for(var i=e.mod(r).toString();i.length2&&d.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>r.length-1&&b("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&d.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",o),new e(l,r,n,o)}}]),e}();t.FixedFormat=w;var _=function(){function e(t,r,n,i){(0,o.default)(this,e),t!==l&&d.throwError("cannot use FixedNumber constructor; use FixedNumber.from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,a.default)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&d.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=g(this._value,this.format.decimals),n=g(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(k.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(k.toFormat(r.format))),r}},{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&d.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+y.substring(0,t),this.format),i=S.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&d.throwArgumentError("invalid byte width","width",e);var t=c.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,s.hexZeroPad)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,c.isBigNumberish)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(v(t,r),w.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=w.from(r),i=g(t,n.decimals);!n.signed&&i.lt(h)&&b("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=i.toTwos(n.width).toHexString():(o=i.toHexString(),o=(0,s.hexZeroPad)(o,n.width/8));var a=v(i,n.decimals);return new e(l,o,a,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=w.from(r);if((0,s.arrayify)(t).length>n.width/8)throw new Error("overflow");var i=c.BigNumber.from(t);n.signed&&(i=i.fromTwos(n.width));var o=i.toTwos((n.signed?0:1)+n.width).toHexString(),a=v(i,n.decimals);return new e(l,o,a,n)}},{key:"from",value:function(t,r){if("string"==typeof t)return e.fromString(t,r);if((0,s.isBytes)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(e){if(e.code!==f.Logger.errors.INVALID_ARGUMENT)throw e}return d.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}();t.FixedNumber=_;var k=_.from(1),S=_.from("0.5")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="properties/5.6.0"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12)),u=r(107),c=r(15);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var l=function(e){(0,a.default)(r,e);var t=d(r);function r(e){return(0,i.default)(this,r),t.call(this,"address","address",e,!1)}return(0,o.default)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=(0,u.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return(0,u.getAddress)((0,c.hexZeroPad)(e.readValue().toHexString(),20))}}]),r}(r(23).Coder);t.AddressCoder=l},function(e,t,r){"use strict";(function(e,n,i){var o,a=r(0)(r(2)); +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */ +!function(){var s="input is invalid type",f="object"===("undefined"==typeof window?"undefined":(0,a.default)(window)),u=f?window:{};u.JS_SHA3_NO_WINDOW&&(f=!1);var c=!f&&"object"===("undefined"==typeof self?"undefined":(0,a.default)(self));!u.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":(0,a.default)(e))&&e.versions&&e.versions.node?u=n:c&&(u=self);var d=!u.JS_SHA3_NO_COMMON_JS&&"object"===(0,a.default)(i)&&i.exports,l=r(63),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),b=[4,1024,262144,67108864],y=[0,8,16,24],m=[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],v=[224,256,384,512],g=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(0,a.default)(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var k=function(e,t,r){return function(n){return new N(e,t,e).update(n)[r]()}},S=function(e,t,r){return function(n,i){return new N(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return R["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return R["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function L(e,t,r){N.call(this,e,t,r)}N.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}for(var n,i,o=this.blocks,f=this.byteCount,u=e.length,c=this.blockCount,d=0,l=this.s;d>2]|=e[d]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=f){for(this.start=n-f,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},N.prototype.encodeString=function(e){var t,r=(0,a.default)(e);if("string"!==r){if("object"!==r)throw new Error(s);if(null===e)throw new Error(s);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||h&&ArrayBuffer.isView(e)))throw new Error(s);t=!0}var n=0,i=e.length;if(t)n=i;else for(var o=0;o=57344?n+=3:(f=65536+((1023&f)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},N.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},N.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var f=new Uint32Array(e);a>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],f[e]=255&t,o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f},L.prototype=new N,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),N.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,f,u,c,d,l,h,p,b,y,v,g,w,_,k,S,A,E,x,P,O,R,T,M,I,B,C,j,U,N,L,F,D,q,z,H,K,G,V,W,J,X,Z,Y,$,Q,ee,te,re,ne,ie,oe,ae,se,fe,ue,ce;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(f<<1|u>>>31),r=o^(u<<1|f>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(c<<1|d>>>31),r=s^(d<<1|c>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=f^(l<<1|h>>>31),r=u^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=c^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=p^~y&g,e[1]=b^~v&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~g&_,e[3]=v^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&p,e[7]=k^~A&b,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~p&y,e[9]=A^~b&v,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=m[n],e[1]^=m[n+1]};if(d)i.exports=R;else{for(M=0;M>=8;return t}function f(e,t,r){for(var n=0,i=0;it+1+n&&a.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function c(e,t){if(0===e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var r=e[t]-247;t+1+r>e.length&&a.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var o=f(e,t+1,r);return t+1+r+o>e.length&&a.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+o)}if(e[t]>=192){var s=e[t]-192;return t+1+s>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,s)}if(e[t]>=184){var c=e[t]-183;t+1+c>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var d=f(e,t+1,c);return t+1+c+d>e.length&&a.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+c+d,result:(0,n.hexlify)(e.slice(t+1+c,t+1+c+d))}}if(e[t]>=128){var l=e[t]-128;return t+1+l>e.length&&a.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+l,result:(0,n.hexlify)(e.slice(t+1,t+1+l))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="rlp/5.6.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="address/5.6.1"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=function(e){(0,a.default)(r,e);var t=u(r);function r(e){var n;return(0,i.default)(this,r),(n=t.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,n}return(0,o.default)(r,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),r}(r(23).Coder);t.AnonymousCoder=c},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=function(e){(0,a.default)(r,e);var t=u(r);function r(e){return(0,i.default)(this,r),t.call(this,"bool","bool",e,!1)}return(0,o.default)(r,[{key:"defaultValue",value:function(){return!1}},{key:"encode",value:function(e,t){return e.writeValue(t?1:0)}},{key:"decode",value:function(e){return e.coerce(this.type,!e.readValue().isZero())}}]),r}(r(23).Coder);t.BooleanCoder=c},function(e,t,r){"use strict";var n=r(12);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12)),u=r(15);function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var d=function(e){(0,a.default)(r,e);var t=c(r);function r(e,n){var o;(0,i.default)(this,r);var a="bytes"+String(e);return(o=t.call(this,a,a,n,!1)).size=e,o}return(0,o.default)(r,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}},{key:"encode",value:function(e,t){var r=(0,u.arrayify)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}},{key:"decode",value:function(e){return e.coerce(this.name,(0,u.hexlify)(e.readBytes(this.size)))}}]),r}(r(23).Coder);t.FixedBytesCoder=d},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=function(e){(0,a.default)(r,e);var t=u(r);function r(e){return(0,i.default)(this,r),t.call(this,"null","",e,!1)}return(0,o.default)(r,[{key:"defaultValue",value:function(){return null}},{key:"encode",value:function(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}},{key:"decode",value:function(e){return e.readBytes(0),e.coerce(this.name,null)}}]),r}(r(23).Coder);t.NullCoder=c},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12)),u=r(38),c=r(188);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var l=function(e){(0,a.default)(r,e);var t=d(r);function r(e,n,o){var a;(0,i.default)(this,r);var s=(n?"int":"uint")+8*e;return(a=t.call(this,s,s,o,!1)).size=e,a.signed=n,a}return(0,o.default)(r,[{key:"defaultValue",value:function(){return 0}},{key:"encode",value:function(e,t){var r=u.BigNumber.from(t),n=c.MaxUint256.mask(8*e.wordSize);if(this.signed){var i=n.mask(8*this.size-1);(r.gt(i)||r.lt(i.add(c.One).mul(c.NegativeOne)))&&this._throwError("value out-of-bounds",t)}else(r.lt(c.Zero)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}},{key:"decode",value:function(e){var t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}]),r}(r(23).Coder);t.NumberCoder=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressZero=void 0;t.AddressZero="0x0000000000000000000000000000000000000000"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Zero=t.WeiPerEther=t.Two=t.One=t.NegativeOne=t.MinInt256=t.MaxUint256=t.MaxInt256=void 0;var n=r(38),i=n.BigNumber.from(-1);t.NegativeOne=i;var o=n.BigNumber.from(0);t.Zero=o;var a=n.BigNumber.from(1);t.One=a;var s=n.BigNumber.from(2);t.Two=s;var f=n.BigNumber.from("1000000000000000000");t.WeiPerEther=f;var u=n.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxUint256=u;var c=n.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");t.MinInt256=c;var d=n.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxInt256=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashZero=void 0;t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherSymbol=void 0;t.EtherSymbol="Ξ"},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;var i=n(r(8)),o=n(r(9)),a=n(r(187)),s=n(r(13)),f=n(r(14)),u=n(r(12)),c=r(81);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,f.default)(this,r)}}var l=function(e){(0,s.default)(r,e);var t=d(r);function r(e){return(0,i.default)(this,r),t.call(this,"string",e)}return(0,o.default)(r,[{key:"defaultValue",value:function(){return""}},{key:"encode",value:function(e,t){return(0,a.default)((0,u.default)(r.prototype),"encode",this).call(this,e,(0,c.toUtf8Bytes)(t))}},{key:"decode",value:function(e){return(0,c.toUtf8String)((0,a.default)((0,u.default)(r.prototype),"decode",this).call(this,e))}}]),r}(r(186).DynamicBytesCoder);t.StringCoder=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=function(e){var t=(0,o.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.HashZero]).slice(0,32))},t.parseBytes32String=function(e){var t=(0,i.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");var r=31;for(;0===t[r-1];)r--;return(0,o.toUtf8String)(t.slice(0,r))};var n=r(188),i=r(15),o=r(108)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;t.version="strings/5.6.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._nameprepTableA1=p,t._nameprepTableB2=b,t._nameprepTableC=y,t.nameprep=function(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();var t=(0,n.toUtf8CodePoints)(e);r=t.map((function(e){if(f.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];var t=b(e);return t||[e]})),t=r.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(t=(0,n.toUtf8CodePoints)((0,n._toUtf8String)(t),n.UnicodeNormalizationForm.NFKC)).forEach((function(e){if(y(e))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((function(e){if(p(e))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var r;var i=(0,n._toUtf8String)(t);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");if(i.length>63)throw new Error("too long");return i};var n=r(108);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function a(e,t){for(var r=0,n=0;n=(r+=i.l)&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}var s=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),f="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),u=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],c=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),d=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),l=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");for(var t=[],r=0;r1&&_.throwArgumentError("multiple matching functions","name",r),this.functions[n[0]]}var i=this.functions[m.FunctionFragment.fromString(e).format()];return i||_.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if((0,d.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events)if(t===this.getEventTopic(r))return this.events[r];_.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?_.throwArgumentError("no matching event","name",n):i.length>1&&_.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}var o=this.events[m.EventFragment.fromString(e).format()];return o||_.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if((0,d.isHexString)(e)){var t=(0,p.getStatic)(this.constructor,"getSighash");for(var r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}_.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));return 0===i.length?_.throwArgumentError("no matching error","name",n):i.length>1&&_.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}var o=this.errors[m.FunctionFragment.fromString(e).format()];return o||_.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,p.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,p.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"==typeof e&&(e=this.getError(e));var r=(0,d.arrayify)(t);return(0,d.hexlify)(r.slice(0,4))!==this.getSighash(e)&&_.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",(0,d.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,d.hexlify)((0,d.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,d.arrayify)(t);return(0,d.hexlify)(r.slice(0,4))!==this.getSighash(e)&&_.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",(0,d.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,d.hexlify)((0,d.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"==typeof e&&(e=this.getFunction(e));var r=(0,d.arrayify)(t),n=null,i="",o=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(c){}break;case 4:var f=(0,d.hexlify)(r.slice(0,4)),u=x[f];if(u)o=this._abiCoder.decode(u.inputs,r.slice(4)),a=u.name,s=u.signature,u.reason&&(n=o[0]),"Error"===a?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===a&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{var c=this.getError(f);o=this._abiCoder.decode(c.inputs,r.slice(4)),a=c.name,s=c.format()}catch(c){}}return _.throwError("call revert exception"+i,v.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,d.hexlify)(t),errorArgs:o,errorName:a,errorSignature:s,reason:n})}},{key:"encodeFunctionResult",value:function(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,d.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&_.throwError("too many arguments for "+e.format(),v.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var n=[];e.anonymous||n.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?(0,l.id)(t):"bytes"===e.type?(0,h.keccak256)((0,d.hexlify)(t)):("address"===e.type&&r._abiCoder.encode(["address"],[t]),(0,d.hexZeroPad)((0,d.hexlify)(t),32))};for(t.forEach((function(t,r){var o=e.inputs[r];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?_.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((function(e){return i(o,e)}))):n.push(i(o,t)):null!=t&&_.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}},{key:"encodeEventLog",value:function(e,t){var r=this;"string"==typeof e&&(e=this.getEvent(e));var n=[],i=[],o=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&&_.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)n.push((0,l.id)(s));else if("bytes"===e.type)n.push((0,h.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(r._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:n}}},{key:"decodeEventLog",value:function(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){var n=this.getEventTopic(e);(0,d.isHexString)(r[0],32)&&r[0].toLowerCase()===n||_.throwError("fragment/topic mismatch",v.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:r[0]}),r=r.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(m.ParamType.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=r?this._abiCoder.decode(i,(0,d.concat)(r)):null,f=this._abiCoder.decode(o,t,!0),u=[],c=0,l=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)u[t]=new E({_isIndexed:!0,hash:null});else if(a[t])u[t]=new E({_isIndexed:!0,hash:s[l++]});else try{u[t]=s[l++]}catch(e){u[t]=e}else try{u[t]=f[c++]}catch(e){u[t]=e}if(e.name&&null==u[e.name]){var r=u[t];r instanceof Error?Object.defineProperty(u,e.name,{enumerable:!0,get:function(){throw P("property ".concat(JSON.stringify(e.name)),r)}}):u[e.name]=r}}));for(var h=function(e){var t=u[e];t instanceof Error&&Object.defineProperty(u,e,{enumerable:!0,get:function(){throw P("index ".concat(e),t)}})},p=0;p256||t[2]&&t[2]!==String(n))&&y.throwArgumentError("invalid numeric width","type",e);var i=_.mask(r?n-1:n),o=r?i.add(w).mul(v):g;return function(t){var r=f.BigNumber.from(t);return(r.lt(o)||r.gt(i))&&y.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),(0,u.hexZeroPad)(r.toTwos(256).toHexString(),32)}}var a=e.match(/^bytes(\d+)$/);if(a){var d=parseInt(a[1]);return(0===d||d>32||a[1]!==String(d))&&y.throwArgumentError("invalid bytes width","type",e),function(t){return(0,u.arrayify)(t).length!==d&&y.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=(0,u.arrayify)(e),r=t.length%32;return r?(0,u.hexConcat)([t,m.slice(r)]):(0,u.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return(0,u.hexZeroPad)((0,s.getAddress)(e),32)};case"bool":return function(e){return e?k:S};case"bytes":return function(e){return(0,c.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function R(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var T=function(){function e(t){(0,o.default)(this,e),(0,d.defineReadOnly)(this,"types",Object.freeze((0,d.deepCopy)(t))),(0,d.defineReadOnly)(this,"_encoderCache",{}),(0,d.defineReadOnly)(this,"_types",{});var r={},n={},i={};Object.keys(t).forEach((function(e){r[e]={},n[e]=[],i[e]={}}));var a=function(e){var i={};t[e].forEach((function(o){i[o.name]&&y.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),O(a)||(n[a]||y.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),n[a].push(e),r[e][a]=!0)}))};for(var s in t)a(s);var f=Object.keys(n).filter((function(e){return 0===n[e].length}));for(var u in 0===f.length?y.throwArgumentError("missing primary type","types",t):f.length>1&&y.throwArgumentError("ambiguous primary types or unused types: ".concat(f.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),(0,d.defineReadOnly)(this,"primaryType",f[0]),function e(o,a){a[o]&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(r[o]).forEach((function(t){n[t]&&(e(t,a),Object.keys(a).forEach((function(e){i[e][t]=!0})))})),delete a[o]}(this.primaryType,{}),i){var c=Object.keys(i[u]);c.sort(),this._types[u]=R(u,t[u])+c.map((function(e){return R(e,t[e])})).join("")}}return(0,a.default)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,r=O(e);if(r)return r;var n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){var i=n[1],o=this.getEncoder(i),a=parseInt(n[3]);return function(e){a>=0&&e.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var r=e.map(o);return t._types[i]&&(r=r.map(c.keccak256)),(0,c.keccak256)((0,u.hexConcat)(r))}}var s=this.types[e];if(s){var f=(0,p.id)(this._types[e]);return function(e){var r=s.map((function(r){var n=r.name,i=r.type,o=t.getEncoder(i)(e[n]);return t._types[i]?(0,c.keccak256)(o):o}));return r.unshift(f),(0,u.hexConcat)(r)}}return y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||y.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return(0,c.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,r){var n=this;if(O(e))return r(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return n._visit(o,e,r)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=n._visit(a,t[o],r),e}),{}):y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,r,n){return e.from(r).hashStruct(t,n)}},{key:"hashDomain",value:function(t){var r=[];for(var n in t){var i=A[n];i||y.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(n)),"domain",t),r.push({name:n,type:i})}return r.sort((function(e,t){return E.indexOf(e.name)-E.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:r},t)}},{key:"encode",value:function(t,r,n){return(0,u.hexConcat)(["0x1901",e.hashDomain(t),e.from(r).hash(n)])}},{key:"hash",value:function(t,r,n){return(0,c.keccak256)(e.encode(t,r,n))}},{key:"resolveNames",value:function(t,r,n,o){return b(this,void 0,void 0,i.default.mark((function a(){var s,f,c;return i.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=(0,d.shallowCopy)(t),s={},t.verifyingContract&&!(0,u.isHexString)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(f=e.from(r)).visit(n,(function(e,t){return"address"!==e||(0,u.isHexString)(t,20)||(s[t]="0x"),t})),a.t0=i.default.keys(s);case 6:if((a.t1=a.t0()).done){a.next=13;break}return c=a.t1.value,a.next=10,o(c);case 10:s[c]=a.sent,a.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),n=f.visit(n,(function(e,t){return"address"===e&&s[t]?s[t]:t})),a.abrupt("return",{domain:t,value:n});case 16:case"end":return a.stop()}}),a)})))}},{key:"getPayload",value:function(t,r,n){e.hashDomain(t);var i={},o=[];E.forEach((function(e){var r=t[e];null!=r&&(i[e]=P[e](r),o.push({name:e,type:A[e]}))}));var a=e.from(r),s=(0,d.shallowCopy)(r);return s.EIP712Domain?y.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):s.EIP712Domain=o,a.encode(n),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(n,(function(e,t){if(e.match(/^bytes(\d*)/))return(0,u.hexlify)((0,u.arrayify)(t));if(e.match(/^u?int/))return f.BigNumber.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&y.throwArgumentError("invalid string","value",t),t}return y.throwArgumentError("unsupported type","type",e)}))}}}]),e}();t.TypedDataEncoder=T},function(e,t,r){"use strict";(function(e,t,n){var i=r(0)(r(2)); +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.5.7 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2016 + * @license MIT + */ +!function(){var r="object"===("undefined"==typeof window?"undefined":(0,i.default)(window))?window:{};!r.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":(0,i.default)(e))&&e.versions&&e.versions.node&&(r=t);for(var o=!r.JS_SHA3_NO_COMMON_JS&&"object"===(0,i.default)(n)&&n.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],f=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],c=["hex","buffer","arrayBuffer","array"],d=function(e,t,r){return function(n){return new k(e,t,e).update(n)[r]()}},l=function(e,t,r){return function(n,i){return new k(e,t,i).update(n)[r]()}},h=function(e,t){var r=d(e,t,"hex");r.create=function(){return new k(e,t,e)},r.update=function(e){return r.create().update(e)};for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}k.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var r,n,i=e.length,o=this.blocks,a=this.byteCount,f=this.blockCount,u=0,c=this.s;u>2]|=e[u]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(o[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)<=a){for(this.start=r-a,this.block=o[f],r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(S(r),o=0)}return i&&(e=r[o],i>0&&(f+=a[e>>4&15]+a[15&e]),i>1&&(f+=a[e>>12&15]+a[e>>8&15]),i>2&&(f+=a[e>>20&15]+a[e>>16&15])),f},k.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var f=new Uint32Array(e);a>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;s%r==0&&S(n)}return o&&(e=s<<2,t=n[a],o>0&&(f[e]=255&t),o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f};var S=function(e){var t,r,n,i,o,a,s,u,c,d,l,h,p,b,y,m,v,g,w,_,k,S,A,E,x,P,O,R,T,M,I,B,C,j,U,N,L,F,D,q,z,H,K,G,V,W,J,X,Z,Y,$,Q,ee,te,re,ne,ie,oe,ae,se,fe,ue,ce;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],d=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(d<<1|l>>>31),r=s^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=b^~m&g,e[1]=y^~v&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=m^~g&_,e[3]=v^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&b,e[7]=k^~A&y,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~b&m,e[9]=A^~y&v,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=f[n],e[1]^=f[n+1]};if(o)n.exports=b;else for(m=0;m>23,l=c>>21&3,h=c>>5&65535,p=31&c,b=t.mapStr.substr(h,p);if(0===l||n&&1&d)throw new Error("Illegal char "+u);1===l?o.push(b):2===l?o.push(i?b:u):3===l&&o.push(u)}return o.join("").normalize("NFC")}function n(t,n,o){void 0===o&&(o=!1);var a=r(t,o,n).split(".");return(a=a.map((function(t){return t.startsWith("xn--")?i(t=e.decode(t.substring(4)),o,!1):i(t,o,n),t}))).join(".")}function i(e,n,i){if("-"===e[2]&&"-"===e[3])throw new Error("Failed to validate "+e);if(e.startsWith("-")||e.endsWith("-"))throw new Error("Failed to validate "+e);if(e.includes("."))throw new Error("Failed to validate "+e);if(r(e,n,i)!==e)throw new Error("Failed to validate "+e);var o=e.codePointAt(0);if(t.mapChar(o)&2<<23)throw new Error("Label contains illegal character: "+o)}return{toUnicode:function(e,t){return void 0===t&&(t={}),n(e,!1,"useStd3ASCII"in t&&t.useStd3ASCII)},toAscii:function(t,r){void 0===r&&(r={});var i,o=!("transitional"in r)||r.transitional,a="useStd3ASCII"in r&&r.useStd3ASCII,s="verifyDnsLength"in r&&r.verifyDnsLength,f=n(t,o,a).split(".").map(e.toASCII),u=f.join(".");if(s){if(u.length<1||u.length>253)throw new Error("DNS name has wrong length: "+u);for(i=0;i63)throw new Error("DNS label has wrong length: "+c)}}return u}}}(e,t)}.apply(t,n))||(e.exports=i)},function(e,t,r){"use strict";var n;r(0)(r(2));void 0===(n=function(){return e=[new Uint32Array([2157250,2157314,2157378,2157442,2157506,2157570,2157634,0,2157698,2157762,2157826,2157890,2157954,0,2158018,0]),new Uint32Array([2179041,6291456,2179073,6291456,2179105,6291456,2179137,6291456,2179169,6291456,2179201,6291456,2179233,6291456,2179265,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,2113729,2197345,2197377,2113825,2197409,2197441,2113921,2197473,2114017,2197505,2197537,2197569,2197601,2197633,2197665]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672,23068672,0,0,0,0,23068672]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064]),new Uint32Array([2196001,2196033,2196065,2196097,2196129,2196161,2196193,2196225,2196257,2196289,2196321,2196353,2196385,2196417,2196449,2196481]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2177025,6291456,2177057,6291456,2177089,6291456,2177121,6291456,2177153,6291456,2177185,6291456,2177217,6291456,2177249,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456]),new Uint32Array([2134435,2134531,2134627,2134723,2134723,2134819,2134819,2134915,2134915,2135011,2105987,2135107,2135203,2135299,2131587,2135395]),new Uint32Array([0,0,0,0,0,0,0,6291456,2168673,2169249,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354,2147906,2147970,2148034,2148098,2148162,2148226,2148290,2148354]),new Uint32Array([2125219,2125315,2152834,2152898,2125411,2152962,2153026,2125506,2125507,2125603,2153090,2153154,2153218,2153282,2153346,2105348]),new Uint32Array([2203393,6291456,2203425,6291456,2203457,6291456,2203489,6291456,6291456,6291456,6291456,2203521,6291456,2181281,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,6291456,2145538,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,6291456]),new Uint32Array([2139426,2160834,2160898,2160962,2134242,2161026,2161090,2161154,2161218,2161282,2161346,2161410,2138658,2161474,2161538,2134722]),new Uint32Array([2119939,2124930,2125026,2106658,2125218,2128962,2129058,2129154,2129250,2129346,2129442,2108866,2108770,2150466,2150530,2150594]),new Uint32Array([2201601,6291456,2201633,6291456,2201665,6291456,2201697,6291456,2201729,6291456,2201761,6291456,2201793,6291456,2201825,6291456]),new Uint32Array([2193537,2193569,2193601,2193633,2193665,2193697,2193729,2193761,2193793,2193825,2193857,2193889,2193921,2193953,2193985,2194017]),new Uint32Array([6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2190561,6291456,2190593,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2190625,6291456,2190657,6291456,23068672]),new Uint32Array([2215905,2215937,2215969,2216001,2216033,2216065,2216097,2216129,2216161,2216193,2216225,2216257,2105441,2216289,2216321,2216353]),new Uint32Array([23068672,18884130,23068672,23068672,23068672,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2191233,2191265,2191297,2191329,2191361,2191393,2191425,2117377,2191457,2191489,2191521,2191553,2191585,2191617,2191649,2117953]),new Uint32Array([2132227,2132323,2132419,2132419,2132515,2132515,2132611,2132707,2132707,2132803,2132899,2132899,2132995,2132995,2133091,2133187]),new Uint32Array([0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10609889,10610785,10609921,10610817,2222241]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([2219969,2157121,2157441,2157505,2157889,2157953,2220001,2158465,2158529,10575617,2156994,2157058,2129923,2130019,2157122,2157186]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2185249,6291456,2185281,6291456,2185313,6291456,2185345,6291456,2185377,6291456,2185409,6291456,2185441,6291456,2185473,6291456]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,6291456,0]),new Uint32Array([2183361,6291456,2183393,6291456,2183425,6291456,2183457,6291456,2183489,6291456,2183521,6291456,2183553,6291456,2183585,6291456]),new Uint32Array([2192161,2192193,2192225,2192257,2192289,2192321,2192353,2192385,2192417,2192449,2192481,2192513,2192545,2192577,2192609,2192641]),new Uint32Array([2212001,2212033,2212065,2212097,2212129,2212161,2212193,2212225,2212257,2212289,2212321,2212353,2212385,2212417,2212449,2207265]),new Uint32Array([2249825,2249857,2249889,2249921,2249954,2250018,2250082,2250145,2250177,2250209,2250241,2250274,2250337,2250370,2250433,2250465]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147905,2147969,2148033,2148097,2148161,2148225,2148289,2148353]),new Uint32Array([10485857,6291456,2197217,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,23068672,23068672]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2180353,2180385,2144033,2180417,2180449,2180481,2180513,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,10610209,10610465,10610241,10610753,10609857]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2223842,2223906,2223970,2224034,2224098,2224162,2224226,2224290,2224354,2224418,2224482,2224546,2224610,2224674,2224738,2224802]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,18923650,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,18923714,23068672,23068672]),new Uint32Array([2126179,2125538,2126275,2126371,2126467,2125634,2126563,2105603,2105604,2125346,2126659,2126755,2126851,2098179,2098181,2098182]),new Uint32Array([2227426,2227490,2227554,2227618,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2192353,2240642,2240642,2240705,2240737,2240737,2240769,2240802,2240866,2240929,2240961,2240993,2241025,2241057,2241089,2241121]),new Uint32Array([6291456,2170881,2170913,2170945,6291456,2170977,6291456,2171009,2171041,6291456,6291456,6291456,2171073,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2132226,2132514,2163586,2132610,2160386,2133090,2133186,2160450,2160514,2160578,2133570,2106178,2160642,2133858,2160706,2160770]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10532162,10532226,10532290,10532354,10532418,10532482,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2098209,2108353,2108193,2108481,2170241,2111713,2105473,2105569,2105601,2112289,2112481,2098305,2108321,0,0,0]),new Uint32Array([2209121,2209153,2209185,2209217,2209249,2209281,2209313,2209345,2209377,2209409,2209441,2209473,2207265,2209505,2209537,2209569]),new Uint32Array([2189025,6291456,2189057,6291456,2189089,6291456,2189121,6291456,2189153,6291456,2189185,6291456,2189217,6291456,2189249,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2165764,2140004]),new Uint32Array([2215105,6291456,2215137,6291456,6291456,2215169,2215201,6291456,6291456,6291456,2215233,2215265,2215297,2215329,2215361,2215393]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,23068672,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([10505091,10505187,10505283,10505379,10505475,10505571,10505667,10505763,10505859,10505955,10506051,10506147,10506243,10506339,10506435,10506531]),new Uint32Array([2229730,2229794,2229858,2229922,2229986,2230050,2230114,2230178,2230242,2230306,2230370,2230434,2230498,2230562,2230626,2230690]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,0,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([6291456,6291456,6291456,6291456,10502115,10502178,10502211,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2190305,6291456,2190337,6291456,2190369,6291456,2190401,6291456,2190433,6291456,2190465,6291456,2190497,6291456,2190529,6291456]),new Uint32Array([2173793,2173985,2174017,6291456,2173761,2173697,6291456,2174689,6291456,2174017,2174721,6291456,6291456,2174753,2174785,2174817]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609,2100033]),new Uint32Array([2132898,2163842,2163906,2133282,2132034,2131938,2137410,2132802,2132706,2164866,2133282,2160578,2165186,2165186,6291456,6291456]),new Uint32Array([10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059,10501155,10501251,10501347,10501443]),new Uint32Array([2163458,2130978,2131074,2131266,2131362,2163522,2160130,2132066,2131010,2131106,2106018,2131618,2131298,2132034,2131938,2137410]),new Uint32Array([2212961,2116993,2212993,2213025,2213057,2213089,2213121,2213153,2213185,2213217,2213249,2209633,2213281,2213313,2213345,2213377]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2113729,2113825,2113921,2114017,2114113,2114209,2114305,2114401,2114497,2114593,2114689,2114785,2114881,2114977,2115073,2115169]),new Uint32Array([2238177,2238209,2238241,2238273,2238305,2238337,2238337,2217537,2238369,2238401,2238433,2238465,2215649,2238497,2238529,2238561]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0]),new Uint32Array([6291456,0,6291456,2145026,0,6291456,2145090,0,6291456,6291456,0,0,23068672,0,23068672,23068672]),new Uint32Array([2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129,2100289]),new Uint32Array([6291456,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0]),new Uint32Array([2187681,2187713,2187745,2187777,2187809,2187841,2187873,2187905,2187937,2187969,2188001,2188033,2188065,2188097,2188129,2188161]),new Uint32Array([0,10554498,10554562,10554626,10554690,10554754,10554818,10554882,10554946,10555010,10555074,6291456,6291456,0,0,0]),new Uint32Array([2235170,2235234,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0]),new Uint32Array([2181153,6291456,2188897,6291456,6291456,2188929,6291456,6291456,6291456,6291456,6291456,6291456,2111905,2100865,2188961,2188993]),new Uint32Array([2100833,2100897,0,0,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,2112289]),new Uint32Array([6291456,2172833,6291456,2172865,2172897,2172929,2172961,6291456,2172993,6291456,2173025,6291456,2173057,6291456,2173089,6291456]),new Uint32Array([6291456,0,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,2190721]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456]),new Uint32Array([2184993,6291456,2185025,6291456,2185057,6291456,2185089,6291456,2185121,6291456,2185153,6291456,2185185,6291456,2185217,6291456]),new Uint32Array([2115265,2115361,2115457,2115553,2115649,2115745,2115841,2115937,2116033,2116129,2116225,2116321,2150658,2150722,2200225,6291456]),new Uint32Array([2168321,6291456,2168353,6291456,2168385,6291456,2168417,6291456,2168449,6291456,2168481,6291456,2168513,6291456,2168545,6291456]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,0,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2186625,0,0,6291456,6291456,2186657,2186689,2186721,2173505,0,10496067,10496163,10496259]),new Uint32Array([2178785,6291456,2178817,6291456,2178849,6291456,2178881,6291456,2178913,6291456,2178945,6291456,2178977,6291456,2179009,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2097152,0,0,0,2097152,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2197857,2197889,2197921,2197953,2197985,2198017,0,0,2198049,2198081,2198113,2198145,2198177,2198209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2098209,2167297,2111137,6291456]),new Uint32Array([2171393,6291456,2171425,6291456,2171457,6291456,2171489,6291456,2171521,6291456,2171553,6291456,2171585,6291456,2171617,6291456]),new Uint32Array([2206753,2206785,2195457,2206817,2206849,2206881,2206913,2197153,2197153,2206945,2117857,2206977,2207009,2207041,2207073,2207105]),new Uint32Array([0,0,0,0,0,0,0,23068672,0,0,0,0,2144834,2144898,0,2144962]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,0,2105505,2098241]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,2202049,6291456,2202081,6291456,2202113,6291456,2202145,6291456,2202177,6291456,2202209,6291456,2202241,6291456]),new Uint32Array([10501155,10501251,10501347,10501443,10501539,10501635,10501731,10501827,10501923,10502019,2141731,2105505,2098177,2155586,2166530,0]),new Uint32Array([2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441]),new Uint32Array([2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330,2146882,2146946,2147010,2147074,2147138,2147202,2147266,2147330]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10502307,10502403,10502499,10502595,10502691,10502787,10502883,10502979,10503075,10503171,10503267,10503363,10503459,10503555,10503651,10503747]),new Uint32Array([2179937,2179969,2180001,2180033,2156545,2180065,2156577,2180097,2180129,2180161,2180193,2180225,2180257,2180289,2156737,2180321]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,0,0,6291456,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([2227682,2227746,2227810,2227874,2227938,2228002,2228066,2228130,2228194,2228258,2228322,2228386,2228450,2228514,2228578,2228642]),new Uint32Array([2105601,2169121,2108193,2170049,2181025,2181057,2112481,2108321,2108289,2181089,2170497,2100865,2181121,2173601,2173633,2173665]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180641,6291456,6291456,6291456]),new Uint32Array([0,6291456,6291456,6291456,0,6291456,0,6291456,0,0,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2178273,6291456,2178305,6291456,2178337,6291456,2178369,6291456,2178401,6291456,2178433,6291456,2178465,6291456,2178497,6291456]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2237377,2237409,2236225,2237441,2237473,2217441,2215521,2215553,2217473,2237505,2237537,2209697,2237569,2215585,2237601,2237633]),new Uint32Array([2221985,2165601,2165601,2165665,2165665,2222017,2222017,2165729,2165729,2158913,2158913,2158913,2158913,2097281,2097281,2105921]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2149634,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2176897,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2176929,6291456,2176961,6291456,2176993,6291456]),new Uint32Array([2172641,6291456,2172673,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2172705,2172737,6291456,2172769,2172801,6291456]),new Uint32Array([2099173,2104196,2121667,2099395,2121763,2152258,2152322,2098946,2152386,2121859,2121955,2099333,2122051,2104324,2099493,2122147]),new Uint32Array([6291456,6291456,6291456,2145794,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2145858,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,0,0,6291456,0]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,0,2097505,2105889,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2239074,2239138,2239201,2239233,2239265,2239297,2239329,2239361,0,2239393,2239425,2239425,2239458,2239521,2239553,2209569]),new Uint32Array([14680064,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,6291456,23068672]),new Uint32Array([2108321,2108289,2113153,2098209,2180897,2180929,2180961,2111137,2098241,2108353,2170241,2170273,2180993,2105825,6291456,2105473]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146114,6291456,6291456,6291456,0,0,0]),new Uint32Array([2105921,2105921,2105921,2222049,2222049,2130977,2130977,2130977,2130977,2160065,2160065,2160065,2160065,2097729,2097729,2097729]),new Uint32Array([2218145,2214785,2207937,2218177,2218209,2192993,2210113,2212769,2218241,2218273,2216129,2218305,2216161,2218337,2218369,2218401]),new Uint32Array([0,0,0,2156546,2156610,2156674,2156738,2156802,0,0,0,0,0,2156866,23068672,2156930]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2213409,2213441,2213473,2213505,2213537,2213569,2213601,2213633,2213665,2195681,2213697,2213729,2213761,2213793,2213825,2213857]),new Uint32Array([2100033,2099233,2122017,2200673,2098113,2121537,2103201,2200705,2104033,2121857,2121953,2122401,2099649,2099969,2123009,2100129]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2201857,6291456,2201889,6291456,2201921,6291456,2201953,6291456,2201985,6291456,2202017,6291456,2176193,2176257,23068672,23068672]),new Uint32Array([6291456,6291456,23068672,23068672,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2188193,2188225,2188257,2188289,2188321,2188353,2188385,2188417,2188449,2188481,2188513,2188545,2188577,2188609,2188641,0]),new Uint32Array([10554529,2221089,0,10502113,10562017,10537921,10538049,2221121,2221153,0,0,0,0,0,0,0]),new Uint32Array([2213889,2213921,2213953,2213985,2214017,2214049,2214081,2194177,2214113,2214145,2214177,2214209,2214241,2214273,2214305,2214337]),new Uint32Array([2166978,2167042,2099169,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2180545,6291456,6291456,6291456]),new Uint32Array([10518915,10519011,10519107,10519203,2162242,2162306,2159554,2162370,2159362,2159618,2105922,2162434,2159746,2162498,2159810,2159874]),new Uint32Array([2161730,2161794,2135586,2161858,2161922,2137186,2131810,2160290,2135170,2161986,2137954,2162050,2162114,2162178,10518723,10518819]),new Uint32Array([10506627,10506723,10506819,10506915,10507011,10507107,10507203,10507299,10507395,10507491,10507587,10507683,10507779,10507875,10507971,10508067]),new Uint32Array([6291456,23068672,23068672,23068672,0,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2175873,2175905,2175937,2175969,2176001,2176033,2176065,2176097,2176129,2176161,2176193,2176225,2176257,2176289,2176321,2176353]),new Uint32Array([2140006,2140198,2140390,2140582,2140774,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,23068672,23068672,23068672]),new Uint32Array([2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241]),new Uint32Array([0,23068672,0,0,0,0,0,0,0,2145154,2145218,2145282,6291456,0,2145346,0]),new Uint32Array([0,0,0,0,10531458,10495395,2148545,2143201,2173473,2148865,2173505,0,2173537,0,2173569,2149121]),new Uint32Array([10537282,10495683,2148738,2148802,2148866,0,6291456,2148930,2186593,2173473,2148737,2148865,2148802,10495779,10495875,10495971]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2215425,2215457,2215489,2215521,2215553,2215585,2215617,2215649,2215681,2215713,2215745,2215777,2192033,2215809,2215841,2215873]),new Uint32Array([2242049,2242081,2242113,2242145,2242177,2242209,2242241,2242273,2215937,2242305,2242338,2242401,2242433,2242465,2242497,2216001]),new Uint32Array([10554529,2221089,0,0,10562017,10502113,10538049,10537921,2221185,10489601,10489697,10609889,10609921,2141729,2141793,10610273]),new Uint32Array([2141923,2142019,2142115,2142211,2142307,2142403,2142499,2142595,2142691,0,0,0,0,0,0,0]),new Uint32Array([0,2221185,2221217,10609857,10609857,10489601,10489697,10609889,10609921,2141729,2141793,2221345,2221377,2221409,2221441,2187105]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18923970,23068672,23068672,23068672,0,6291456,6291456]),new Uint32Array([2183105,6291456,2183137,6291456,2183169,6291456,2183201,6291456,2183233,6291456,2183265,6291456,2183297,6291456,2183329,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2134434,2134818,2097666,2097186,2097474,2097698,2105986,2131586,2132450,2131874,2131778,2135970,2135778,2161602,2136162,2161666]),new Uint32Array([2236865,2236897,2236930,2236993,2237025,2235681,2237058,2237121,2237153,2237185,2237217,2217281,2237250,2191233,2237313,2237345]),new Uint32Array([2190049,6291456,2190081,6291456,2190113,6291456,2190145,6291456,2190177,6291456,2190209,6291456,2190241,6291456,2190273,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2101922,2102050,2102178,2102306,10498755,10498851,10498947,10499043,10499139,10499235,10499331,10499427,10499523,10489604,10489732,10489860]),new Uint32Array([2166914,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2181601,2170561,2181633,2181665,2170753,2181697,2172897,2170881,2181729,2170913,2172929,2113441,2181761,2181793,2171009,2173761]),new Uint32Array([0,2105921,2097729,2106081,0,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2248001,2248033,2248066,2248130,2248193,2248226,2248289,2248322,2248385,2248417,2216673,2248450,2248514,2248577,2248610,2248673]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([2169729,6291456,2169761,6291456,2169793,6291456,2169825,6291456,2169857,2169889,6291456,2169921,6291456,2143329,6291456,2098305]),new Uint32Array([2162178,2163202,2163266,2135170,2136226,2161986,2137954,2159426,2159490,2163330,2159554,2163394,2159682,2139522,2136450,2159746]),new Uint32Array([2173953,2173985,0,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2174209,2174241,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,4271169,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2174273]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,6291456,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,2190785,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2189793,6291456,2189825,6291456,2189857,6291456,2189889,6291456,2189921,6291456,2189953,6291456,2189985,6291456,2190017,6291456]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,0,2098305,2108321,2108289,2100865,2113153,2108481,2113345,0,2098209,2111137]),new Uint32Array([2172129,6291456,2172161,6291456,2172193,6291456,2172225,6291456,2172257,6291456,2172289,6291456,2172321,6291456,2172353,6291456]),new Uint32Array([2214753,6291456,2214785,6291456,6291456,2214817,2214849,2214881,2214913,2214945,2214977,2215009,2215041,2215073,2194401,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([10610305,10610337,10575617,2221761,10610401,10610433,10502177,0,10610465,10610497,10610529,10610561,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2187105,2187137,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2199393,2199425,2199457,2199489,2199521,2199553,2199585,2199617,2199649,2199681,2199713,2199745,2199777,2199809,2199841,0]),new Uint32Array([2217249,2217281,2217313,2217345,2217377,2217409,2217441,2217473,2215617,2217505,2217537,2217569,2214753,2217601,2217633,2217665]),new Uint32Array([2170273,2170305,6291456,2170337,2170369,6291456,2170401,2170433,2170465,6291456,6291456,6291456,2170497,2170529,6291456,2170561]),new Uint32Array([2188673,6291456,2188705,2188737,2188769,6291456,6291456,2188801,6291456,2188833,6291456,2188865,6291456,2180929,2181505,2180897]),new Uint32Array([10489988,10490116,10490244,10490372,10490500,10490628,10490756,10490884,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2147393,2147457,2147521,2147585,2147649,2147713,2147777,2147841]),new Uint32Array([23068672,23068672,0,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2241153,2241185,2241217,2215809,2241250,2241313,2241345,2241377,2217921,2241377,2241409,2215873,2241441,2241473,2241505,2241537]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220417,2220417,2220449,2220449,2220481,2220481,2220513,2220513,2220545,2220545,2220577,2220577,2220609,2220609,2220641,2220641]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2144002,0,6291456,6291456,0,0,6291456,6291456,6291456]),new Uint32Array([2167105,2167137,2167169,2167201,2167233,2167265,2167297,2167329,2167361,2167393,2167425,2167457,2167489,2167521,2167553,2167585]),new Uint32Array([10575521,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2234146,2234210,2234274,2234338,2234402,2234466,2234530,2234594,2234658,2234722,2234786,2234850,2234914,2234978,2235042,2235106]),new Uint32Array([0,0,0,0,0,0,0,2180577,0,0,0,0,0,2180609,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456]),new Uint32Array([2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2242529,2242561,2242593,2242625,2242657,2242689,2242721,2242753,2207937,2218177,2242785,2242817,2242849,2242882,2242945,2242977]),new Uint32Array([2118049,2105345,2118241,2105441,2118433,2118529,2118625,2118721,2118817,2200257,2200289,2191809,2200321,2200353,2200385,2200417]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2185505,6291456,2185537,6291456,2185569,6291456,2185601,6291456,2185633,6291456,2185665,6291456,2185697,6291456,2185729,6291456]),new Uint32Array([2231970,2232034,2232098,2232162,2232226,2232290,2232354,2232418,2232482,2232546,2232610,2232674,2232738,2232802,2232866,2232930]),new Uint32Array([2218625,2246402,2246466,2246530,2246594,2246657,2246689,2246689,2218657,2219681,2246721,2246753,2246785,2246818,2246881,2208481]),new Uint32Array([2197025,2197057,2197089,2197121,2197153,2197185,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2219137,2216961,2219169,2219201,2219233,2219265,2219297,2217025,2215041,2219329,2217057,2219361,2217089,2219393,2197153,2219426]),new Uint32Array([23068672,23068672,23068672,0,0,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713]),new Uint32Array([2243522,2243585,2243617,2243649,2243681,2210113,2243713,2243746,2243810,2243874,2243937,2243970,2244033,2244065,2244097,2244129]),new Uint32Array([2178017,6291456,2178049,6291456,2178081,6291456,2178113,6291456,2178145,6291456,2178177,6291456,2178209,6291456,2178241,6291456]),new Uint32Array([10553858,2165314,10518722,6291456,10518818,0,10518914,2130690,10519010,2130786,10519106,2130882,10519202,2165378,10554050,2165506]),new Uint32Array([0,0,2135491,2135587,2135683,2135779,2135875,2135971,2135971,2136067,2136163,2136259,2136355,2136355,2136451,2136547]),new Uint32Array([23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2220033,2220033,2220065,2220065,2220065,2220065,2220097,2220097,2220097,2220097,2220129,2220129,2220129,2220129,2220161,2220161]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2100897,2100898,2100899,2150018,2100865,2100866,2100867,2100868,2150082,2108481,2109858,2109859,2105569,2105505,2098241,2105601]),new Uint32Array([2097217,2097505,2097505,2097505,2097505,2165570,2165570,2165634,2165634,2165698,2165698,2097858,2097858,0,0,2097152]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([10503843,10503939,10504035,10504131,10504227,10504323,10504419,10504515,10504611,10504707,10504803,10504899,10504995,10491140,10491268,0]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,2235297,2220769,2235329,2235361]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2222401,2222433,2222465,10531394,2222497,2222529,2222561,0,2222593,2222625,2222657,2222689,2222721,2222753,2222785,0]),new Uint32Array([2184481,6291456,2184513,6291456,2184545,6291456,2184577,6291456,2184609,6291456,2184641,6291456,2184673,6291456,2184705,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2105570,2156034,2126947,2156098,2153666,2127043,2127139,2156162,0,2127235,2156226,2156290,2156354,2156418,2127331,2127427]),new Uint32Array([2215905,2207041,2153185,2241569,2241601,2241633,2241665,2241697,2241730,2241793,2241825,2241857,2241889,2241921,2241954,2242017]),new Uint32Array([2203777,6291456,2203809,6291456,2203841,6291456,2203873,6291456,2203905,6291456,2173121,2180993,2181249,2203937,2181313,0]),new Uint32Array([2168577,6291456,2168609,6291456,2168641,6291456,2168673,6291456,2168705,6291456,2168737,6291456,2168769,6291456,2168801,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,0,0]),new Uint32Array([2210113,2195521,2210145,2210177,2210209,2210241,2210273,2210305,2210337,2210369,2210401,2210433,2210465,2210497,2210529,2210561]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2228706,2228770,2228834,2228898,2228962,2229026,2229090,2229154,2229218,2229282,2229346,2229410,2229474,2229538,2229602,2229666]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,18874368,18874368,18874368,0,0]),new Uint32Array([2133089,2133281,2133281,2133281,2133281,2160577,2160577,2160577,2160577,2097441,2097441,2097441,2097441,2133857,2133857,2133857]),new Uint32Array([6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089]),new Uint32Array([2178529,6291456,2178561,6291456,2178593,6291456,2178625,6291456,2178657,6291456,2178689,6291456,2178721,6291456,2178753,6291456]),new Uint32Array([2221025,2221025,2221057,2221057,2159329,2159329,2159329,2159329,2097217,2097217,2158914,2158914,2158978,2158978,2159042,2159042]),new Uint32Array([2208161,2208193,2208225,2208257,2194433,2208289,2208321,2208353,2208385,2208417,2208449,2208481,2208513,2208545,2208577,2208609]),new Uint32Array([2169217,6291456,2169249,6291456,2169281,6291456,2169313,6291456,2169345,6291456,2169377,6291456,2169409,6291456,2169441,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2133187,2133283,2133283,2133379,2133475,2133571,2133667,2133667,2133763,2133859,2133955,2134051,2134147,2134147,2134243,2134339]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,0]),new Uint32Array([2193089,2193121,2193153,2193185,2117665,2117569,2193217,2193249,2193281,2193313,2193345,2193377,2193409,2193441,2193473,2193505]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184225,6291456,2184257,6291456,2184289,6291456,2184321,6291456,2184353,6291456,2184385,6291456,2184417,6291456,2184449,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2100833,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2200801,2200833,2200865,0]),new Uint32Array([23068672,23068672,23068672,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0]),new Uint32Array([2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2181153,2105505,2181185,2167617,2180993]),new Uint32Array([2160002,2160066,2160130,2160194,2160258,2132066,2131010,2131106,2106018,2131618,2160322,2131298,2132034,2131938,2137410,2132226]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2183617,6291456,2183649,6291456,2183681,6291456,2183713,6291456,2183745,6291456,2183777,6291456,2183809,6291456,2183841,6291456]),new Uint32Array([0,6291456,6291456,0,6291456,0,0,6291456,6291456,0,6291456,0,0,6291456,0,0]),new Uint32Array([2250977,2251009,2251041,2251073,2195009,2251106,2251169,2251201,2251233,2251265,2251297,2251330,2251394,2251457,2251489,2251521]),new Uint32Array([2205729,2205761,2205793,2205825,2205857,2205889,2205921,2205953,2205985,2206017,2206049,2206081,2206113,2206145,2206177,2206209]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2143170,2168993,6291456,2169025,6291456,2169057,6291456,2169089,6291456,2143234,2169121,6291456,2169153,6291456,2169185,6291456]),new Uint32Array([23068672,23068672,2190689,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2248706,2248769,2248801,2248833,2248865,2248897,2248929,2248962,2249026,2249090,2249154,2240705,2249217,2249249,2249281,2249313]),new Uint32Array([10485857,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10495394,6291456,2098209,6291456,6291456,2097152,6291456,10531394]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([14680064,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([6291456,2186977,6291456,6291456,6291456,6291456,6291456,10537858,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2209601,2209633,2209665,2209697,2209729,2209761,2209793,2209825,2209857,2209889,2209921,2209953,2209985,2210017,2210049,2210081]),new Uint32Array([10501539,10501635,10501731,10501827,10501923,10502019,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905]),new Uint32Array([2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2194561,2194593,2194625,2119777,2119873,2194657,2194689,2194721,2194753,2194785,2194817,2194849,2194881,2194913,2194945,2194977]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569]),new Uint32Array([2222818,2222882,2222946,2223010,2223074,2223138,2223202,2223266,2223330,2223394,2223458,2223522,2223586,2223650,2223714,2223778]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672]),new Uint32Array([0,2179553,2179585,2179617,2179649,2144001,2179681,2179713,2179745,2179777,2179809,2156705,2179841,2156833,2179873,2179905]),new Uint32Array([6291456,23068672,6291456,2145602,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,6291456,0,0]),new Uint32Array([2196513,2196545,2196577,2196609,2196641,2196673,2196705,2196737,2196769,2196801,2196833,2196865,2196897,2196929,2196961,2196993]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2177281,6291456,2177313,6291456,2177345,6291456,2177377,6291456,2177409,6291456,2177441,6291456,2177473,6291456,2177505,6291456]),new Uint32Array([2187137,2221473,2221505,2221537,2221569,6291456,6291456,10610209,10610241,10537986,10537986,10537986,10537986,10609857,10609857,10609857]),new Uint32Array([2243009,2243041,2216033,2243074,2243137,2243169,2243201,2219617,2243233,2243265,2243297,2243329,2243362,2243425,2243457,2243489]),new Uint32Array([10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,10485857,2097152,4194304,4194304,0,0]),new Uint32Array([2143042,6291456,2143106,2143106,2168833,6291456,2168865,6291456,6291456,2168897,6291456,2168929,6291456,2168961,6291456,2143170]),new Uint32Array([6291456,6291456,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2204193,2204225,2204257,2204289,2204321,2204353,2204385,2204417,2204449,2204481,2204513,2204545,2204577,2204609,2204641,2204673]),new Uint32Array([2202753,6291456,2202785,6291456,2202817,6291456,2202849,6291456,2202881,6291456,2202913,6291456,2202945,6291456,2202977,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321]),new Uint32Array([2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842,2147394,2147458,2147522,2147586,2147650,2147714,2147778,2147842]),new Uint32Array([2253313,2253346,2253409,2253441,2253473,2253505,2253537,2253569,2253601,2253634,2219393,2253697,2253729,2253761,2253793,2253825]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([2162562,2162626,2131362,2162690,2159938,2160002,2162754,2162818,2160130,2162882,2160194,2160258,2160834,2160898,2161026,2161090]),new Uint32Array([2175361,2175393,2175425,2175457,2175489,2175521,2175553,2175585,2175617,2175649,2175681,2175713,2175745,2175777,2175809,2175841]),new Uint32Array([2253858,2253921,2253954,2254018,2254082,2196737,2254145,2196865,2254177,2254209,2254241,2254273,2197025,2254306,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2202113,2204129,2188705,2204161]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953]),new Uint32Array([2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209]),new Uint32Array([2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,0,2108417,0,2111713,2100897,2111905]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2175425,2175489,2175809,2175905,2175937,2175937,2176193,2176417,2180865,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,2143298,2143298,2143298,2143362,2143362,2143362,2143426,2143426,2143426,2171105,6291456,2171137]),new Uint32Array([2120162,2120258,2151618,2151682,2151746,2151810,2151874,2151938,2152002,2120035,2120131,2120227,2152066,2120323,2152130,2120419]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2195361,2142433,2236065,2236097,2236129,2236161,2118241,2117473,2236193,2236225,2236257,2236289,0,0,0,0]),new Uint32Array([2189281,6291456,2189313,6291456,2189345,6291456,2189377,6291456,2189409,6291456,2189441,6291456,2189473,6291456,2189505,6291456]),new Uint32Array([6291456,6291456,2145922,6291456,6291456,6291456,6291456,2145986,6291456,6291456,6291456,6291456,2146050,6291456,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10502113,10562017,10610401,10502177,10610433,10538049]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,2186401,0,2186433,0,2186465,0,2186497]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,23068672,23068672,23068672]),new Uint32Array([0,0,2198241,2198273,2198305,2198337,2198369,2198401,0,0,2198433,2198465,2198497,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,0,23068672,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([0,2105921,2097729,0,2097377,0,0,2106017,2133281,2097505,2105889,0,2097697,2135777,2097633,2097441]),new Uint32Array([2197889,2197921,2197953,2197985,2198017,2198049,2198081,2198113,2198145,2198177,2198209,2198241,2198273,2198305,2198337,2198369]),new Uint32Array([2132514,2132610,2160386,2133090,2133186,2160450,2160514,2133282,2160578,2133570,2106178,2160642,2133858,2160706,2160770,2134146]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,6291456,23068672,23068672,6291456,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([2184737,6291456,2184769,6291456,2184801,6291456,2184833,6291456,2184865,6291456,2184897,6291456,2184929,6291456,2184961,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,23068672,23068672,23068672,6291456,23068672,23068672,23068672,23068672,23068672,0,0]),new Uint32Array([6291456,6291456,6291456,2186753,6291456,6291456,6291456,6291456,2186785,2186817,2186849,2173569,2186881,10496355,10495395,10575521]),new Uint32Array([0,0,2097729,0,0,0,0,2106017,0,2097505,0,2097185,0,2135777,2097633,2097441]),new Uint32Array([2189537,6291456,2189569,6291456,2189601,6291456,2189633,6291456,2189665,6291456,2189697,6291456,2189729,6291456,2189761,6291456]),new Uint32Array([2202497,6291456,2202529,6291456,2202561,6291456,2202593,6291456,2202625,6291456,2202657,6291456,2202689,6291456,2202721,6291456]),new Uint32Array([2245217,2218369,2245249,2245282,2245345,2245377,2245410,2245474,2245537,2245569,2245601,2245633,2245665,2245665,2245697,2245729]),new Uint32Array([6291456,0,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,23068672,6291456,23068672,6291456,6291456,6291456,6291456,23068672,23068672]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2097281,2105921,2097729,2106081,2097377,2097601,2162337,2106017,2133281,2097505,0,2097185,2097697,2135777,2097633,2097441]),new Uint32Array([2176641,6291456,2176673,6291456,2176705,6291456,2176737,6291456,2176769,6291456,2176801,6291456,2176833,6291456,2176865,6291456]),new Uint32Array([2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2174369,2174369,0,0,2100833,2100737]),new Uint32Array([2116513,2190817,2190849,2190881,2190913,2190945,2116609,2190977,2191009,2191041,2191073,2117185,2191105,2191137,2191169,2191201]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456]),new Uint32Array([2167617,2167649,2167681,2167713,2167745,2167777,2167809,6291456,2167841,2167873,2167905,2167937,2167969,2168001,2168033,4240130]),new Uint32Array([2165122,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122,2134562,2132162,2132834,2136866]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2186209,2186241,2186273,2186305,2186337,2186369,0,0]),new Uint32Array([2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([0,0,23068672,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([0,10537921,10610689,10610273,10610497,10610529,10610305,10610721,10489601,10489697,10610337,10575617,10554529,2221761,2197217,10496577]),new Uint32Array([2105473,2105569,2105601,2112289,0,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2125346,2153410,2153474,2127394,2153538,2153602,2153666,2153730,2105507,2105476,2153794,2153858,2153922,2153986,2154050,2105794]),new Uint32Array([2200449,2119681,2200481,2153313,2199873,2199905,2199937,2200513,2200545,2200577,2200609,2119105,2119201,2119297,2119393,2119489]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2175777,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2222273,2197217,2221473,2221505,2221089,2222305,2200865,2099681,2104481,2222337,2099905,2120737,2222369,2103713,2100225,2098785]),new Uint32Array([2201377,6291456,2201409,6291456,2201441,6291456,2201473,6291456,2201505,6291456,2201537,6291456,2201569,6291456,6291456,23068672]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([2200897,6291456,2200929,6291456,2200961,6291456,2200993,6291456,2201025,6291456,2180865,6291456,2201057,6291456,2201089,6291456]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,6291456,6291456,6291456,0,0,0,0,0]),new Uint32Array([2161154,2161410,2138658,2161474,2161538,2097666,2097186,2097474,2162946,2132450,2163010,2163074,2136162,2163138,2161666,2161730]),new Uint32Array([2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953]),new Uint32Array([0,0,0,0,0,0,23068672,23068672,0,0,0,0,2145410,2145474,0,6291456]),new Uint32Array([2244161,2216065,2212769,2244193,2244225,2244257,2244290,2244353,2244385,2244417,2244449,2218273,2244481,2244514,2244577,2244609]),new Uint32Array([2125730,2125699,2125795,2125891,2125987,2154114,2154178,2154242,2154306,2154370,2154434,2154498,2126082,2126178,2126274,2126083]),new Uint32Array([2237665,2237697,2237697,2237697,2237730,2237793,2237825,2237857,2237890,2237953,2237985,2238017,2238049,2238081,2238113,2238145]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150146,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,0,0,23068672,23068672,23068672,0,0]),new Uint32Array([2214369,2238593,2238625,2238657,2238689,2238721,2238753,2238785,2238817,2238850,2238913,2238945,2238977,2235457,2239009,2239041]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([2252066,2252130,2252193,2252225,2252257,2252290,2252353,2252385,2252417,2252449,2252481,2252513,2252545,2252578,2252641,2252673]),new Uint32Array([2197697,2114113,2114209,2197729,2197761,2114305,2197793,2114401,2114497,2197825,2114593,2114689,2114785,2114881,2114977,2197857]),new Uint32Array([2224866,2224930,2224994,2225058,2225122,2225186,2225250,2225314,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2219490,2219554,2219617,2219649,2219681,2219714,2219778,2219842,2219905,2219937,0,0,0,0,0,0]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665]),new Uint32Array([2220161,2220161,2220193,2220193,2220193,2220193,2220225,2220225,2220225,2220225,2220257,2220257,2220257,2220257,2220289,2220289]),new Uint32Array([2192673,2192705,2192737,2192769,2192801,2192833,2192865,2118049,2192897,2117473,2117761,2192929,2192961,2192993,2193025,2193057]),new Uint32Array([2179297,6291456,2179329,6291456,2179361,6291456,2179393,6291456,2179425,6291456,2179457,6291456,2179489,6291456,2179521,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2235745,2235777,2193633,2235809,2235841,2235873,2235905,2235937,2235969,2116513,2116705,2236001,2200513,2199905,2200545,2236033]),new Uint32Array([2113153,2108481,2113345,2113441,2232993,2233025,0,0,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761]),new Uint32Array([2170593,6291456,2170625,6291456,2170657,6291456,2170689,2170721,6291456,2170753,6291456,6291456,2170785,6291456,2170817,2170849]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2166786,2166850,0,0,0,0]),new Uint32Array([23068672,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,10575617,2187041,10502177,10489601,10489697,0]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2134562,2132162,2132834,2136866,2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058]),new Uint32Array([6291456,6291456,2098337,2101441,10531458,2153473,6291456,6291456,10531522,2100737,2108193,6291456,2106499,2106595,2106691,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0]),new Uint32Array([2233122,2233186,2233250,2233314,2233378,2233442,2233506,2233570,2233634,2233698,2233762,2233826,2233890,2233954,2234018,2234082]),new Uint32Array([23068672,6291456,23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2205217,2205249,2205281,2205313,2205345,2205377,2205409,2205441,2205473,2205505,2205537,2205569,2205601,2205633,2205665,2205697]),new Uint32Array([6291456,0,6291456,0,0,0,6291456,6291456,6291456,6291456,0,0,23068672,6291456,23068672,23068672]),new Uint32Array([2173601,2173761,2174081,2173569,2174241,2174113,2173953,6291456,2174305,6291456,2174337,6291456,2174369,6291456,2174401,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([2152450,2152514,2099653,2104452,2099813,2122243,2099973,2152578,2122339,2122435,2122531,2122627,2122723,2104580,2122819,2152642]),new Uint32Array([2236385,2236417,2236449,2236482,2236545,2215425,2236577,2236609,2236641,2236673,2215457,2236705,2236737,2236770,2215489,2236833]),new Uint32Array([2163394,2159746,2163458,2131362,2163522,2160130,2163778,2132226,2163842,2132898,2163906,2161410,2138658,2097666,2136162,2163650]),new Uint32Array([2218721,2246913,2246946,2216385,2247010,2247074,2215009,2247137,2247169,2216481,2247201,2247233,2247266,2247330,2247330,0]),new Uint32Array([2129730,2129762,2129858,2129731,2129827,2156482,2156482,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,0,0,0,0,6291456,0,0]),new Uint32Array([2203969,2204001,2181377,2204033,2204065,6291456,2204097,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2169473,6291456,2169505,6291456,2169537,6291456,2169569,6291456,2169601,6291456,2169633,6291456,2169665,6291456,2169697,6291456]),new Uint32Array([2141542,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220801,2220801,2220801,2220801,2220833,2220833,2220865,2220865,2220865,2220865,2220897,2220897,2220897,2220897,2139873,2139873]),new Uint32Array([0,0,0,0,0,23068672,23068672,0,0,0,0,0,0,0,6291456,0]),new Uint32Array([2214849,2218433,2218465,2218497,2218529,2218561,2214881,2218593,2218625,2218657,2218689,2218721,2218753,2216545,2218785,2218817]),new Uint32Array([23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,0,0,0,6291456]),new Uint32Array([2136482,2164610,2164674,2164738,2164802,2132802,2132706,2164866,2132898,2164930,2164994,2165058,2165122,2132802,2132706,2164866]),new Uint32Array([2207649,2207681,2207713,2207745,2207777,2207809,2207841,2207873,2207905,2207937,2207969,2208001,2208033,2208065,2208097,2208129]),new Uint32Array([2123683,2105092,2152706,2123779,2105220,2152770,2100453,2098755,2123906,2124002,2124098,2124194,2124290,2124386,2124482,2124578]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,0,0,0,0,0,0,0,10485857]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([10508163,10508259,10508355,10508451,2200129,2200161,2192737,2200193,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203553,6291456,2203585,6291456,6291456,6291456,2203617,6291456,2203649,6291456,2203681,6291456,2203713,6291456,2203745,6291456]),new Uint32Array([18884449,18884065,23068672,18884417,18884034,18921185,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,18874368]),new Uint32Array([2247393,2247426,2247489,2247521,2247553,2247586,2247649,2247681,2247713,2247745,2247777,2247810,2247873,2247905,2247937,2247969]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,2160577,2133857,2235297,0,2235329,0]),new Uint32Array([2182593,6291456,2182625,6291456,2182657,6291456,2182689,6291456,2182721,6291456,2182753,6291456,2182785,6291456,2182817,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102402,2102403,6291456,2110050]),new Uint32Array([2149890,2108323,2149954,6291456,2113441,6291456,2149057,6291456,2113441,6291456,2105473,2167265,2111137,2105505,6291456,2108353]),new Uint32Array([2219105,2219137,2195233,2251554,2251617,2251649,2251681,2251713,2251746,2251810,2251873,2251905,2251937,2251970,2252033,2219169]),new Uint32Array([2203009,6291456,2203041,6291456,2203073,6291456,2203105,6291456,2203137,6291456,2203169,6291456,2203201,6291456,2203233,6291456]),new Uint32Array([2128195,2128291,2128387,2128483,2128579,2128675,2128771,2128867,2128963,2129059,2129155,2129251,2129347,2129443,2129539,2129635]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2140964,2141156,2140966,2141158,2141350]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2225378,2225442,2225506,2225570,2225634,2225698,2225762,2225826,2225890,2225954,2226018,2226082,2226146,2226210,2226274,2226338]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137,2105505,2098241,2108353,2108417]),new Uint32Array([2108353,2108417,0,2105601,2108193,2157121,2157313,2157377,2157441,2100897,6291456,2108419,2173953,2173633,2173633,2173953]),new Uint32Array([2111713,2173121,2111905,2098177,2173153,2173185,2173217,2113153,2113345,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,2190753]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,2197249,6291456,2117377,2197281,2197313,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,0,0,0,23068672,0,0,0,0,0,6291456,6291456,6291456]),new Uint32Array([2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100833,2100737,2098337,2101441,2101569,2101697,2101825,2101953]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0]),new Uint32Array([0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,23068672]),new Uint32Array([2173281,6291456,2173313,6291456,2173345,6291456,2173377,6291456,0,0,10532546,6291456,6291456,6291456,10562017,2173441]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,0,0]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2159426,2159490,2159554,2159362,2159618,2159682,2139522,2136450,2159746,2159810,2159874,2130978,2131074,2131266,2131362,2159938]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2203233,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2203265,6291456,2203297,6291456,2203329,2203361,6291456]),new Uint32Array([6291456,6291456,2148418,2148482,2148546,0,6291456,2148610,2186529,2186561,2148417,2148545,2148482,10495778,2143969,10495778]),new Uint32Array([2134146,2139426,2160962,2134242,2161218,2161282,2161346,2161410,2138658,2134722,2134434,2134818,2097666,2097346,2097698,2105986]),new Uint32Array([2198881,2198913,2198945,2198977,2199009,2199041,2199073,2199105,2199137,2199169,2199201,2199233,2199265,2199297,2199329,2199361]),new Uint32Array([0,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([10610561,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193]),new Uint32Array([2183873,6291456,2183905,6291456,2183937,6291456,2183969,6291456,2184001,6291456,2184033,6291456,2184065,6291456,2184097,6291456]),new Uint32Array([2244642,2244706,2244769,2244801,2218305,2244833,2244865,2244897,2244929,2244961,2244993,2245026,2245089,2245122,2245185,0]),new Uint32Array([6291456,6291456,2116513,2116609,2116705,2116801,2199873,2199905,2199937,2199969,2190913,2200001,2200033,2200065,2200097,2191009]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2180673,2180705,2180737,2180769,2180801,2180833,0,0]),new Uint32Array([2098081,2099521,2099105,2120705,2098369,2120801,2103361,2097985,2098433,2121377,2121473,2099169,2099873,2098401,2099393,2152609]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2150402]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,2145666,2145730,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665]),new Uint32Array([2187073,6291456,6291456,6291456,6291456,2098241,2098241,2108353,2100897,2111905,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2102404,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,2100612,6291456,6291456,6291456,6291456,6291456,6291456,6291456,10485857]),new Uint32Array([2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889]),new Uint32Array([2217697,2217729,2217761,2217793,2217825,2217857,2217889,2217921,2217953,2215873,2217985,2215905,2218017,2218049,2218081,2218113]),new Uint32Array([2211233,2218849,2216673,2218881,2218913,2218945,2218977,2219009,2216833,2219041,2215137,2219073,2216865,2209505,2219105,2216897]),new Uint32Array([2240097,2240129,2240161,2240193,2240225,2240257,2240289,2240321,2240353,2240386,2240449,2240481,2240513,2240545,2207905,2240578]),new Uint32Array([6291456,6291456,2202273,6291456,2202305,6291456,2202337,6291456,2202369,6291456,2202401,6291456,2202433,6291456,2202465,6291456]),new Uint32Array([0,23068672,23068672,18923394,23068672,18923458,18923522,18884099,18923586,18884195,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2201121,6291456,2201153,6291456,2201185,6291456,2201217,6291456,2201249,6291456,2201281,6291456,2201313,6291456,2201345,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2211041,2211073,2211105,2211137,2211169,2211201,2211233,2211265,2211297,2211329,2211361,2211393,2211425,2211457,2211489,2211521]),new Uint32Array([2181825,6291456,2181857,6291456,2181889,6291456,2181921,6291456,2181953,6291456,2181985,6291456,2182017,6291456,2182049,6291456]),new Uint32Array([2162337,2097633,2097633,2097633,2097633,2132705,2132705,2132705,2132705,2097153,2097153,2097153,2097153,2133089,2133089,2133089]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,2148545,6291456,2173473,6291456,2148865,6291456,2173505,6291456,2173537,6291456,2173569,6291456,2149121,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,0,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2207137,2207169,2207201,2207233,2207265,2207297,2207329,2207361,2207393,2207425,2207457,2207489,2207521,2207553,2207585,2207617]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,23068672,23068672,0,0,0,0,0,0]),new Uint32Array([2198401,2198433,2198465,2198497,0,2198529,2198561,2198593,2198625,2198657,2198689,2198721,2198753,2198785,2198817,2198849]),new Uint32Array([2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0,0]),new Uint32Array([2216385,2118721,2216417,2216449,2216481,2216513,2216545,2211233,2216577,2216609,2216641,2216673,2216705,2216737,2216737,2216769]),new Uint32Array([2216801,2216833,2216865,2216897,2216929,2216961,2216993,2215169,2217025,2217057,2217089,2217121,2217154,2217217,0,0]),new Uint32Array([2210593,2191809,2210625,2210657,2210689,2210721,2210753,2210785,2210817,2210849,2191297,2210881,2210913,2210945,2210977,2211009]),new Uint32Array([0,0,2105825,0,0,2111905,2105473,0,0,2112289,2108193,2112481,2112577,0,2098305,2108321]),new Uint32Array([0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,2097153,2134241,0,2132705,0,0,2131297,0,2133089,0,2133857,0,2220769,0,2235361]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,6291456,6291456,14680064]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2171873,6291456,2171905,6291456,2171937,6291456,2171969,6291456,2172001,6291456,2172033,6291456,2172065,6291456,2172097,6291456]),new Uint32Array([2220929,2220929,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2133857,2134145,2134145,2134145,2134145,2134241,2134241,2134241,2134241,2105889,2105889,2105889,2105889,2097185,2097185,2097185]),new Uint32Array([2173697,2173761,2173793,2174113,2173985,2173953,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,10499619,10499715,10499811,10499907]),new Uint32Array([0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,0,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,0,23068672,23068672,23068672,0,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,6291456,23068672,23068672]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,2144322,2144386,2144450,2144514,2144578,2144642,2144706,2144770]),new Uint32Array([23068672,23068672,23068672,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([2113153,2108481,2113345,2113441,2098209,2111137,0,2098241,2108353,2108417,2105825,0,0,2111905,2105473,2105569]),new Uint32Array([2236321,2236353,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2152194,2121283,2103684,2103812,2097986,2098533,2097990,2098693,2098595,2098853,2099013,2103940,2121379,2121475,2121571,2104068]),new Uint32Array([2206241,2206273,2206305,2206337,2206369,2206401,2206433,2206465,2206497,2206529,2206561,2206593,2206625,2206657,2206689,2206721]),new Uint32Array([6291456,6291456,6291456,6291456,16777216,16777216,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,23068672,23068672,10538818,10538882,6291456,6291456,2150338]),new Uint32Array([6291456,6291456,6291456,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2214369,2214401,2214433,2214465,2214497,2214529,2214561,2214593,2194977,2214625,2195073,2214657,2214689,2214721,6291456,6291456]),new Uint32Array([2097152,2097152,2097152,2097152,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2182081,6291456,2182113,6291456,2182145,6291456,2182177,6291456,2182209,6291456,2182241,6291456,2182273,6291456,2182305,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2146881,2146945,2147009,2147073,2147137,2147201,2147265,2147329]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,23068672,23068672]),new Uint32Array([0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2122915,2123011,2123107,2104708,2123203,2123299,2123395,2100133,2104836,2100290,2100293,2104962,2104964,2098052,2123491,2123587]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456]),new Uint32Array([6291456,2171169,6291456,2171201,6291456,2171233,6291456,2171265,6291456,2171297,6291456,2171329,6291456,6291456,2171361,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,2148994,2149058,2149122,0,6291456,2149186,2186945,2173537,2148993,2149121,2149058,10531458,10496066,0]),new Uint32Array([2195009,2195041,2195073,2195105,2195137,2195169,2195201,2195233,2195265,2195297,2195329,2195361,2195393,2195425,2195457,2195489]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,0,0,6291456,6291456]),new Uint32Array([2182849,6291456,2182881,6291456,2182913,6291456,2182945,6291456,2182977,6291456,2183009,6291456,2183041,6291456,2183073,6291456]),new Uint32Array([2211553,2210081,2211585,2211617,2211649,2211681,2211713,2211745,2211777,2211809,2209569,2211841,2211873,2211905,2211937,2211969]),new Uint32Array([2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2166594,2127298,2166658,2142978,2141827,2166722]),new Uint32Array([2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233057,2148481,2173601,2173633,2173665,2173697,2173729]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,0,0,2185761,2185793,2185825,2185857,2185889,2185921,0,0]),new Uint32Array([6291456,2148481,2173601,2173633,2173665,2173697,2173729,2148801,2173761,2143969,2173793,2173825,2153473,2173857,2173889,2173921]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,6291456]),new Uint32Array([0,0,0,2220961,2220961,2220961,2220961,2144193,2144193,2159201,2159201,2159265,2159265,2144194,2220993,2220993]),new Uint32Array([2192641,2235393,2235425,2152257,2116609,2235457,2235489,2200065,2235521,2235553,2235585,2212449,2235617,2235649,2235681,2235713]),new Uint32Array([2194049,2194081,2194113,2194145,2194177,2194209,2194241,2194273,2194305,2194337,2194369,2194401,2194433,2194465,2194497,2194529]),new Uint32Array([2196673,2208641,2208673,2208705,2208737,2208769,2208801,2208833,2208865,2208897,2208929,2208961,2208993,2209025,2209057,2209089]),new Uint32Array([2191681,2191713,2191745,2191777,2153281,2191809,2191841,2191873,2191905,2191937,2191969,2192001,2192033,2192065,2192097,2192129]),new Uint32Array([2230946,2231010,2231074,2231138,2231202,2231266,2231330,2231394,2231458,2231522,2231586,2231650,2231714,2231778,2231842,2231906]),new Uint32Array([14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064,14680064]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,2185953,2185985,2186017,2186049,2186081,2186113,2186145,2186177]),new Uint32Array([2139811,2139907,2097284,2105860,2105988,2106116,2106244,2097444,2097604,2097155,10485778,10486344,2106372,6291456,0,0]),new Uint32Array([2110051,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2172385,6291456,2172417,6291456,2172449,6291456,2172481,6291456,2172513,6291456,2172545,6291456,2172577,6291456,2172609,6291456]),new Uint32Array([0,0,23068672,23068672,6291456,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2249345,2249377,2249409,2249441,2249473,2249505,2249537,2249570,2210209,2249633,2249665,2249697,2249729,2249761,2249793,2216769]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,6291456,6291456,6291456,6291456]),new Uint32Array([2187169,2187201,2187233,2187265,2187297,2187329,2187361,2187393,2187425,2187457,2187489,2187521,2187553,2187585,2187617,2187649]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([0,0,0,6291456,6291456,0,0,0,6291456,6291456,6291456,0,0,0,6291456,6291456]),new Uint32Array([2182337,6291456,2182369,6291456,2182401,6291456,2182433,6291456,2182465,6291456,2182497,6291456,2182529,6291456,2182561,6291456]),new Uint32Array([2138179,2138275,2138371,2138467,2134243,2134435,2138563,2138659,2138755,2138851,2138947,2139043,2138947,2138755,2139139,2139235]),new Uint32Array([23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2250498,2250562,2250625,2250657,2208321,2250689,2250721,2250753,2250785,2250817,2250849,2218945,2250881,2250913,2250945,0]),new Uint32Array([2170369,2105569,2098305,2108481,2173249,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456]),new Uint32Array([2100897,2111905,2105473,2105569,2105601,0,2108193,0,0,0,2098305,2108321,2108289,2100865,2113153,2108481]),new Uint32Array([2100897,2100897,2105569,2105569,6291456,2112289,2149826,6291456,6291456,2112481,2112577,2098177,2098177,2098177,6291456,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,6291456,6291456,6291456]),new Uint32Array([6291456,2169953,2169985,6291456,2170017,6291456,2170049,2170081,6291456,2170113,2170145,2170177,6291456,6291456,2170209,2170241]),new Uint32Array([6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([0,0,0,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2220641,2220641,2220673,2220673,2220673,2220673,2220705,2220705,2220705,2220705,2220737,2220737,2220737,2220737,2220769,2220769]),new Uint32Array([2127650,2127746,2127842,2127938,2128034,2128130,2128226,2128322,2128418,2127523,2127619,2127715,2127811,2127907,2128003,2128099]),new Uint32Array([2143969,2173793,2173825,2153473,2173857,2173889,2173921,2173953,2173985,2173761,2174017,2174049,2174081,2174113,2174145,2174177]),new Uint32Array([0,0,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([2204705,2204737,2204769,2204801,2204833,2204865,2204897,2204929,2204961,2204993,2205025,2205057,2205089,2205121,2205153,2205185]),new Uint32Array([2176385,6291456,2176417,6291456,2176449,6291456,2176481,6291456,2176513,6291456,2176545,6291456,2176577,6291456,2176609,6291456]),new Uint32Array([2195521,2195553,2195585,2195617,2195649,2195681,2117857,2195713,2195745,2195777,2195809,2195841,2195873,2195905,2195937,2195969]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,6291456,6291456]),new Uint32Array([2173921,2173953,2173985,2174017,2174017,2174049,2174081,2174113,2174145,2174177,2149057,2233089,2173697,2173761,2173793,2174113]),new Uint32Array([2131586,2132450,2135970,2135778,2161602,2136162,2163650,2161794,2135586,2163714,2137186,2131810,2160290,2135170,2097506,2159554]),new Uint32Array([2134145,2097153,2134241,2105953,2132705,2130977,2160065,2131297,2162049,2133089,2160577,2133857,0,0,0,0]),new Uint32Array([2116513,2116609,2116705,2116801,2116897,2116993,2117089,2117185,2117281,2117377,2117473,2117569,2117665,2117761,2117857,2117953]),new Uint32Array([2100737,2098337,2101441,2101569,2101697,2101825,2101953,2102081,2102209,2100802,2101154,2101282,2101410,2101538,2101666,2101794]),new Uint32Array([2100289,2098657,2098049,2200737,2123489,2123681,2200769,2098625,2100321,2098145,2100449,2098017,2098753,2098977,2150241,2150305]),new Uint32Array([6291456,6291456,6291456,0,6291456,6291456,6291456,6291456,6291456,2109955,6291456,6291456,0,0,0,0]),new Uint32Array([18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368,18874368]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,6291456,0,6291456,0,0]),new Uint32Array([2130979,2131075,2131075,2131171,2131267,2131363,2131459,2131555,2131651,2131651,2131747,2131843,2131939,2132035,2132131,2132227]),new Uint32Array([0,2177793,6291456,2177825,6291456,2177857,6291456,2177889,6291456,2177921,6291456,2177953,6291456,2177985,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672]),new Uint32Array([6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2113345,0,2098209,2111137,2105505,2098241,2108353,2108417,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289]),new Uint32Array([2136643,2136739,2136835,2136931,2137027,2137123,2137219,2137315,2137411,2137507,2137603,2137699,2137795,2137891,2137987,2138083]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0]),new Uint32Array([2174433,6291456,2174465,6291456,2174497,6291456,2174529,6291456,2174561,6291456,2174593,6291456,2174625,6291456,2174657,6291456]),new Uint32Array([0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441]),new Uint32Array([10496547,10496643,2105505,2149698,6291456,10496739,10496835,2170273,6291456,2149762,2105825,2111713,2111713,2111713,2111713,2168673]),new Uint32Array([6291456,2143490,2143490,2143490,2171649,6291456,2171681,2171713,2171745,6291456,2171777,6291456,2171809,6291456,2171841,6291456]),new Uint32Array([2159106,2159106,2159170,2159170,2159234,2159234,2159298,2159298,2159298,2159362,2159362,2159362,2106401,2106401,2106401,2106401]),new Uint32Array([2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865,2113153,2108481,2113345,2113441,2098209,2111137]),new Uint32Array([2108417,2181217,2181249,2181281,2170433,2170401,2181313,2181345,2181377,2181409,2181441,2181473,2181505,2181537,2170529,2181569]),new Uint32Array([2218433,2245761,2245793,2245825,2245857,2245890,2245953,2245986,2209665,2246050,2246113,2246146,2246210,2246274,2246337,2246369]),new Uint32Array([2230754,2230818,2230882,0,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([6291456,0,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,0,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2184129,6291456,2184161,6291456,2184193,6291456,6291456,6291456,6291456,6291456,2146818,2183361,6291456,6291456,2142978,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2135170,2097506,2130691,2130787,2130883,2163970,2164034,2164098,2164162,2164226,2164290,2164354,2164418,2164482,2164546,2133122]),new Uint32Array([2108515,2108611,2100740,2108707,2108803,2108899,2108995,2109091,2109187,2109283,2109379,2109475,2109571,2109667,2109763,2100738]),new Uint32Array([2102788,2102916,2103044,2120515,2103172,2120611,2120707,2098373,2103300,2120803,2120899,2120995,2103428,2103556,2121091,2121187]),new Uint32Array([2158082,2158146,0,2158210,2158274,0,2158338,2158402,2158466,2129922,2158530,2158594,2158658,2158722,2158786,2158850]),new Uint32Array([10499619,10499715,10499811,10499907,10500003,10500099,10500195,10500291,10500387,10500483,10500579,10500675,10500771,10500867,10500963,10501059]),new Uint32Array([2239585,2239618,2239681,2239713,0,2191969,2239745,2239777,2192033,2239809,2239841,2239874,2239937,2239970,2240033,2240065]),new Uint32Array([2252705,2252738,2252801,2252833,2252865,2252897,2252930,2252994,2253057,2253089,2253121,2253154,2253217,2253250,2219361,2219361]),new Uint32Array([2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,2108193,2112481,2112577,2098177,2098305,2108321,2108289,2100865]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,10538050,10538114,10538178,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([2226402,2226466,2226530,2226594,2226658,2226722,2226786,2226850,2226914,2226978,2227042,2227106,2227170,2227234,2227298,2227362]),new Uint32Array([23068672,6291456,6291456,6291456,6291456,2144066,2144130,2144194,2144258,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,23068672,23068672,23068672,6291456,23068672,23068672]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0]),new Uint32Array([2124674,2124770,2123875,2123971,2124067,2124163,2124259,2124355,2124451,2124547,2124643,2124739,2124835,2124931,2125027,2125123]),new Uint32Array([2168065,6291456,2168097,6291456,2168129,6291456,2168161,6291456,2168193,6291456,2168225,6291456,2168257,6291456,2168289,6291456]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0]),new Uint32Array([23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,2100610,2100611,6291456,2107842,2107843,6291456,6291456,6291456,6291456,10537922,6291456,10537986,6291456]),new Uint32Array([2174849,2174881,2174913,2174945,2174977,2175009,2175041,2175073,2175105,2175137,2175169,2175201,2175233,2175265,2175297,2175329]),new Uint32Array([2154562,2154626,2154690,2154754,2141858,2154818,2154882,2127298,2154946,2127298,2155010,2155074,2155138,2155202,2155266,2155202]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456,6291456,6291456,6291456,6291456,23068672,0]),new Uint32Array([2200641,2150786,2150850,2150914,2150978,2151042,2106562,2151106,2150562,2151170,2151234,2151298,2151362,2151426,2151490,2151554]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,23068672,0,0,0,0,0,0,0,0,6291456,6291456]),new Uint32Array([2220289,2220289,2220321,2220321,2220321,2220321,2220353,2220353,2220353,2220353,2220385,2220385,2220385,2220385,2220417,2220417]),new Uint32Array([2155330,2155394,0,2155458,2155522,2155586,2105732,0,2155650,2155714,2155778,2125314,2155842,2155906,2126274,2155970]),new Uint32Array([23068672,23068672,23068672,23068672,23068672,6291456,6291456,23068672,23068672,6291456,23068672,23068672,23068672,23068672,6291456,6291456]),new Uint32Array([6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,6291456,0,0,0,0,0,0]),new Uint32Array([2097729,2106017,2106017,2106017,2106017,2131297,2131297,2131297,2131297,2106081,2106081,2162049,2162049,2105953,2105953,2162337]),new Uint32Array([2097185,2097697,2097697,2097697,2097697,2135777,2135777,2135777,2135777,2097377,2097377,2097377,2097377,2097601,2097601,2097217]),new Uint32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23068672]),new Uint32Array([2139331,2139427,2139523,2139043,2133571,2132611,2139619,2139715,0,0,0,0,0,0,0,0]),new Uint32Array([2174113,2174145,2100897,2098177,2108289,2100865,2173601,2173633,2173985,2174113,2174145,6291456,6291456,6291456,6291456,6291456]),new Uint32Array([6291456,6291456,23068672,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456,23068672,6291456,6291456,6291456,6291456]),new Uint32Array([23068672,23068672,18923778,23068672,23068672,23068672,23068672,18923842,23068672,23068672,23068672,23068672,18923906,23068672,23068672,23068672]),new Uint32Array([2134145,2097153,2134241,0,2132705,2130977,2160065,2131297,0,2133089,0,2133857,0,0,0,0]),new Uint32Array([6291456,6291456,6291456,6291456,0,0,0,0,0,0,0,0,0,0,0,0]),new Uint32Array([2177537,6291456,2177569,6291456,2177601,6291456,2177633,6291456,2177665,6291456,2177697,6291456,2177729,6291456,2177761,6291456]),new Uint32Array([2212481,2212513,2212545,2212577,2197121,2212609,2212641,2212673,2212705,2212737,2212769,2212801,2212833,2212865,2212897,2212929]),new Uint32Array([6291456,6291456,23068672,23068672,23068672,6291456,6291456,0,0,0,0,0,0,0,0,0]),new Uint32Array([2098241,2108353,2170209,2105825,2111713,2100897,2111905,2105473,2105569,2105601,2112289,6291456,2108193,2172417,2112481,2098177]),new Uint32Array([6291456,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,23068672,6291456,6291456])],t=new Uint16Array([616,616,565,147,161,411,330,2,131,131,328,454,241,408,86,86,696,113,285,350,325,301,473,214,639,232,447,64,369,598,124,672,567,223,621,154,107,86,86,86,86,86,86,505,86,68,634,86,218,218,218,218,486,218,218,513,188,608,216,86,217,463,668,85,700,360,184,86,86,86,647,402,153,10,346,718,662,260,145,298,117,1,443,342,138,54,563,86,240,572,218,70,387,86,118,460,641,602,86,86,306,218,86,692,86,86,86,86,86,162,707,86,458,26,86,218,638,86,86,86,86,86,65,449,86,86,306,183,86,58,391,667,86,157,131,131,131,131,86,433,131,406,31,218,247,86,86,693,218,581,351,86,438,295,69,462,45,126,173,650,14,295,69,97,168,187,641,78,523,390,69,108,287,664,173,219,83,295,69,108,431,426,173,694,412,115,628,52,257,398,641,118,501,121,69,579,151,423,173,620,464,121,69,382,151,476,173,27,53,121,86,594,578,226,173,86,632,130,86,96,228,268,641,622,563,86,86,21,148,650,131,131,321,43,144,343,381,531,131,131,178,20,86,399,156,375,164,541,30,60,715,198,92,118,131,131,86,86,306,407,86,280,457,196,488,358,131,131,244,86,86,143,86,86,86,86,86,667,563,86,86,86,86,86,86,86,86,86,86,86,86,86,336,363,86,86,336,86,86,380,678,67,86,86,86,678,86,86,86,512,86,307,86,708,86,86,86,86,86,528,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,563,307,86,86,86,86,86,104,450,337,86,720,86,32,450,397,86,86,86,587,218,558,708,708,293,708,86,86,86,86,86,694,205,86,8,86,86,86,86,549,86,667,697,697,679,86,458,460,86,86,650,86,708,543,86,86,86,245,86,86,86,140,218,127,708,708,458,197,131,131,131,131,500,86,86,483,251,86,306,510,515,86,722,86,86,86,65,201,86,86,483,580,470,86,86,86,368,131,131,131,694,114,110,555,86,86,123,721,163,142,713,418,86,317,675,209,218,218,218,371,545,592,629,490,603,199,46,320,525,680,310,279,388,111,42,252,593,607,235,617,410,377,50,548,135,356,17,520,189,116,392,600,349,332,482,699,690,535,119,106,451,71,152,667,131,218,218,265,671,637,492,504,533,683,269,269,658,86,86,86,86,86,86,86,86,86,491,619,86,86,6,86,86,86,86,86,86,86,86,86,86,86,229,86,86,86,86,86,86,86,86,86,86,86,86,667,86,86,171,131,118,131,656,206,234,571,89,334,670,246,311,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,534,86,86,86,86,86,86,82,86,86,86,86,86,430,86,86,86,86,86,86,86,86,86,599,86,324,86,470,69,640,264,131,626,101,174,86,86,667,233,105,73,374,394,221,204,84,28,326,86,86,471,86,86,86,109,573,86,171,200,200,200,200,218,218,86,86,86,86,460,131,131,131,86,506,86,86,86,86,86,220,404,34,614,47,442,305,25,612,338,601,648,7,344,255,131,131,51,86,312,507,563,86,86,86,86,588,86,86,86,86,86,530,511,86,458,3,435,384,556,522,230,527,86,118,86,86,717,86,137,273,79,181,484,23,93,112,655,249,417,703,370,87,98,313,684,585,155,465,596,481,695,18,416,428,61,701,706,282,643,495,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,86,86,86,171,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,650,131,422,542,420,263,24,172,86,86,86,86,86,566,86,86,132,540,395,353,494,519,19,485,284,472,131,131,131,16,714,86,211,708,86,86,86,694,698,86,86,483,704,708,218,272,86,86,120,86,159,478,86,307,247,86,86,663,597,459,627,667,86,86,277,455,39,302,86,250,86,86,86,271,99,452,306,281,329,400,200,86,86,362,549,352,646,461,323,586,86,86,4,708,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,717,86,518,86,86,650,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,125,554,480,300,613,72,333,288,561,544,604,48,719,91,169,176,590,224,76,191,29,559,560,231,537,166,477,538,256,437,131,131,469,167,40,0,685,266,441,705,239,642,475,568,640,610,299,673,517,318,385,22,202,180,179,359,424,215,90,66,521,653,467,682,453,409,479,88,131,661,35,303,15,262,666,630,712,131,131,618,659,175,218,195,347,193,227,261,150,165,709,546,294,569,710,270,413,376,524,55,242,38,419,529,170,657,3,304,122,379,278,131,651,86,67,576,458,458,131,131,86,86,86,86,86,86,86,118,309,86,86,547,86,86,86,86,667,650,664,131,131,86,86,56,131,131,131,131,131,131,131,131,86,307,86,86,86,664,238,650,86,86,717,86,118,86,86,315,86,59,86,86,574,549,131,131,340,57,436,86,86,86,86,86,86,458,708,499,691,62,86,650,86,86,694,86,86,86,319,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,86,549,694,131,131,131,131,131,131,131,131,131,77,86,86,139,86,502,86,86,86,667,595,131,131,131,86,12,86,13,86,609,131,131,131,131,86,86,86,625,86,669,86,86,182,129,86,5,694,104,86,86,86,86,131,131,86,86,386,171,86,86,86,345,86,324,86,589,86,213,36,131,131,131,131,131,86,86,86,86,104,131,131,131,141,290,80,677,86,86,86,267,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,515,86,86,33,136,669,86,711,515,86,86,550,640,86,104,708,515,86,159,372,717,86,86,444,515,86,86,663,37,86,563,460,86,390,624,702,131,131,131,131,389,59,708,86,86,341,208,708,635,295,69,108,431,508,100,190,131,131,131,131,131,131,131,131,86,86,86,649,516,660,131,131,86,86,86,218,631,708,131,131,131,131,131,131,131,131,131,131,86,86,341,575,238,514,131,131,86,86,86,218,291,708,307,131,86,86,306,367,708,131,131,131,86,378,697,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,615,253,86,86,86,292,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,104,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,69,86,341,553,549,86,307,86,86,645,275,455,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,708,131,131,131,131,131,131,86,86,86,86,86,86,667,460,86,86,86,86,86,86,86,86,86,86,86,86,717,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,667,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,104,86,667,459,131,131,131,131,131,131,86,458,225,86,86,86,516,549,11,390,405,86,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,460,44,218,197,711,515,131,131,131,131,664,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,307,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,118,307,104,286,591,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,549,86,86,681,86,86,75,185,314,582,86,358,496,474,86,104,131,86,86,86,86,146,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,171,86,640,131,131,131,131,131,131,131,131,246,503,689,339,674,81,258,415,439,128,562,366,414,246,503,689,583,222,557,316,636,665,186,355,95,670,246,503,689,339,674,557,258,415,439,186,355,95,670,246,503,689,446,644,536,652,331,532,335,440,274,421,297,570,74,425,364,425,606,552,403,509,134,365,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,218,218,218,498,218,218,577,627,551,497,572,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,553,354,236,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,296,455,131,131,456,243,103,86,41,459,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,9,276,158,716,393,564,383,489,401,654,210,654,131,131,131,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,650,86,86,86,86,86,86,717,667,563,563,563,86,549,102,686,133,246,605,86,448,86,86,207,307,131,131,131,641,86,177,611,445,373,194,584,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,308,307,171,86,86,86,86,86,86,86,717,86,86,86,86,86,460,131,131,650,86,86,86,694,708,86,86,694,86,458,131,131,131,131,131,131,667,694,289,650,667,131,131,86,640,131,131,664,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,171,131,131,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,460,86,86,86,86,86,86,86,86,86,86,86,86,86,458,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,640,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,466,203,149,429,94,432,160,687,539,63,237,283,192,248,348,259,427,526,396,676,254,468,487,212,327,623,49,633,322,493,434,688,357,361,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131]),{mapStr:"صلى الله عليه وسلمجل جلالهキロメートルrad∕s2エスクードキログラムキロワットグラムトンクルゼイロサンチームパーセントピアストルファラッドブッシェルヘクタールマンションミリバールレントゲン′′′′1⁄10viii(10)(11)(12)(13)(14)(15)(16)(17)(18)(19)(20)∫∫∫∫(오전)(오후)アパートアルファアンペアイニングエーカーカラットカロリーキュリーギルダークローネサイクルシリングバーレルフィートポイントマイクロミクロンメガトンリットルルーブル株式会社kcalm∕s2c∕kgاكبرمحمدصلعمرسولریال1⁄41⁄23⁄4 ̈́ྲཱྀླཱྀ ̈͂ ̓̀ ̓́ ̓͂ ̔̀ ̔́ ̔͂ ̈̀‵‵‵a/ca/sc/oc/utelfax1⁄71⁄91⁄32⁄31⁄52⁄53⁄54⁄51⁄65⁄61⁄83⁄85⁄87⁄8xii0⁄3∮∮∮(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)(o)(p)(q)(r)(s)(t)(u)(v)(w)(x)(y)(z)::====(ᄀ)(ᄂ)(ᄃ)(ᄅ)(ᄆ)(ᄇ)(ᄉ)(ᄋ)(ᄌ)(ᄎ)(ᄏ)(ᄐ)(ᄑ)(ᄒ)(가)(나)(다)(라)(마)(바)(사)(아)(자)(차)(카)(타)(파)(하)(주)(一)(二)(三)(四)(五)(六)(七)(八)(九)(十)(月)(火)(水)(木)(金)(土)(日)(株)(有)(社)(名)(特)(財)(祝)(労)(代)(呼)(学)(監)(企)(資)(協)(祭)(休)(自)(至)pte10月11月12月ergltdアールインチウォンオンスオームカイリガロンガンマギニーケースコルナコーポセンチダースノットハイツパーツピクルフランペニヒヘルツペンスページベータボルトポンドホールホーンマイルマッハマルクヤードヤールユアンルピー10点11点12点13点14点15点16点17点18点19点20点21点22点23点24点hpabardm2dm3khzmhzghzthzmm2cm2km2mm3cm3km3kpampagpalogmilmolppmv∕ma∕m10日11日12日13日14日15日16日17日18日19日20日21日22日23日24日25日26日27日28日29日30日31日galffifflשּׁשּׂ ٌّ ٍّ َّ ُّ ِّ ّٰـَّـُّـِّتجمتحجتحمتخمتمجتمحتمخجمححميحمىسحجسجحسجىسمحسمجسممصححصممشحمشجيشمخشممضحىضخمطمحطممطميعجمعممعمىغممغميغمىفخمقمحقمملحملحيلحىلججلخملمحمحجمحيمجحمجممخممجخهمجهممنحمنحىنجمنجىنمينمىيممبخيتجيتجىتخيتخىتميتمىجميجحىجمىسخىصحيشحيضحيلجيلمييحييجييميمميقمينحيعميكمينجحمخيلجمكممجحيحجيمجيفميبحيسخينجيصلےقلے𝅘𝅥𝅮𝅘𝅥𝅯𝅘𝅥𝅰𝅘𝅥𝅱𝅘𝅥𝅲𝆹𝅥𝅮𝆺𝅥𝅮𝆹𝅥𝅯𝆺𝅥𝅯〔s〕ppv〔本〕〔三〕〔二〕〔安〕〔点〕〔打〕〔盗〕〔勝〕〔敗〕 ̄ ́ ̧ssi̇ijl·ʼndžljnjdz ̆ ̇ ̊ ̨ ̃ ̋ ιեւاٴوٴۇٴيٴक़ख़ग़ज़ड़ढ़फ़य़ড়ঢ়য়ਲ਼ਸ਼ਖ਼ਗ਼ਜ਼ਫ਼ଡ଼ଢ଼ําໍາຫນຫມགྷཌྷདྷབྷཛྷཀྵཱཱིུྲྀླྀྒྷྜྷྡྷྦྷྫྷྐྵaʾἀιἁιἂιἃιἄιἅιἆιἇιἠιἡιἢιἣιἤιἥιἦιἧιὠιὡιὢιὣιὤιὥιὦιὧιὰιαιάιᾶι ͂ὴιηιήιῆιὼιωιώιῶι ̳!! ̅???!!?rs°c°fnosmtmivix⫝̸ ゙ ゚よりコト333435참고주의363738394042444546474849503月4月5月6月7月8月9月hgevギガデシドルナノピコビルペソホンリラレムdaauovpciu平成昭和大正明治naμakakbmbgbpfnfμfμgmgμlmldlklfmnmμmpsnsμsmsnvμvkvpwnwμwmwkwkωmωbqcccddbgyhainkkktlnlxphprsrsvwbstմնմեմիվնմխיִײַשׁשׂאַאָאּבּגּדּהּוּזּטּיּךּכּלּמּנּסּףּפּצּקּרּתּוֹבֿכֿפֿאלئائەئوئۇئۆئۈئېئىئجئحئمئيبجبمبىبيتىتيثجثمثىثيخحضجضمطحظمغجفجفحفىفيقحقىقيكاكجكحكخكلكىكينخنىنيهجهىهييىذٰرٰىٰئرئزئنبزبنترتزتنثرثزثنمانرنزننيريزئخئهبهتهصخنههٰثهسهشهطىطيعىعيغىغيسىسيشىشيصىصيضىضيشخشرسرصرضراً ًـًـّ ْـْلآلألإ𝅗𝅥0,1,2,3,4,5,6,7,8,9,wzhvsdwcmcmddjほかココàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįĵķĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷÿźżɓƃƅɔƈɖɗƌǝəɛƒɠɣɩɨƙɯɲɵơƣƥʀƨʃƭʈưʊʋƴƶʒƹƽǎǐǒǔǖǘǚǜǟǡǣǥǧǩǫǭǯǵƕƿǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟƞȣȥȧȩȫȭȯȱȳⱥȼƚⱦɂƀʉʌɇɉɋɍɏɦɹɻʁʕͱͳʹͷ;ϳέίόύβγδεζθκλνξοπρστυφχψϊϋϗϙϛϝϟϡϣϥϧϩϫϭϯϸϻͻͼͽѐёђѓєѕіїјљњћќѝўџабвгдежзийклмнопрстуфхцчшщъыьэюяѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯաբգդզէըթժլծկհձղճյշոչպջռստրցփքօֆ་ⴧⴭნᏰᏱᏲᏳᏴᏵꙋɐɑᴂɜᴖᴗᴝᴥɒɕɟɡɥɪᵻʝɭᶅʟɱɰɳɴɸʂƫᴜʐʑḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿἐἑἒἓἔἕἰἱἲἳἴἵἶἷὀὁὂὃὄὅὑὓὕὗᾰᾱὲΐῐῑὶΰῠῡὺῥ`ὸ‐+−∑〈〉ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞⱡɫᵽɽⱨⱪⱬⱳⱶȿɀⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳬⳮⳳⵡ母龟丨丶丿乙亅亠人儿入冂冖冫几凵刀力勹匕匚匸卜卩厂厶又口囗士夂夊夕女子宀寸小尢尸屮山巛工己巾干幺广廴廾弋弓彐彡彳心戈戶手支攴文斗斤方无曰欠止歹殳毋比毛氏气爪父爻爿片牙牛犬玄玉瓜瓦甘生用田疋疒癶白皮皿目矛矢石示禸禾穴立竹米糸缶网羊羽老而耒耳聿肉臣臼舌舛舟艮色艸虍虫血行衣襾見角言谷豆豕豸貝赤走足身車辛辰辵邑酉釆里長門阜隶隹雨靑非面革韋韭音頁風飛食首香馬骨高髟鬥鬯鬲鬼魚鳥鹵鹿麥麻黃黍黑黹黽鼎鼓鼠鼻齊齒龍龜龠.〒卄卅ᄁᆪᆬᆭᄄᆰᆱᆲᆳᆴᆵᄚᄈᄡᄊ짜ᅢᅣᅤᅥᅦᅧᅨᅩᅪᅫᅬᅭᅮᅯᅰᅱᅲᅳᅴᅵᄔᄕᇇᇈᇌᇎᇓᇗᇙᄜᇝᇟᄝᄞᄠᄢᄣᄧᄩᄫᄬᄭᄮᄯᄲᄶᅀᅇᅌᇱᇲᅗᅘᅙᆄᆅᆈᆑᆒᆔᆞᆡ上中下甲丙丁天地問幼箏우秘男適優印注項写左右医宗夜テヌモヨヰヱヲꙁꙃꙅꙇꙉꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝺꝼᵹꝿꞁꞃꞅꞇꞌꞑꞓꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩɬʞʇꭓꞵꞷꬷꭒᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩᎪᎫᎬᎭᎮᎯᎰᎱᎲᎳᎴᎵᎶᎷᎸᎹᎺᎻᎼᎽᎾᎿᏀᏁᏂᏃᏄᏅᏆᏇᏈᏉᏊᏋᏌᏍᏎᏏᏐᏑᏒᏓᏔᏕᏖᏗᏘᏙᏚᏛᏜᏝᏞᏟᏠᏡᏢᏣᏤᏥᏦᏧᏨᏩᏪᏫᏬᏭᏮᏯ豈更賈滑串句契喇奈懶癩羅蘿螺裸邏樂洛烙珞落酪駱亂卵欄爛蘭鸞嵐濫藍襤拉臘蠟廊朗浪狼郎來冷勞擄櫓爐盧蘆虜路露魯鷺碌祿綠菉錄論壟弄籠聾牢磊賂雷壘屢樓淚漏累縷陋勒肋凜凌稜綾菱陵讀拏諾丹寧怒率異北磻便復不泌數索參塞省葉說殺沈拾若掠略亮兩凉梁糧良諒量勵呂廬旅濾礪閭驪麗黎曆歷轢年憐戀撚漣煉璉秊練聯輦蓮連鍊列劣咽烈裂廉念捻殮簾獵令囹嶺怜玲瑩羚聆鈴零靈領例禮醴隸惡了僚寮尿料燎療蓼遼暈阮劉杻柳流溜琉留硫紐類戮陸倫崙淪輪律慄栗隆利吏履易李梨泥理痢罹裏裡離匿溺吝燐璘藺隣鱗麟林淋臨笠粒狀炙識什茶刺切度拓糖宅洞暴輻降廓兀嗀塚晴凞猪益礼神祥福靖精蘒諸逸都飯飼館鶴郞隷侮僧免勉勤卑喝嘆器塀墨層悔慨憎懲敏既暑梅海渚漢煮爫琢碑祉祈祐祖禍禎穀突節縉繁署者臭艹著褐視謁謹賓贈辶難響頻恵𤋮舘並况全侀充冀勇勺啕喙嗢墳奄奔婢嬨廒廙彩徭惘慎愈慠戴揄搜摒敖望杖滛滋瀞瞧爵犯瑱甆画瘝瘟盛直睊着磌窱类絛缾荒華蝹襁覆調請諭變輸遲醙鉶陼韛頋鬒𢡊𢡄𣏕㮝䀘䀹𥉉𥳐𧻓齃龎עםٱٻپڀٺٿٹڤڦڄڃچڇڍڌڎڈژڑکگڳڱںڻۀہھۓڭۋۅۉ、〖〗—–_{}【】《》「」『』[]#&*-<>\\$%@ءؤة\"'^|~⦅⦆・ゥャ¢£¬¦¥₩│←↑→↓■○𐐨𐐩𐐪𐐫𐐬𐐭𐐮𐐯𐐰𐐱𐐲𐐳𐐴𐐵𐐶𐐷𐐸𐐹𐐺𐐻𐐼𐐽𐐾𐐿𐑀𐑁𐑂𐑃𐑄𐑅𐑆𐑇𐑈𐑉𐑊𐑋𐑌𐑍𐑎𐑏𐓘𐓙𐓚𐓛𐓜𐓝𐓞𐓟𐓠𐓡𐓢𐓣𐓤𐓥𐓦𐓧𐓨𐓩𐓪𐓫𐓬𐓭𐓮𐓯𐓰𐓱𐓲𐓳𐓴𐓵𐓶𐓷𐓸𐓹𐓺𐓻𐳀𐳁𐳂𐳃𐳄𐳅𐳆𐳇𐳈𐳉𐳊𐳋𐳌𐳍𐳎𐳏𐳐𐳑𐳒𐳓𐳔𐳕𐳖𐳗𐳘𐳙𐳚𐳛𐳜𐳝𐳞𐳟𐳠𐳡𐳢𐳣𐳤𐳥𐳦𐳧𐳨𐳩𐳪𐳫𐳬𐳭𐳮𐳯𐳰𐳱𐳲𑣀𑣁𑣂𑣃𑣄𑣅𑣆𑣇𑣈𑣉𑣊𑣋𑣌𑣍𑣎𑣏𑣐𑣑𑣒𑣓𑣔𑣕𑣖𑣗𑣘𑣙𑣚𑣛𑣜𑣝𑣞𑣟ıȷ∇∂𞤢𞤣𞤤𞤥𞤦𞤧𞤨𞤩𞤪𞤫𞤬𞤭𞤮𞤯𞤰𞤱𞤲𞤳𞤴𞤵𞤶𞤷𞤸𞤹𞤺𞤻𞤼𞤽𞤾𞤿𞥀𞥁𞥂𞥃ٮڡٯ字双多解交映無前後再新初終販声吹演投捕遊指禁空合満申割営配得可丽丸乁𠄢你侻倂偺備像㒞𠘺兔兤具𠔜㒹內𠕋冗冤仌冬𩇟刃㓟刻剆剷㔕包匆卉博即卽卿𠨬灰及叟𠭣叫叱吆咞吸呈周咢哶唐啓啣善喫喳嗂圖圗噑噴壮城埴堍型堲報墬𡓤売壷夆夢奢𡚨𡛪姬娛娧姘婦㛮嬈嬾𡧈寃寘寳𡬘寿将㞁屠峀岍𡷤嵃𡷦嵮嵫嵼巡巢㠯巽帨帽幩㡢𢆃㡼庰庳庶𪎒𢌱舁弢㣇𣊸𦇚形彫㣣徚忍志忹悁㤺㤜𢛔惇慈慌慺憲憤憯懞戛扝抱拔捐𢬌挽拼捨掃揤𢯱搢揅掩㨮摩摾撝摷㩬敬𣀊旣書晉㬙㬈㫤冒冕最暜肭䏙朡杞杓𣏃㭉柺枅桒𣑭梎栟椔楂榣槪檨𣚣櫛㰘次𣢧歔㱎歲殟殻𣪍𡴋𣫺汎𣲼沿泍汧洖派浩浸涅𣴞洴港湮㴳滇𣻑淹潮𣽞𣾎濆瀹瀛㶖灊災灷炭𠔥煅𤉣熜爨牐𤘈犀犕𤜵𤠔獺王㺬玥㺸瑇瑜璅瓊㼛甤𤰶甾𤲒𢆟瘐𤾡𤾸𥁄㿼䀈𥃳𥃲𥄙𥄳眞真瞋䁆䂖𥐝硎䃣𥘦𥚚𥛅秫䄯穊穏𥥼𥪧䈂𥮫篆築䈧𥲀糒䊠糨糣紀𥾆絣䌁緇縂繅䌴𦈨𦉇䍙𦋙罺𦌾羕翺𦓚𦔣聠𦖨聰𣍟䏕育脃䐋脾媵𦞧𦞵𣎓𣎜舄辞䑫芑芋芝劳花芳芽苦𦬼茝荣莭茣莽菧荓菊菌菜𦰶𦵫𦳕䔫蓱蓳蔖𧏊蕤𦼬䕝䕡𦾱𧃒䕫虐虧虩蚩蚈蜎蛢蜨蝫螆蟡蠁䗹衠𧙧裗裞䘵裺㒻𧢮𧥦䚾䛇誠𧲨貫賁贛起𧼯𠠄跋趼跰𠣞軔𨗒𨗭邔郱鄑𨜮鄛鈸鋗鋘鉼鏹鐕𨯺開䦕閷𨵷䧦雃嶲霣𩅅𩈚䩮䩶韠𩐊䪲𩒖頩𩖶飢䬳餩馧駂駾䯎𩬰鱀鳽䳎䳭鵧𪃎䳸𪄅𪈎𪊑䵖黾鼅鼏鼖𪘀",mapChar:function(r){return r>=196608?r>=917760&&r<=917999?18874368:0:e[t[r>>4]][15&r]}};var e,t}.apply(t,[]))||(e.exports=n)},function(e,t,r){"use strict";e.exports=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{constant:!0,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"label",type:"bytes32"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"resolver",type:"address"},{internalType:"uint64",name:"ttl",type:"uint64"}],name:"setSubnodeRecord",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},function(e,t,r){"use strict";e.exports=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setMultihash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"multihash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"contenthash",outputs:[{name:"",type:"bytes"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes"}],name:"setContenthash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},function(e,t,r){"use strict";var n=r(0),i=n(r(49)),o=n(r(104)),a=r(78),s=r(191),f=r(11).errors,u=r(178).interfaceIds;function c(e){this.registry=e}c.prototype.method=function(e,t,r,n,i){return{call:this.call.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this,outputFormatter:n}),send:this.send.bind({ensName:e,methodName:t,methodArguments:r,callback:i,parent:this})}},c.prototype.call=function(e){var t=this,r=new a,n=this.parent.prepareArguments(this.ensName,this.methodArguments),s=this.outputFormatter||null;return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,t.parent.checkInterfaceSupport(a,t.methodName);case 2:t.parent.handleCall(r,a.methods[t.methodName],n,s,e);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(t){"function"!=typeof e?r.reject(t):e(t,null)})),r.eventEmitter},c.prototype.send=function(e,t){var r=this,n=new a,s=this.parent.prepareArguments(this.ensName,this.methodArguments);return this.parent.registry.getResolver(this.ensName).then(function(){var a=(0,o.default)(i.default.mark((function o(a){return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.parent.checkInterfaceSupport(a,r.methodName);case 2:r.parent.handleSend(n,a.methods[r.methodName],s,e,t);case 3:case"end":return i.stop()}}),o)})));return function(e){return a.apply(this,arguments)}}()).catch((function(e){"function"!=typeof t?n.reject(e):t(e,null)})),n.eventEmitter},c.prototype.handleCall=function(e,t,r,n,i){return t.apply(this,r).call().then((function(t){n&&(t=n(t)),"function"!=typeof i?e.resolve(t):i(t,t)})).catch((function(t){"function"!=typeof i?e.reject(t):i(t,null)})),e},c.prototype.handleSend=function(e,t,r,n,i){return t.apply(this,r).send(n).on("sending",(function(){e.eventEmitter.emit("sending")})).on("sent",(function(){e.eventEmitter.emit("sent")})).on("transactionHash",(function(t){e.eventEmitter.emit("transactionHash",t)})).on("confirmation",(function(t,r){e.eventEmitter.emit("confirmation",t,r)})).on("receipt",(function(t){e.eventEmitter.emit("receipt",t),e.resolve(t),"function"==typeof i&&i(t,t)})).on("error",(function(t){e.eventEmitter.emit("error",t),"function"!=typeof i?e.reject(t):i(t,null)})),e},c.prototype.prepareArguments=function(e,t){var r=s.hash(e);return t.length>0?(t.unshift(r),t):[r]},c.prototype.checkInterfaceSupport=function(){var e=(0,o.default)(i.default.mark((function e(t,r){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u[r]){e.next=2;break}return e.abrupt("return");case 2:return n=!1,e.prev=3,e.next=6,t.methods.supportsInterface(u[r]).call();case 6:n=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn('Could not verify interface of resolver contract at "'+t.options.address+'". ');case 12:if(n){e.next=14;break}throw f.ResolverMethodMissingError(t.options.address,r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,r){return e.apply(this,arguments)}}(),e.exports=c},function(e,t,r){"use strict";var n=r(419);e.exports={decode:function(e){var t=null,r=null,i=null;if(e&&e.error)return{protocolType:null,decoded:e.error};if(e)try{t=n.decode(e);var o=n.getCodec(e);"ipfs-ns"===o?r="ipfs":"swarm-ns"===o?r="bzz":"onion"===o?r="onion":"onion3"===o?r="onion3":t=e}catch(e){i=e.message}return{protocolType:r,decoded:t,error:i}},encode:function(e){var t,r,i=!1;if(e){var o=e.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/)||e.match(/\/(ipfs)\/(.*)/);o&&(r=o[1],t=o[2]);try{if("ipfs"===r)t.length>=4&&(i="0x"+n.fromIpfs(t));else if("bzz"===r)t.length>=4&&(i="0x"+n.fromSwarm(t));else if("onion"===r)16===t.length&&(i="0x"+n.encode("onion",t));else{if("onion3"!==r)throw new Error("Could not encode content hash: unsupported content type");56===t.length&&(i="0x"+n.encode("onion3",t))}}catch(e){throw e}}return i}}},function(e,t,r){"use strict";var n=r(420),i=r(428),o=i.hexStringToBuffer,a=i.profiles,s=r(451).cidV0ToV1Base32;e.exports={helpers:{cidV0ToV1Base32:s},decode:function(e){var t=o(e),r=n.getCodec(t),i=n.rmPrefix(t),s=a[r];return s||(s=a.default),s.decode(i)},fromIpfs:function(e){return this.encode("ipfs-ns",e)},fromSwarm:function(e){return this.encode("swarm-ns",e)},encode:function(e,t){var r=a[e];r||(r=a.default);var i=r.encode(t);return n.addPrefix(e,i).toString("hex")},getCodec:function(e){var t=o(e);return n.getCodec(t)}}},function(e,t,r){"use strict";(function(n){var i=r(66),o=r(424),a=r(425),s=r(192);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var f=r(426);Object.assign(t,f),t.print=r(427)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";e.exports=function e(t,r,i){r=r||[];var o=i=i||0;for(;t>=n;)r[i++]=255&t|128,t/=128;for(;-128&t;)r[i++]=255&t|128,t>>>=7;return r[i]=0|t,e.bytes=i-o+1,r};var n=Math.pow(2,31)},function(e,t,r){"use strict";e.exports=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(127&n)<=128);return e.bytes=a-r,i}},function(e,t,r){"use strict";var n=Math.pow(2,7),i=Math.pow(2,14),o=Math.pow(2,21),a=Math.pow(2,28),s=Math.pow(2,35),f=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),d=Math.pow(2,63);e.exports=function(e){return e=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}e.exports=function(e){return{encode:function(t){return o("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(t){var r,i=n(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(t,e)}}}},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?o.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var i=n.indexOf("=");return i>0&&!t&&(n=n.substring(0,i)),n},decode:function(t){var r,i=n(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){i.e(e)}finally{i.f()}return o.from(t,"base64")}}}},function(e,t,r){"use strict";t.names=Object.freeze({identity:0,sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,md4:212,md5:213,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),t.codes=Object.freeze({0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",212:"md4",213:"md5",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46e3:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),t.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46e3:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(437);(t=e.exports=a).encode=function(e,t){var r=s(e);return a(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString());var t=e.substring(0,1);"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e));var r=s(t);return n.from(r.decode(e.toString()))},t.isEncoded=function(e){n.isBuffer(e)&&(e=e.toString());if("[object String]"!==Object.prototype.toString.call(e))return!1;var t=e.substring(0,1);try{return s(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes));var o=new Error("Unsupported encoding");function a(e,t){if(!t)throw new Error("requires an encoded buffer");var r=s(e),i=n.from(r.code);return function(e,t){s(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function s(e){var t;if(i.names[e])t=i.names[e];else{if(!i.codes[e])throw o;t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet");return t}},function(e,t,r){"use strict";var n=r(438),i=r(194),o=r(439),a=r(440),s=r(441),f=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],u=f.reduce((function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e}),{}),c=f.reduce((function(e,t){return e[t[1]]=u[t[0]],e}),{});e.exports={names:u,codes:c}},function(e,t,r){"use strict";var n=r(0),i=n(r(8)),o=n(r(9)),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.code=r,this.alphabet=o,n&&o&&(this.engine=n(o))}return(0,o.default)(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}();e.exports=a},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=5;)s+=t[a>>>o-5&31],o-=5;if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=";return s}e.exports=function(e){return{encode:function(t){return o("string"==typeof t?Uint8Array.from(t):t,e)},decode:function(t){var r,i=n(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(e.indexOf(o)<0)throw new Error("invalid base32 character")}}catch(e){i.e(e)}finally{i.f()}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8);return a.buffer}(t,e)}}}},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1,r=e.indexOf("-")>-1&&e.indexOf("_")>-1;return{encode:function(e){var n="";n="string"==typeof e?o.from(e).toString("base64"):e.toString("base64"),r&&(n=n.replace(/\+/g,"-").replace(/\//g,"_"));var i=n.indexOf("=");return i>0&&!t&&(n=n.substring(0,i)),n},decode:function(t){var r,i=n(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(e.indexOf(a)<0)throw new Error("invalid base64 character")}}catch(e){i.e(e)}finally{i.f()}return o.from(t,"base64")}}}},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(66),o=r(443),a=r(444),s=r(195);(t=e.exports).addPrefix=function(e,t){var r;if(n.isBuffer(e))r=s.varintBufferEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");r=a[e]}return n.concat([r,t])},t.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},t.getCodec=function(e){var t=i.decode(e),r=o.get(t);if(void 0===r)throw new Error("Code ".concat(t," not found"));return r},t.getName=function(e){return o.get(e)},t.getNumber=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return s.varintBufferDecode(t)[0]},t.getCode=function(e){return i.decode(e)},t.getCodeVarint=function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},t.getVarint=function(e){return i.encode(e)};var f=r(445);Object.assign(t,f),t.print=r(446)},function(e,t,r){"use strict";var n=r(67),i=new Map;for(var o in n){var a=n[o];i.set(a,o)}e.exports=Object.freeze(i)},function(e,t,r){"use strict";var n=r(67),i=r(195).varintEncode,o={};for(var a in n){var s=n[a];o[a]=i(s)}e.exports=Object.freeze(o)},function(e,t,r){"use strict";for(var n=r(0)(r(29)),i=r(67),o={},a=0,s=Object.entries(i);a=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var c,l="Signer Error: ",h=d(u);try{for(h.s();!(c=h.n()).done;){var p=c.value;l+="".concat(l," ").concat(p,".")}}catch(e){h.e(e)}finally{h.f()}throw new Error(l)}var b="0x"+f.serialize().toString("hex"),y=g.keccak256(b),m={messageHash:"0x"+n.from(f.getMessageToSign(!0)).toString("hex"),v:"0x"+f.v.toString("hex"),r:"0x"+f.r.toString("hex"),s:"0x"+f.s.toString("hex"),rawTransaction:b,transactionHash:y};return r(null,m),m}catch(e){return r(e),Promise.reject(e)}}return e.type=function(e){var t,r=void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas;void 0!==e.type?t=g.toHex(e.type):void 0===e.type&&r&&(t="0x2");if(void 0!==e.gasPrice&&("0x2"===t||r))throw Error("eip-1559 transactions don't support gasPrice");if(("0x1"===t||"0x0"===t)&&r)throw Error("pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas");r||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===S.London||e.hardfork&&e.hardfork.toLowerCase()===S.London?t="0x2":(e.accessList||e.common&&e.common.hardfork&&e.common.hardfork.toLowerCase()===S.Berlin||e.hardfork&&e.hardfork.toLowerCase()===S.Berlin)&&(t="0x1");return t}(e),void 0!==e.nonce&&void 0!==e.chainId&&(void 0!==e.gasPrice||void 0!==e.maxFeePerGas&&void 0!==e.maxPriorityFeePerGas)&&a?Promise.resolve(s(e)):Promise.all([E(e.common)||E(e.common.customChain.chainId)?E(e.chainId)?this._ethereumCall.getChainId():e.chainId:void 0,E(e.nonce)?this._ethereumCall.getTransactionCount(this.privateKeyToAccount(t).address):e.nonce,E(a)?this._ethereumCall.getNetworkId():1,O(this,e)]).then((function(t){var r=(0,f.default)(t,4),n=r[0],i=r[1],o=r[2],a=r[3];if(E(n)&&E(e.common)&&E(e.common.customChain.chainId)||E(i)||E(o)||E(a))throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return s(c(c(c({},e),E(e.common)||E(e.common.customChain.chainId)?{chainId:n}:{}),{},{nonce:i,networkId:o},a))}))},P.prototype.recoverTransaction=function(e){var t=n.from(e.slice(2),"hex"),r=_.fromSerializedData(t);return g.toChecksumAddress(r.getSenderAddress().toString("hex"))},P.prototype.hashMessage=function(e){var t=g.isHexStrict(e)?e:g.utf8ToHex(e),r=g.hexToBytes(t),i=n.from(r),o="Ethereum Signed Message:\n"+r.length,a=n.from(o),s=n.concat([a,i]);return A.bufferToHex(A.keccak256(s))},P.prototype.sign=function(e,t){if(t.startsWith("0x")||(t="0x"+t),66!==t.length)throw new Error("Private key must be 32 bytes long");var r=this.hashMessage(e),n=b.sign(r,t),i=b.decodeSignature(n);return{message:e,messageHash:r,v:i[0],r:i[1],s:i[2],signature:n}},P.prototype.recover=function(e,t,r){var n=[].slice.apply(arguments);return e&&"object"===(0,a.default)(e)?this.recover(e.messageHash,b.encodeSignature([e.v,e.r,e.s]),!0):(r||(e=this.hashMessage(e)),n.length>=4?(r="boolean"==typeof(r=n.slice(-1)[0])&&!!r,this.recover(e,b.encodeSignature(n.slice(1,4)),r)):b.recover(e,t))},P.prototype.decrypt=function(e,t,r){if("string"!=typeof t)throw new Error("No password given.");var i,s,f=e&&"object"===(0,a.default)(e)?e:JSON.parse(r?e.toLowerCase():e);if(3!==f.version)throw new Error("Not a valid V3 wallet");if("scrypt"===f.crypto.kdf)s=f.crypto.kdfparams,i=m.syncScrypt(n.from(t),n.from(s.salt,"hex"),s.n,s.r,s.p,s.dklen);else{if("pbkdf2"!==f.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(s=f.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");i=y.pbkdf2Sync(n.from(t),n.from(s.salt,"hex"),s.c,s.dklen,"sha256")}var u=n.from(f.crypto.ciphertext,"hex");if(g.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(u)))).replace("0x","")!==f.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var c=y.createDecipheriv(f.crypto.cipher,i.slice(0,16),n.from(f.crypto.cipherparams.iv,"hex")),d="0x"+n.from([].concat((0,o.default)(c.update(u)),(0,o.default)(c.final()))).toString("hex");return this.privateKeyToAccount(d,!0)},P.prototype.encrypt=function(e,t,r){var i,a=this.privateKeyToAccount(e,!0),s=(r=r||{}).salt||y.randomBytes(32),f=r.iv||y.randomBytes(16),u=r.kdf||"scrypt",c={dklen:r.dklen||32,salt:s.toString("hex")};if("pbkdf2"===u)c.c=r.c||262144,c.prf="hmac-sha256",i=y.pbkdf2Sync(n.from(t),n.from(c.salt,"hex"),c.c,c.dklen,"sha256");else{if("scrypt"!==u)throw new Error("Unsupported kdf");c.n=r.n||8192,c.r=r.r||8,c.p=r.p||1,i=m.syncScrypt(n.from(t),n.from(c.salt,"hex"),c.n,c.r,c.p,c.dklen)}var d=y.createCipheriv(r.cipher||"aes-128-ctr",i.slice(0,16),f);if(!d)throw new Error("Unsupported cipher");var l=n.from([].concat((0,o.default)(d.update(n.from(a.privateKey.replace("0x",""),"hex"))),(0,o.default)(d.final()))),h=g.sha3(n.from([].concat((0,o.default)(i.slice(16,32)),(0,o.default)(l)))).replace("0x","");return{version:3,id:v.v4({random:r.uuid||y.randomBytes(16)}),address:a.address.toLowerCase().replace("0x",""),crypto:{ciphertext:l.toString("hex"),cipherparams:{iv:f.toString("hex")},cipher:r.cipher||"aes-128-ctr",kdf:u,kdfparams:c,mac:h.toString("hex")}}},R.prototype._findSafeIndex=function(e){return e=e||0,this.hasOwnProperty(e)?this._findSafeIndex(e+1):e},R.prototype._currentIndexes=function(){return Object.keys(this).map((function(e){return parseInt(e)})).filter((function(e){return e<9e20}))},R.prototype.create=function(e,t){for(var r=0;r7?e[n+2].toUpperCase():e[n+2];return r},l=function(e){var r=new t(e.slice(2),"hex"),n="0x"+s.keyFromPrivate(r).getPublic(!1,"hex").slice(2),i=u(n);return{address:d("0x"+i.slice(-40)),privateKey:e}},h=function(e){var t=(0,n.default)(e,3),r=t[0],o=t[1],a=t[2];return i.flatten([o,a,r])},p=function(e){return[i.slice(64,i.length(e),e),i.slice(0,32,e),i.slice(32,64,e)]},b=function(e){return function(r,n){var a=s.keyFromPrivate(new t(n.slice(2),"hex")).sign(new t(r.slice(2),"hex"),{canonical:!0});return h([o.fromString(i.fromNumber(e+a.recoveryParam)),i.pad(32,i.fromNat("0x"+a.r.toString(16))),i.pad(32,i.fromNat("0x"+a.s.toString(16)))])}},y=b(27);e.exports={create:function(e){var t=u(i.concat(i.random(32),e||i.random(32))),r=i.concat(i.concat(i.random(32),t),i.random(32)),n=u(r);return l(n)},toChecksum:d,fromPrivate:l,sign:y,makeSigner:b,recover:function(e,r){var n=p(r),o={v:i.toNumber(n[0]),r:n[1].slice(2),s:n[2].slice(2)},a="0x"+s.recoverPubKey(new t(e.slice(2),"hex"),o,o.v<2?o.v:1-o.v%2).encode("hex",!1).slice(2),f=u(a);return d("0x"+f.slice(-40))},encodeSignature:h,decodeSignature:p}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=function(e,t){for(var r=[],n=0;n64?t=e(t):t.length<64&&(t=i.concat([t,a],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),s=0;s<64;s++)r[s]=54^t[s],n[s]=92^t[s];this._hash=[r]}n(s,o),s.prototype._update=function(e){this._hash.push(e)},s.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=s},function(e,t,r){"use strict";e.exports=r(200)},function(e,t,r){"use strict";(function(t){var n,i,o=r(5).Buffer,a=r(202),s=r(203),f=r(204),u=r(205),c=t.crypto&&t.crypto.subtle,d={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function h(){return i||(i=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function p(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,r,i,b,y,m){"function"==typeof y&&(m=y,y=void 0);var v=d[(y=y||"sha1").toLowerCase()];if(v&&"function"==typeof t.Promise){if(a(i,b),e=u(e,s,"Password"),r=u(r,s,"Salt"),"function"!=typeof m)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){h()((function(){t(null,e)}))}),(function(e){h()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];var r=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return l[e]=r,r}(v).then((function(t){return t?p(e,r,i,b,v):f(e,r,i,b,y)})),m)}else h()((function(){var t;try{t=f(e,r,i,b,y)}catch(e){return m(e)}m(null,t)}))}}).call(this,r(7))},function(e,t,r){"use strict";var n=r(463),i=r(111),o=r(112),a=r(476),s=r(85);function f(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return f(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=f,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=s(t,!1,r,n);return u(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=u,t.listCiphers=t.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},function(e,t,r){"use strict";var n=r(31),i=r(464),o=r(4),a=r(5).Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function f(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=a.concat([o,o.slice(0,8)]));var f=e.iv;a.isBuffer(f)||(f=a.from(f)),this._des=i.create({key:o,iv:f,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=f,o(f,n),f.prototype._update=function(e){return a.from(this._des.update(e))},f.prototype._final=function(){return a.from(this._des.final())}},function(e,t,r){"use strict";t.utils=r(206),t.Cipher=r(110),t.DES=r(207),t.CBC=r(465),t.EDE=r(466)},function(e,t,r){"use strict";var n=r(19),i=r(4),o={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t15){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=o.allocUnsafe(e),r=-1;++r>a%8,e._prev=o(e._prev,r?n:i);return s}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=a},function(e,t,r){"use strict";var n=r(211),i=r(5).Buffer,o=r(112),a=r(212),s=r(31),f=r(84),u=r(85);function c(e,t,r){s.call(this),this._cache=new d,this._last=void 0,this._cipher=new f.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function d(){this.cache=i.allocUnsafe(0)}function l(e,t,r){var s=o[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new c(s.module,t,r)}r(4)(c,s),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},c.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 r=-1;for(;++r16)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},d.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return l(e,n.key,n.iv)},t.createDecipheriv=l},function(e,t,r){"use strict";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}},function(e,t,r){"use strict";(function(e){var n=r(213),i=r(478),o=r(479);var a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new o(r,n)},t.createDiffieHellman=t.DiffieHellman=function t(r,i,s,f){return e.isBuffer(i)||void 0===a[i]?t(r,"binary",i,s):(i=i||"binary",f=f||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,f)),"number"==typeof r?new o(n(r,s),s,!0):(e.isBuffer(r)||(r=new e(r,i)),new o(r,s,!0)))}}).call(this,r(1).Buffer)},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,r){"use strict";(function(t){var n=r(3),i=new(r(214)),o=new n(24),a=new n(11),s=new n(10),f=new n(3),u=new n(7),c=r(213),d=r(30);function l(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this}function h(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this}e.exports=b;var p={};function b(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=l,this.setPrivateKey=h):this._primeCode=8}function y(e,r){var n=new t(e.toArray());return r?n.toString(r):n}Object.defineProperty(b.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in p)return p[n];var d,l=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return l+=1,l+="02"===r||"05"===r?8:4,p[n]=l,l;switch(i.test(e.shrn(1))||(l+=2),r){case"02":e.mod(o).cmp(a)&&(l+=8);break;case"05":(d=e.mod(s)).cmp(f)&&d.cmp(u)&&(l+=8);break;default:l+=4}return p[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),b.prototype.generateKeys=function(){return this._priv||(this._priv=new n(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},b.prototype.computeSecret=function(e){var r=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new t(r.toArray()),o=this.getPrime();if(i.length0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";var n=r(5).Buffer,i=r(198),o=r(114),a=r(59).ec,s=r(3),f=r(86),u=r(226);function c(e,t,r,o){if((e=n.from(e.toArray())).length0&&r.ishrn(n),r}function l(e,t,r){var o,a;do{for(o=n.alloc(0);8*o.length=t)throw new Error("invalid sig")}e.exports=function(e,t,r,u,c){var d=a(r);if("ec"===d.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,d)}if("dsa"===d.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,s=r.data.g,u=r.data.pub_key,c=a.signature.decode(e,"der"),d=c.s,l=c.r;f(d,o),f(l,o);var h=i.mont(n),p=d.invm(o);return 0===s.toRed(h).redPow(new i(t).mul(p).mod(o)).fromRed().mul(u.toRed(h).redPow(l.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(l)}(e,t,d)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=n.concat([c,t]);for(var l=d.modulus.byteLength(),h=[1],p=0;t.length+h.length+2r-l-2)throw new Error("message too long");var h=d.alloc(r-n-l-2),p=r-c-1,b=i(c),y=s(d.concat([u,h,d.alloc(1,1),t],p),a(b,p)),m=s(b,a(y,c));return new f(d.concat([d.alloc(1),m,y],r))}(p,t);else if(1===l)h=function(e,t,r){var n,o=t.length,a=e.modulus.byteLength();if(o>a-11)throw new Error("message too long");n=r?d.alloc(a-o-3,255):function(e){var t,r=d.allocUnsafe(e),n=0,o=i(2*e),a=0;for(;n=0)throw new Error("data too long for modulus")}return r?c(h,p):u(h,p)}},function(e,t,r){"use strict";var n=r(86),i=r(227),o=r(228),a=r(3),s=r(114),f=r(45),u=r(229),c=r(5).Buffer;e.exports=function(e,t,r){var d;d=e.padding?e.padding:r?1:4;var l,h=n(e),p=h.modulus.byteLength();if(t.length>p||new a(t).cmp(h.modulus)>=0)throw new Error("decryption error");l=r?u(new a(t),h):s(t,h);var b=c.alloc(p-l.length);if(l=c.concat([b,l],p),4===d)return function(e,t){var r=e.modulus.byteLength(),n=f("sha1").update(c.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),u=t.slice(a+1),d=o(s,i(u,a)),l=o(u,i(d,r-a-1));if(function(e,t){e=c.from(e),t=c.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;for(;++i=t.length){o++;break}var a=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,l,r);if(3===d)return l;throw new Error("unknown padding")}},function(e,t,r){"use strict";(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(5),a=r(30),s=o.Buffer,f=o.kMaxLength,u=e.crypto||e.msCrypto,c=Math.pow(2,32)-1;function d(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>f||e>t)throw new RangeError("offset out of range")}function l(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>f)throw new RangeError("buffer too small")}function h(e,t,r,i){if(n.browser){var o=e.buffer,s=new Uint8Array(o,t,r);return u.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return a(r).copy(e,t),e;a(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}u&&u.getRandomValues||!n.browser?(t.randomFill=function(t,r,n,i){if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return d(r,t.length),l(n,r,t.length),h(t,r,n,i)},t.randomFillSync=function(t,r,n){void 0===r&&(r=0);if(!(s.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');d(r,t.length),void 0===n&&(n=t.length-r);return l(n,r,t.length),h(t,r,n)}):(t.randomFill=i,t.randomFillSync=i)}).call(this,r(7),r(6))},function(e,t,r){"use strict";var n=r(3),i=r(197),o=function(e){return new n(e.slice(2),16)},a=function(e){var t="0x"+("0x"===e.slice(0,2)?new n(e.slice(2),16):new n(e,10)).toString("hex");return"0x0"===t?"0x":t},s=function(e){return"string"==typeof e?/^0x/.test(e)?e:"0x"+e:"0x"+new n(e).toString("hex")},f=function(e){return o(e).toNumber()},u=function(e){return function(t,r){return"0x"+o(t)[e](o(r)).toString("hex")}},c=u("add"),d=u("mul"),l=u("div"),h=u("sub");e.exports={toString:function(e){return o(e).toString(10)},fromString:a,toNumber:f,fromNumber:s,toEther:function(e){return f(l(e,a("10000000000")))/1e8},fromEther:function(e){return d(s(Math.floor(1e8*e)),a("10000000000"))},toUint256:function(e){return i.pad(32,e)},add:c,mul:d,div:l,sub:h}},function(e,t,r){"use strict";e.exports={encode:function(e){var t=function(e){return(t=e.toString(16)).length%2==0?t:"0"+t;var t},r=function(e,r){return e<56?t(r+e):t(r+t(e).length/2+55)+t(e)};return"0x"+function e(t){if("string"==typeof t){var n=t.slice(2);return(2!=n.length||n>="80"?r(n.length/2,128):"")+n}var i=t.map(e).join("");return r(i.length/2,192)+i}(e)},decode:function(e){var t=2,r=function(){if(t>=e.length)throw"";var r=e.slice(t,t+2);return r<"80"?(t+=2,"0x"+r):r<"c0"?i():o()},n=function(){var r=parseInt(e.slice(t,t+=2),16)%64;return r<56?r:parseInt(e.slice(t,t+=2*(r-55)),16)},i=function(){var r=n();return"0x"+e.slice(t,t+=2*r)},o=function(){for(var e=2*n()+t,i=[];t>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(f<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|l>>>31),r=f^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=b^~m&g,e[1]=y^~v&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=m^~g&_,e[3]=v^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&b,e[7]=k^~A&y,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~b&m,e[9]=A^~y&v,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=a[n],e[1]^=a[n+1]},f=function(e){return function(t){var r;if("0x"===t.slice(0,2)){r=[];for(var a=2,f=t.length;a>2]|=t[h]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(f[y>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=u){for(e.start=y-u,e.block=f[c],y=0;y>2]|=i[3&y],e.lastByteIndex===u)for(f[0]=f[c],y=1;y>4&15]+n[15&p]+n[p>>12&15]+n[p>>8&15]+n[p>>20&15]+n[p>>16&15]+n[p>>28&15]+n[p>>24&15];m%c==0&&(s(l),y=0)}return"0x"+b}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),r)}};e.exports={keccak256:f(256),keccak512:f(512),keccak256s:f(256),keccak512s:f(512)}},function(e,t,r){"use strict";(function(t){!function(r){function n(e){var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,f=528734635,u=1541459225,c=new Uint32Array(64);function d(e){for(var d=0,l=e.length;l>=64;){var h=r,p=n,b=i,y=o,m=a,v=s,g=f,w=u,_=void 0,k=void 0,S=void 0,A=void 0,E=void 0;for(k=0;k<16;k++)S=d+4*k,c[k]=(255&e[S])<<24|(255&e[S+1])<<16|(255&e[S+2])<<8|255&e[S+3];for(k=16;k<64;k++)A=((_=c[k-2])>>>17|_<<15)^(_>>>19|_<<13)^_>>>10,E=((_=c[k-15])>>>7|_<<25)^(_>>>18|_<<14)^_>>>3,c[k]=(A+c[k-7]|0)+(E+c[k-16]|0)|0;for(k=0;k<64;k++)A=(((m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&v^~m&g)|0)+(w+(t[k]+c[k]|0)|0)|0,E=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&p^h&b^p&b)|0,w=g,g=v,v=m,m=y+A|0,y=b,b=p,p=h,h=A+E|0;r=r+h|0,n=n+p|0,i=i+b|0,o=o+y|0,a=a+m|0,s=s+v|0,f=f+g|0,u=u+w|0,d+=64,l-=64}}d(e);var l,h=e.length%64,p=e.length/536870912|0,b=e.length<<3,y=h<56?56:120,m=e.slice(e.length-h,e.length);for(m.push(128),l=h+1;l>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(b>>>24&255),m.push(b>>>16&255),m.push(b>>>8&255),m.push(b>>>0&255),d(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function i(e,t,r){e=e.length<=64?e:n(e);var i,o=64+t.length+4,a=new Array(o),s=new Array(64),f=[];for(i=0;i<64;i++)a[i]=54;for(i=0;i=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;r>=32;)u(),f=f.concat(n(s.concat(n(a)))),r-=32;return r>0&&(u(),f=f.concat(n(s.concat(n(a))).slice(0,r))),f}function o(e,t,r,n,i){var o;for(u(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)f(e,16*o,i,16),s(i,n),u(i,0,e,t+16*o,16);for(o=0;o>>32-t}function s(e,t){u(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=a(t[0]+t[12],7),t[8]^=a(t[4]+t[0],9),t[12]^=a(t[8]+t[4],13),t[0]^=a(t[12]+t[8],18),t[9]^=a(t[5]+t[1],7),t[13]^=a(t[9]+t[5],9),t[1]^=a(t[13]+t[9],13),t[5]^=a(t[1]+t[13],18),t[14]^=a(t[10]+t[6],7),t[2]^=a(t[14]+t[10],9),t[6]^=a(t[2]+t[14],13),t[10]^=a(t[6]+t[2],18),t[3]^=a(t[15]+t[11],7),t[7]^=a(t[3]+t[15],9),t[11]^=a(t[7]+t[3],13),t[15]^=a(t[11]+t[7],18),t[1]^=a(t[0]+t[3],7),t[2]^=a(t[1]+t[0],9),t[3]^=a(t[2]+t[1],13),t[0]^=a(t[3]+t[2],18),t[6]^=a(t[5]+t[4],7),t[7]^=a(t[6]+t[5],9),t[4]^=a(t[7]+t[6],13),t[5]^=a(t[4]+t[7],18),t[11]^=a(t[10]+t[9],7),t[8]^=a(t[11]+t[10],9),t[9]^=a(t[8]+t[11],13),t[10]^=a(t[9]+t[8],18),t[12]^=a(t[15]+t[14],7),t[13]^=a(t[12]+t[15],9),t[14]^=a(t[13]+t[12],13),t[15]^=a(t[14]+t[13],18);for(var n=0;n<16;++n)e[n]+=t[n]}function f(e,t,r,n){for(var i=0;i=256)return!1}return!0}function d(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function l(e,r,n,a,s,l,h){if(n=d(n,"N"),a=d(a,"r"),s=d(s,"p"),l=d(l,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>2147483647/128/a)throw new Error("N too large");if(a>2147483647/128/s)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var p=i(e,r,128*s*a),b=new Uint32Array(32*s*a),y=0;yM&&(r=M);for(var c=0;cM&&(r=M);for(var y=0;y>0&255),p.push(b[C]>>8&255),p.push(b[C]>>16&255),p.push(b[C]>>24&255);var j=i(e,p,l);return h&&h(null,1,j),j}h&&I(t)};if(!h)for(;;){var C=B();if(null!=C)return C}B()}var h={scrypt:function(e,t,r,n,i,o,a){return new Promise((function(s,f){var u=0;a&&a(0),l(e,t,r,n,i,o,(function(e,t,r){if(e)f(e);else if(r)a&&1!==u&&a(1),s(new Uint8Array(r));else if(a&&t!==u)return u=t,a(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(l(e,t,r,n,i,o))}};e.exports=h}()}).call(this,r(164).setImmediate)},function(e,t,r){"use strict";var n=r(510),i=r(511),o=i;o.v1=n,o.v4=i,e.exports=o},function(e,t,r){"use strict";var n,i,o=r(230),a=r(231),s=0,f=0;e.exports=function(e,t,r){var u=t&&r||0,c=t||[],d=(e=e||{}).node||n,l=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==l){var h=o();null==d&&(d=n=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==l&&(l=i=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),b=void 0!==e.nsecs?e.nsecs:f+1,y=p-s+(b-f)/1e4;if(y<0&&void 0===e.clockseq&&(l=l+1&16383),(y<0||p>s)&&void 0===e.nsecs&&(b=0),b>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,f=b,i=l;var m=(1e4*(268435455&(p+=122192928e5))+b)%4294967296;c[u++]=m>>>24&255,c[u++]=m>>>16&255,c[u++]=m>>>8&255,c[u++]=255&m;var v=p/4294967296*1e4&268435455;c[u++]=v>>>8&255,c[u++]=255&v,c[u++]=v>>>24&15|16,c[u++]=v>>>16&255,c[u++]=l>>>8|128,c[u++]=255&l;for(var g=0;g<6;++g)c[u+g]=d[g];return t||a(c)}},function(e,t,r){"use strict";var n=r(230),i=r(231);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,r){"use strict";(function(e){var n,i=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=r(28),f=r(53),u=r(119),c=function(t){function r(e,r){var n;void 0===r&&(r={});var i=t.call(this,o(o({},e),{type:0}))||this;if(i.common=i._validateTxV(i.v,r.common),i.gasPrice=new s.BN((0,s.toBuffer)(""===e.gasPrice?"0x":e.gasPrice)),i._validateCannotExceedMaxInteger({gasPrice:i.gasPrice}),i.common.gteHardfork("spuriousDragon"))if(i.isSigned()){var a=i.v,u=i.common.chainIdBN().muln(2);(a.eq(u.addn(35))||a.eq(u.addn(36)))&&i.activeCapabilities.push(f.Capability.EIP155ReplayProtection)}else i.activeCapabilities.push(f.Capability.EIP155ReplayProtection);return(null===(n=null==r?void 0:r.freeze)||void 0===n||n)&&Object.freeze(i),i}return i(r,t),r.fromTxData=function(e,t){return void 0===t&&(t={}),new r(e,t)},r.fromSerializedTx=function(e,t){void 0===t&&(t={});var r=s.rlp.decode(e);if(!Array.isArray(r))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(r,t)},r.fromRlpSerializedTx=function(e,t){return void 0===t&&(t={}),r.fromSerializedTx(e,t)},r.fromValuesArray=function(e,t){if(void 0===t&&(t={}),6!==e.length&&9!==e.length)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");var n=a(e,9);return new r({nonce:n[0],gasPrice:n[1],gasLimit:n[2],to:n[3],value:n[4],data:n[5],v:n[6],r:n[7],s:n[8]},t)},r.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:e.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):e.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):e.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):e.from([])]},r.prototype.serialize=function(){return s.rlp.encode(this.raw())},r.prototype._getMessageToSign=function(){var t=[(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:e.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data];return this.supports(f.Capability.EIP155ReplayProtection)&&(t.push((0,s.toBuffer)(this.common.chainIdBN())),t.push((0,s.unpadBuffer)((0,s.toBuffer)(0))),t.push((0,s.unpadBuffer)((0,s.toBuffer)(0)))),t},r.prototype.getMessageToSign=function(e){void 0===e&&(e=!0);var t=this._getMessageToSign();return e?(0,s.rlphash)(t):t},r.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},r.prototype.hash=function(){return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.rlphash)(this.raw())),this.cache.hash):(0,s.rlphash)(this.raw())},r.prototype.getMessageToVerifySignature=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this._getMessageToSign();return(0,s.rlphash)(e)},r.prototype.getSenderPublicKey=function(){var e,t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(f.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this.v,n=this.r,i=this.s;try{return(0,s.ecrecover)(t,r,(0,s.bnToUnpaddedBuffer)(n),(0,s.bnToUnpaddedBuffer)(i),this.supports(f.Capability.EIP155ReplayProtection)?this.common.chainIdBN():void 0)}catch(e){throw new Error("Invalid Signature")}},r.prototype._processSignature=function(e,t,n){var i=new s.BN(e);this.supports(f.Capability.EIP155ReplayProtection)&&i.iadd(this.common.chainIdBN().muln(2).addn(8));var o={common:this.common};return r.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:i,r:new s.BN(t),s:new s.BN(n)},o)},r.prototype.toJSON=function(){return{nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},r.prototype._validateTxV=function(e,t){var r;if(void 0!==e&&!e.eqn(0)&&(!t||t.gteHardfork("spuriousDragon"))&&!e.eqn(27)&&!e.eqn(28))if(t){var n=t.chainIdBN().muln(2);if(!(e.eq(n.addn(35))||e.eq(n.addn(36))))throw new Error("Incompatible EIP155-based V "+e.toString()+" and chain id "+t.chainIdBN().toString()+". See the Common parameter of the Transaction constructor to set the chain id.")}else{var i=void 0;i=e.subn(35).isEven()?35:36,r=e.subn(i).divn(2)}return this._getCommon(t,r)},r.prototype._unsignedTxImplementsEIP155=function(){return this.common.gteHardfork("spuriousDragon")},r.prototype._signedTxImplementsEIP155=function(){if(!this.isSigned())throw Error("This transaction is not signed");var e=this.common.gteHardfork("spuriousDragon"),t=this.v,r=this.common.chainIdBN().muln(2);return(t.eq(r.addn(35))||t.eq(r.addn(36)))&&e},r}(u.BaseTransaction);t.default=c}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n,i,o=r(0)(r(2));i=function(e){e.version="1.2.0";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}();e.table=t,e.bstr=function(e,r){for(var n=-1^r,i=e.length-1,o=0;o>>8^t[255&(n^e.charCodeAt(o++))])>>>8^t[255&(n^e.charCodeAt(o++))];return o===i&&(n=n>>>8^t[255&(n^e.charCodeAt(o))]),-1^n},e.buf=function(e,r){if(e.length>1e4)return function(e,r){for(var n=-1^r,i=e.length-7,o=0;o>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])];for(;o>>8^t[255&(n^e[o++])];return-1^n}(e,r);for(var n=-1^r,i=e.length-3,o=0;o>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])])>>>8^t[255&(n^e[o++])];for(;o>>8^t[255&(n^e[o++])];return-1^n},e.str=function(e,r){for(var n,i,o=-1^r,a=0,s=e.length;a>>8^t[255&(o^n)]:n<2048?o=(o=o>>>8^t[255&(o^(192|n>>6&31))])>>>8^t[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),i=1023&e.charCodeAt(a++),o=(o=(o=(o=o>>>8^t[255&(o^(240|n>>8&7))])>>>8^t[255&(o^(128|n>>2&63))])>>>8^t[255&(o^(128|i>>6&15|(3&n)<<4))])>>>8^t[255&(o^(128|63&i))]):o=(o=(o=o>>>8^t[255&(o^(224|n>>12&15))])>>>8^t[255&(o^(128|n>>6&63))])>>>8^t[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?"object"===(0,o.default)(t)?i(t):void 0===(n=function(){var e={};return i(e),e}.call(t,r,t,e))||(e.exports=n):i({})}).call(this,r(27)(e))},function(e,t,r){"use strict";var n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.chains=t._getInitializedChains=void 0;var o=i(r(515)),a=i(r(516)),s=i(r(517)),f=i(r(518)),u=i(r(519));function c(e){var t,r,i={1:"mainnet",3:"ropsten",4:"rinkeby",42:"kovan",5:"goerli"},c={mainnet:o.default,ropsten:a.default,rinkeby:s.default,kovan:f.default,goerli:u.default};if(e)try{for(var d=n(e),l=d.next();!l.done;l=d.next()){var h=l.value,p=h.name;i[h.chainId.toString()]=p,c[p]=h}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}return c.names=i,c}t._getInitializedChains=c,t.chains=c()},function(e){e.exports=JSON.parse('{"name":"mainnet","chainId":1,"networkId":1,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"The Ethereum main chain","url":"https://ethstats.net/","genesis":{"hash":"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3","timestamp":null,"gasLimit":5000,"difficulty":17179869184,"nonce":"0x0000000000000042","extraData":"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa","stateRoot":"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xfc64ec04"},{"name":"homestead","block":1150000,"forkHash":"0x97c2c34c"},{"name":"dao","block":1920000,"forkHash":"0x91d1f948"},{"name":"tangerineWhistle","block":2463000,"forkHash":"0x7a64da13"},{"name":"spuriousDragon","block":2675000,"forkHash":"0x3edd5b10"},{"name":"byzantium","block":4370000,"forkHash":"0xa00bc324"},{"name":"constantinople","block":7280000,"forkHash":"0x668db0af"},{"name":"petersburg","block":7280000,"forkHash":"0x668db0af"},{"name":"istanbul","block":9069000,"forkHash":"0x879d6e30"},{"name":"muirGlacier","block":9200000,"forkHash":"0xe029e991"},{"name":"berlin","block":12244000,"forkHash":"0x0eb440f6"},{"name":"london","block":12965000,"forkHash":"0xb715077d"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"18.138.108.67","port":30303,"id":"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666","location":"ap-southeast-1-001","comment":"bootnode-aws-ap-southeast-1-001"},{"ip":"3.209.45.79","port":30303,"id":"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de","location":"us-east-1-001","comment":"bootnode-aws-us-east-1-001"},{"ip":"34.255.23.113","port":30303,"id":"ca6de62fce278f96aea6ec5a2daadb877e51651247cb96ee310a318def462913b653963c155a0ef6c7d50048bba6e6cea881130857413d9f50a621546b590758","location":"eu-west-1-001","comment":"bootnode-aws-eu-west-1-001"},{"ip":"35.158.244.151","port":30303,"id":"279944d8dcd428dffaa7436f25ca0ca43ae19e7bcf94a8fb7d1641651f92d121e972ac2e8f381414b80cc8e5555811c2ec6e1a99bb009b3f53c4c69923e11bd8","location":"eu-central-1-001","comment":"bootnode-aws-eu-central-1-001"},{"ip":"52.187.207.27","port":30303,"id":"8499da03c47d637b20eee24eec3c356c9a2e6148d6fe25ca195c7949ab8ec2c03e3556126b0d7ed644675e78c4318b08691b7b57de10e5f0d40d05b09238fa0a","location":"australiaeast-001","comment":"bootnode-azure-australiaeast-001"},{"ip":"191.234.162.198","port":30303,"id":"103858bdb88756c71f15e9b5e09b56dc1be52f0a5021d46301dbbfb7e130029cc9d0d6f73f693bc29b665770fff7da4d34f3c6379fe12721b5d7a0bcb5ca1fc1","location":"brazilsouth-001","comment":"bootnode-azure-brazilsouth-001"},{"ip":"52.231.165.108","port":30303,"id":"715171f50508aba88aecd1250af392a45a330af91d7b90701c436b618c86aaa1589c9184561907bebbb56439b8f8787bc01f49a7c77276c58c1b09822d75e8e8","location":"koreasouth-001","comment":"bootnode-azure-koreasouth-001"},{"ip":"104.42.217.25","port":30303,"id":"5d6d7cd20d6da4bb83a1d28cadb5d409b64edf314c0335df658c1a54e32c7c4a7ab7823d57c39b6a757556e68ff1df17c748b698544a55cb488b52479a92b60f","location":"westus-001","comment":"bootnode-azure-westus-001"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]}')},function(e){e.exports=JSON.parse('{"name":"ropsten","chainId":3,"networkId":3,"defaultHardfork":"istanbul","consensus":{"type":"pow","algorithm":"ethash","ethash":{}},"comment":"PoW test network","url":"https://github.com/ethereum/ropsten","genesis":{"hash":"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d","timestamp":null,"gasLimit":16777216,"difficulty":1048576,"nonce":"0x0000000000000042","extraData":"0x3535353535353535353535353535353535353535353535353535353535353535","stateRoot":"0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x30c7ddbc"},{"name":"homestead","block":0,"forkHash":"0x30c7ddbc"},{"name":"tangerineWhistle","block":0,"forkHash":"0x30c7ddbc"},{"name":"spuriousDragon","block":10,"forkHash":"0x63760190"},{"name":"byzantium","block":1700000,"forkHash":"0x3ea159c7"},{"name":"constantinople","block":4230000,"forkHash":"0x97b544f3"},{"name":"petersburg","block":4939394,"forkHash":"0xd6e2149b"},{"name":"istanbul","block":6485846,"forkHash":"0x4bc66396"},{"name":"muirGlacier","block":7117117,"forkHash":"0x6727ef90"},{"name":"berlin","block":9812189,"forkHash":"0xa157d377"},{"name":"london","block":10499401,"forkHash":"0x7119b6b3"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"52.176.7.10","port":30303,"id":"30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606","location":"","comment":"US-Azure geth"},{"ip":"52.176.100.77","port":30303,"id":"865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c","location":"","comment":"US-Azure parity"},{"ip":"52.232.243.152","port":30303,"id":"6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f","location":"","comment":"Parity"},{"ip":"192.81.208.223","port":30303,"id":"94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09","location":"","comment":"@gpip"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.ropsten.ethdisco.net"]}')},function(e){e.exports=JSON.parse('{"name":"rinkeby","chainId":4,"networkId":4,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"PoA test network","url":"https://www.rinkeby.io","genesis":{"hash":"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177","timestamp":"0x58ee40ba","gasLimit":4700000,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x3b8e0691"},{"name":"homestead","block":1,"forkHash":"0x60949295"},{"name":"tangerineWhistle","block":2,"forkHash":"0x8bde40dd"},{"name":"spuriousDragon","block":3,"forkHash":"0xcb3a64bb"},{"name":"byzantium","block":1035301,"forkHash":"0x8d748b57"},{"name":"constantinople","block":3660663,"forkHash":"0xe49cab14"},{"name":"petersburg","block":4321234,"forkHash":"0xafec6b27"},{"name":"istanbul","block":5435345,"forkHash":"0xcbdb8838"},{"name":"berlin","block":8290928,"forkHash":"0x6910c8bd"},{"name":"london","block":8897988,"forkHash":"0x8e29f2f3"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"52.169.42.101","port":30303,"id":"a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf","location":"","comment":"IE"},{"ip":"52.3.158.184","port":30303,"id":"343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8","location":"","comment":"INFURA"},{"ip":"159.89.28.211","port":30303,"id":"b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6","location":"","comment":"AKASHA"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net"]}')},function(e){e.exports=JSON.parse('{"name":"kovan","chainId":42,"networkId":42,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"aura","aura":{}},"comment":"Parity PoA test network","url":"https://kovan-testnet.github.io/website/","genesis":{"hash":"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9","timestamp":null,"gasLimit":6000000,"difficulty":131072,"nonce":"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","extraData":"0x","stateRoot":"0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0x010ffe56"},{"name":"homestead","block":0,"forkHash":"0x010ffe56"},{"name":"tangerineWhistle","block":0,"forkHash":"0x010ffe56"},{"name":"spuriousDragon","block":0,"forkHash":"0x010ffe56"},{"name":"byzantium","block":5067000,"forkHash":"0x7f83c620"},{"name":"constantinople","block":9200000,"forkHash":"0xa94e3dc4"},{"name":"petersburg","block":10255201,"forkHash":"0x186874aa"},{"name":"istanbul","block":14111141,"forkHash":"0x7f6599a6"},{"name":"berlin","block":null,"forkHash":null},{"name":"london","block":null,"forkHash":null},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"116.203.116.241","port":30303,"id":"16898006ba2cd4fa8bf9a3dfe32684c178fa861df144bfc21fe800dc4838a03e342056951fa9fd533dcb0be1219e306106442ff2cf1f7e9f8faa5f2fc1a3aa45","location":"","comment":"1"},{"ip":"3.217.96.11","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"2"},{"ip":"108.61.170.124","port":30303,"id":"740e1c8ea64e71762c71a463a04e2046070a0c9394fcab5891d41301dc473c0cff00ebab5a9bc87fbcb610ab98ac18225ff897bc8b7b38def5975d5ceb0a7d7c","location":"","comment":"3"},{"ip":"157.230.31.163","port":30303,"id":"2909846f78c37510cc0e306f185323b83bb2209e5ff4fdd279d93c60e3f365e3c6e62ad1d2133ff11f9fd6d23ad9c3dad73bb974d53a22f7d1ac5b7dea79d0b0","location":"","comment":"4"}]}')},function(e){e.exports=JSON.parse('{"name":"goerli","chainId":5,"networkId":5,"defaultHardfork":"istanbul","consensus":{"type":"poa","algorithm":"clique","clique":{"period":15,"epoch":30000}},"comment":"Cross-client PoA test network","url":"https://github.com/goerli/testnet","genesis":{"hash":"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a","timestamp":"0x5c51a607","gasLimit":10485760,"difficulty":1,"nonce":"0x0000000000000000","extraData":"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","stateRoot":"0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"},"hardforks":[{"name":"chainstart","block":0,"forkHash":"0xa3f5ab08"},{"name":"homestead","block":0,"forkHash":"0xa3f5ab08"},{"name":"tangerineWhistle","block":0,"forkHash":"0xa3f5ab08"},{"name":"spuriousDragon","block":0,"forkHash":"0xa3f5ab08"},{"name":"byzantium","block":0,"forkHash":"0xa3f5ab08"},{"name":"constantinople","block":0,"forkHash":"0xa3f5ab08"},{"name":"petersburg","block":0,"forkHash":"0xa3f5ab08"},{"name":"istanbul","block":1561651,"forkHash":"0xc25efa5c"},{"name":"berlin","block":4460644,"forkHash":"0x757a1c47"},{"name":"london","block":5062605,"forkHash":"0xb8c6299d"},{"name":"merge","block":null,"forkash":null},{"name":"shanghai","block":null,"forkash":null}],"bootstrapNodes":[{"ip":"51.141.78.53","port":30303,"id":"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a","location":"","comment":"Upstream bootnode 1"},{"ip":"13.93.54.137","port":30303,"id":"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b","location":"","comment":"Upstream bootnode 2"},{"ip":"94.237.54.114","port":30313,"id":"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291","location":"","comment":"Upstream bootnode 3"},{"ip":"18.218.250.66","port":30313,"id":"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949","location":"","comment":"Upstream bootnode 4"},{"ip":"3.11.147.67","port":30303,"id":"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91","location":"","comment":"Ethereum Foundation bootnode"},{"ip":"51.15.116.226","port":30303,"id":"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":30303,"id":"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33","location":"","comment":"Goerli Initiative bootnode"},{"ip":"51.15.119.157","port":40303,"id":"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd","location":"","comment":"Goerli Initiative bootnode"}],"dnsNetworks":["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]}')},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hardforks=void 0,t.hardforks=[["chainstart",r(521)],["homestead",r(522)],["dao",r(523)],["tangerineWhistle",r(524)],["spuriousDragon",r(525)],["byzantium",r(526)],["constantinople",r(527)],["petersburg",r(528)],["istanbul",r(529)],["muirGlacier",r(530)],["berlin",r(531)],["london",r(532)],["shanghai",r(533)],["merge",r(534)]]},function(e){e.exports=JSON.parse('{"name":"chainstart","comment":"Start of the Ethereum main chain","url":"","status":"","gasConfig":{"minGasLimit":{"v":5000,"d":"Minimum the gas limit may ever be"},"gasLimitBoundDivisor":{"v":1024,"d":"The bound divisor of the gas limit, used in update calculations"},"maxRefundQuotient":{"v":2,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"base":{"v":2,"d":"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},"tierStep":{"v":[0,2,3,5,8,10,20],"d":"Once per operation, for a selection of them"},"exp":{"v":10,"d":"Base fee of the EXP opcode"},"expByte":{"v":10,"d":"Times ceil(log256(exponent)) for the EXP instruction"},"sha3":{"v":30,"d":"Base fee of the SHA3 opcode"},"sha3Word":{"v":6,"d":"Once per word of the SHA3 operation\'s data"},"sload":{"v":50,"d":"Base fee of the SLOAD opcode"},"sstoreSet":{"v":20000,"d":"Once per SSTORE operation if the zeroness changes from zero"},"sstoreReset":{"v":5000,"d":"Once per SSTORE operation if the zeroness does not change from zero"},"sstoreRefund":{"v":15000,"d":"Once per SSTORE operation if the zeroness changes to zero"},"jumpdest":{"v":1,"d":"Base fee of the JUMPDEST opcode"},"log":{"v":375,"d":"Base fee of the LOG opcode"},"logData":{"v":8,"d":"Per byte in a LOG* operation\'s data"},"logTopic":{"v":375,"d":"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},"create":{"v":32000,"d":"Base fee of the CREATE opcode"},"call":{"v":40,"d":"Base fee of the CALL opcode"},"callStipend":{"v":2300,"d":"Free gas given at beginning of call"},"callValueTransfer":{"v":9000,"d":"Paid for CALL when the value transfor is non-zero"},"callNewAccount":{"v":25000,"d":"Paid for CALL when the destination address didn\'t exist prior"},"selfdestructRefund":{"v":24000,"d":"Refunded following a selfdestruct operation"},"memory":{"v":3,"d":"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},"quadCoeffDiv":{"v":512,"d":"Divisor for the quadratic particle of the memory cost equation"},"createData":{"v":200,"d":""},"tx":{"v":21000,"d":"Per transaction. NOTE: Not payable on data of calls between transactions"},"txCreation":{"v":32000,"d":"The cost of creating a contract via tx"},"txDataZero":{"v":4,"d":"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},"txDataNonZero":{"v":68,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"copy":{"v":3,"d":"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},"ecRecover":{"v":3000,"d":""},"sha256":{"v":60,"d":""},"sha256Word":{"v":12,"d":""},"ripemd160":{"v":600,"d":""},"ripemd160Word":{"v":120,"d":""},"identity":{"v":15,"d":""},"identityWord":{"v":3,"d":""},"stop":{"v":0,"d":"Base fee of the STOP opcode"},"add":{"v":3,"d":"Base fee of the ADD opcode"},"mul":{"v":5,"d":"Base fee of the MUL opcode"},"sub":{"v":3,"d":"Base fee of the SUB opcode"},"div":{"v":5,"d":"Base fee of the DIV opcode"},"sdiv":{"v":5,"d":"Base fee of the SDIV opcode"},"mod":{"v":5,"d":"Base fee of the MOD opcode"},"smod":{"v":5,"d":"Base fee of the SMOD opcode"},"addmod":{"v":8,"d":"Base fee of the ADDMOD opcode"},"mulmod":{"v":8,"d":"Base fee of the MULMOD opcode"},"signextend":{"v":5,"d":"Base fee of the SIGNEXTEND opcode"},"lt":{"v":3,"d":"Base fee of the LT opcode"},"gt":{"v":3,"d":"Base fee of the GT opcode"},"slt":{"v":3,"d":"Base fee of the SLT opcode"},"sgt":{"v":3,"d":"Base fee of the SGT opcode"},"eq":{"v":3,"d":"Base fee of the EQ opcode"},"iszero":{"v":3,"d":"Base fee of the ISZERO opcode"},"and":{"v":3,"d":"Base fee of the AND opcode"},"or":{"v":3,"d":"Base fee of the OR opcode"},"xor":{"v":3,"d":"Base fee of the XOR opcode"},"not":{"v":3,"d":"Base fee of the NOT opcode"},"byte":{"v":3,"d":"Base fee of the BYTE opcode"},"address":{"v":2,"d":"Base fee of the ADDRESS opcode"},"balance":{"v":20,"d":"Base fee of the BALANCE opcode"},"origin":{"v":2,"d":"Base fee of the ORIGIN opcode"},"caller":{"v":2,"d":"Base fee of the CALLER opcode"},"callvalue":{"v":2,"d":"Base fee of the CALLVALUE opcode"},"calldataload":{"v":3,"d":"Base fee of the CALLDATALOAD opcode"},"calldatasize":{"v":2,"d":"Base fee of the CALLDATASIZE opcode"},"calldatacopy":{"v":3,"d":"Base fee of the CALLDATACOPY opcode"},"codesize":{"v":2,"d":"Base fee of the CODESIZE opcode"},"codecopy":{"v":3,"d":"Base fee of the CODECOPY opcode"},"gasprice":{"v":2,"d":"Base fee of the GASPRICE opcode"},"extcodesize":{"v":20,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":20,"d":"Base fee of the EXTCODECOPY opcode"},"blockhash":{"v":20,"d":"Base fee of the BLOCKHASH opcode"},"coinbase":{"v":2,"d":"Base fee of the COINBASE opcode"},"timestamp":{"v":2,"d":"Base fee of the TIMESTAMP opcode"},"number":{"v":2,"d":"Base fee of the NUMBER opcode"},"difficulty":{"v":2,"d":"Base fee of the DIFFICULTY opcode"},"gaslimit":{"v":2,"d":"Base fee of the GASLIMIT opcode"},"pop":{"v":2,"d":"Base fee of the POP opcode"},"mload":{"v":3,"d":"Base fee of the MLOAD opcode"},"mstore":{"v":3,"d":"Base fee of the MSTORE opcode"},"mstore8":{"v":3,"d":"Base fee of the MSTORE8 opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"},"jump":{"v":8,"d":"Base fee of the JUMP opcode"},"jumpi":{"v":10,"d":"Base fee of the JUMPI opcode"},"pc":{"v":2,"d":"Base fee of the PC opcode"},"msize":{"v":2,"d":"Base fee of the MSIZE opcode"},"gas":{"v":2,"d":"Base fee of the GAS opcode"},"push":{"v":3,"d":"Base fee of the PUSH opcode"},"dup":{"v":3,"d":"Base fee of the DUP opcode"},"swap":{"v":3,"d":"Base fee of the SWAP opcode"},"callcode":{"v":40,"d":"Base fee of the CALLCODE opcode"},"return":{"v":0,"d":"Base fee of the RETURN opcode"},"invalid":{"v":0,"d":"Base fee of the INVALID opcode"},"selfdestruct":{"v":0,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{"stackLimit":{"v":1024,"d":"Maximum size of VM stack allowed"},"callCreateDepth":{"v":1024,"d":"Maximum depth of call/create stack"},"maxExtraDataSize":{"v":32,"d":"Maximum size extra data may be after Genesis"}},"pow":{"minimumDifficulty":{"v":131072,"d":"The minimum that the difficulty may ever be"},"difficultyBoundDivisor":{"v":2048,"d":"The bound divisor of the difficulty, used in the update calculations"},"durationLimit":{"v":13,"d":"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},"epochDuration":{"v":30000,"d":"Duration between proof-of-work epochs"},"timebombPeriod":{"v":100000,"d":"Exponential difficulty timebomb period"},"minerReward":{"v":"5000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":0,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"homestead","comment":"Homestead hardfork with protocol and network changes","url":"https://eips.ethereum.org/EIPS/eip-606","status":"Final","gasConfig":{},"gasPrices":{"delegatecall":{"v":40,"d":"Base fee of the DELEGATECALL opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"dao","comment":"DAO rescue hardfork","url":"https://eips.ethereum.org/EIPS/eip-779","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"tangerineWhistle","comment":"Hardfork with gas cost changes for IO-heavy operations","url":"https://eips.ethereum.org/EIPS/eip-608","status":"Final","gasConfig":{},"gasPrices":{"sload":{"v":200,"d":"Once per SLOAD operation"},"call":{"v":700,"d":"Once per CALL operation & message call transaction"},"extcodesize":{"v":700,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":700,"d":"Base fee of the EXTCODECOPY opcode"},"balance":{"v":400,"d":"Base fee of the BALANCE opcode"},"delegatecall":{"v":700,"d":"Base fee of the DELEGATECALL opcode"},"callcode":{"v":700,"d":"Base fee of the CALLCODE opcode"},"selfdestruct":{"v":5000,"d":"Base fee of the SELFDESTRUCT opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"spuriousDragon","comment":"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit","url":"https://eips.ethereum.org/EIPS/eip-607","status":"Final","gasConfig":{},"gasPrices":{"expByte":{"v":50,"d":"Times ceil(log256(exponent)) for the EXP instruction"}},"vm":{"maxCodeSize":{"v":24576,"d":"Maximum length of contract code"}},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"byzantium","comment":"Hardfork with new precompiles, instructions and other protocol changes","url":"https://eips.ethereum.org/EIPS/eip-609","status":"Final","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":20,"d":"Gquaddivisor from modexp precompile for gas calculation"},"ecAdd":{"v":500,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":40000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":100000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":80000,"d":"Gas costs regarding curve pairing precompile input length"},"revert":{"v":0,"d":"Base fee of the REVERT opcode"},"staticcall":{"v":700,"d":"Base fee of the STATICCALL opcode"},"returndatasize":{"v":2,"d":"Base fee of the RETURNDATASIZE opcode"},"returndatacopy":{"v":3,"d":"Base fee of the RETURNDATACOPY opcode"}},"vm":{},"pow":{"minerReward":{"v":"3000000000000000000","d":"the amount a miner get rewarded for mining a block"},"difficultyBombDelay":{"v":3000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"constantinople","comment":"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)","url":"https://eips.ethereum.org/EIPS/eip-1013","status":"Final","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":200,"d":"Once per SSTORE operation if the value doesn\'t change"},"netSstoreInitGas":{"v":20000,"d":"Once per SSTORE operation from clean zero"},"netSstoreCleanGas":{"v":5000,"d":"Once per SSTORE operation from clean non-zero"},"netSstoreDirtyGas":{"v":200,"d":"Once per SSTORE operation from dirty"},"netSstoreClearRefund":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"netSstoreResetRefund":{"v":4800,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"netSstoreResetClearRefund":{"v":19800,"d":"Once per SSTORE operation for resetting to the original zero value"},"shl":{"v":3,"d":"Base fee of the SHL opcode"},"shr":{"v":3,"d":"Base fee of the SHR opcode"},"sar":{"v":3,"d":"Base fee of the SAR opcode"},"extcodehash":{"v":400,"d":"Base fee of the EXTCODEHASH opcode"},"create2":{"v":32000,"d":"Base fee of the CREATE2 opcode"}},"vm":{},"pow":{"minerReward":{"v":"2000000000000000000","d":"The amount a miner gets rewarded for mining a block"},"difficultyBombDelay":{"v":5000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"petersburg","comment":"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople","url":"https://eips.ethereum.org/EIPS/eip-1716","status":"Draft","gasConfig":{},"gasPrices":{"netSstoreNoopGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreInitGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreCleanGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreDirtyGas":{"v":null,"d":"Removed along EIP-1283"},"netSstoreClearRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetRefund":{"v":null,"d":"Removed along EIP-1283"},"netSstoreResetClearRefund":{"v":null,"d":"Removed along EIP-1283"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"istanbul","comment":"HF targeted for December 2019 following the Constantinople/Petersburg HF","url":"https://eips.ethereum.org/EIPS/eip-1679","status":"Draft","gasConfig":{},"gasPrices":{"blake2Round":{"v":1,"d":"Gas cost per round for the Blake2 F precompile"},"ecAdd":{"v":150,"d":"Gas costs for curve addition precompile"},"ecMul":{"v":6000,"d":"Gas costs for curve multiplication precompile"},"ecPairing":{"v":45000,"d":"Base gas costs for curve pairing precompile"},"ecPairingWord":{"v":34000,"d":"Gas costs regarding curve pairing precompile input length"},"txDataNonZero":{"v":16,"d":"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},"sstoreSentryGasEIP2200":{"v":2300,"d":"Minimum gas required to be present for an SSTORE call, not consumed"},"sstoreNoopGasEIP2200":{"v":800,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":800,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitGasEIP2200":{"v":20000,"d":"Once per SSTORE operation from clean zero to non-zero"},"sstoreInitRefundEIP2200":{"v":19200,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanGasEIP2200":{"v":5000,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreCleanRefundEIP2200":{"v":4200,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"sstoreClearRefundEIP2200":{"v":15000,"d":"Once per SSTORE operation for clearing an originally existing storage slot"},"balance":{"v":700,"d":"Base fee of the BALANCE opcode"},"extcodehash":{"v":700,"d":"Base fee of the EXTCODEHASH opcode"},"chainid":{"v":2,"d":"Base fee of the CHAINID opcode"},"selfbalance":{"v":5,"d":"Base fee of the SELFBALANCE opcode"},"sload":{"v":800,"d":"Base fee of the SLOAD opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"muirGlacier","comment":"HF to delay the difficulty bomb","url":"https://eips.ethereum.org/EIPS/eip-2384","status":"Final","gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9000000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"berlin","comment":"HF targeted for July 2020 following the Muir Glacier HF","url":"https://eips.ethereum.org/EIPS/eip-2070","status":"Draft","eips":[2565,2929,2718,2930]}')},function(e){e.exports=JSON.parse('{"name":"london","comment":"HF targeted for July 2021 following the Berlin fork","url":"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md","status":"Draft","eips":[1559,3198,3529,3541]}')},function(e){e.exports=JSON.parse('{"name":"shanghai","comment":"Next feature hardfork after the London HF","url":"https://github.com/ethereum/pm/issues/356","status":"Pre-Draft","eips":[]}')},function(e){e.exports=JSON.parse('{"name":"merge","comment":"Hardfork to upgrade the consensus mechanism to Proof-of-Stake","url":"https://github.com/ethereum/pm/issues/361","status":"pre-Draft","consensus":{"type":"pos","algorithm":"casper","casper":{}},"eips":[3675]}')},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIPs=void 0,t.EIPs={1559:r(536),2315:r(537),2537:r(538),2565:r(539),2718:r(540),2929:r(541),2930:r(542),3198:r(543),3529:r(544),3541:r(545),3554:r(546),3675:r(547)}},function(e){e.exports=JSON.parse('{"name":"EIP-1559","number":1559,"comment":"Fee market change for ETH 1.0 chain","url":"https://eips.ethereum.org/EIPS/eip-1559","status":"Review","minimumHardfork":"berlin","requiredEIPs":[2930],"gasConfig":{"baseFeeMaxChangeDenominator":{"v":8,"d":"Maximum base fee change denominator"},"elasticityMultiplier":{"v":2,"d":"Maximum block gas target elasticity"},"initialBaseFee":{"v":1000000000,"d":"Initial base fee on first EIP1559 block"}},"gasPrices":{},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2315","number":2315,"comment":"Simple subroutines for the EVM","url":"https://eips.ethereum.org/EIPS/eip-2315","status":"Draft","minimumHardfork":"istanbul","gasConfig":{},"gasPrices":{"beginsub":{"v":2,"d":"Base fee of the BEGINSUB opcode"},"returnsub":{"v":5,"d":"Base fee of the RETURNSUB opcode"},"jumpsub":{"v":10,"d":"Base fee of the JUMPSUB opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2537","number":2537,"comment":"BLS12-381 precompiles","url":"https://eips.ethereum.org/EIPS/eip-2537","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"Bls12381G1AddGas":{"v":600,"d":"Gas cost of a single BLS12-381 G1 addition precompile-call"},"Bls12381G1MulGas":{"v":12000,"d":"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},"Bls12381G2AddGas":{"v":4500,"d":"Gas cost of a single BLS12-381 G2 addition precompile-call"},"Bls12381G2MulGas":{"v":55000,"d":"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},"Bls12381PairingBaseGas":{"v":115000,"d":"Base gas cost of BLS12-381 pairing check"},"Bls12381PairingPerPairGas":{"v":23000,"d":"Per-pair gas cost of BLS12-381 pairing check"},"Bls12381MapG1Gas":{"v":5500,"d":"Gas cost of BLS12-381 map field element to G1"},"Bls12381MapG2Gas":{"v":110000,"d":"Gas cost of BLS12-381 map field element to G2"},"Bls12381MultiExpGasDiscount":{"v":[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],"d":"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2565","number":2565,"comment":"ModExp gas cost","url":"https://eips.ethereum.org/EIPS/eip-2565","status":"Last call","minimumHardfork":"byzantium","gasConfig":{},"gasPrices":{"modexpGquaddivisor":{"v":3,"d":"Gquaddivisor from modexp precompile for gas calculation"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2718","comment":"Typed Transaction Envelope","url":"https://eips.ethereum.org/EIPS/eip-2718","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2929","comment":"Gas cost increases for state access opcodes","url":"https://eips.ethereum.org/EIPS/eip-2929","status":"Draft","minimumHardfork":"chainstart","gasConfig":{},"gasPrices":{"coldsload":{"v":2100,"d":"Gas cost of the first read of storage from a given location (per transaction)"},"coldaccountaccess":{"v":2600,"d":"Gas cost of the first read of a given address (per transaction)"},"warmstorageread":{"v":100,"d":"Gas cost of reading storage locations which have already loaded \'cold\'"},"sstoreCleanGasEIP2200":{"v":2900,"d":"Once per SSTORE operation from clean non-zero to something else"},"sstoreNoopGasEIP2200":{"v":100,"d":"Once per SSTORE operation if the value doesn\'t change"},"sstoreDirtyGasEIP2200":{"v":100,"d":"Once per SSTORE operation if a dirty value is changed"},"sstoreInitRefundEIP2200":{"v":19900,"d":"Once per SSTORE operation for resetting to the original zero value"},"sstoreCleanRefundEIP2200":{"v":4900,"d":"Once per SSTORE operation for resetting to the original non-zero value"},"call":{"v":0,"d":"Base fee of the CALL opcode"},"callcode":{"v":0,"d":"Base fee of the CALLCODE opcode"},"delegatecall":{"v":0,"d":"Base fee of the DELEGATECALL opcode"},"staticcall":{"v":0,"d":"Base fee of the STATICCALL opcode"},"balance":{"v":0,"d":"Base fee of the BALANCE opcode"},"extcodesize":{"v":0,"d":"Base fee of the EXTCODESIZE opcode"},"extcodecopy":{"v":0,"d":"Base fee of the EXTCODECOPY opcode"},"extcodehash":{"v":0,"d":"Base fee of the EXTCODEHASH opcode"},"sload":{"v":0,"d":"Base fee of the SLOAD opcode"},"sstore":{"v":0,"d":"Base fee of the SSTORE opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-2930","comment":"Optional access lists","url":"https://eips.ethereum.org/EIPS/eip-2930","status":"Draft","minimumHardfork":"istanbul","requiredEIPs":[2718,2929],"gasConfig":{},"gasPrices":{"accessListStorageKeyCost":{"v":1900,"d":"Gas cost per storage key in an Access List transaction"},"accessListAddressCost":{"v":2400,"d":"Gas cost per storage key in an Access List transaction"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3198","number":3198,"comment":"BASEFEE opcode","url":"https://eips.ethereum.org/EIPS/eip-3198","status":"Review","minimumHardfork":"london","gasConfig":{},"gasPrices":{"basefee":{"v":2,"d":"Gas cost of the BASEFEE opcode"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3529","comment":"Reduction in refunds","url":"https://eips.ethereum.org/EIPS/eip-3529","status":"Draft","minimumHardfork":"berlin","requiredEIPs":[2929],"gasConfig":{"maxRefundQuotient":{"v":5,"d":"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},"gasPrices":{"selfdestructRefund":{"v":0,"d":"Refunded following a selfdestruct operation"},"sstoreClearRefundEIP2200":{"v":4800,"d":"Once per SSTORE operation for clearing an originally existing storage slot"}},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3541","comment":"Reject new contracts starting with the 0xEF byte","url":"https://eips.ethereum.org/EIPS/eip-3541","status":"Draft","minimumHardfork":"berlin","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3554","comment":"Reduction in refunds","url":"Difficulty Bomb Delay to December 1st 2021","status":"Draft","minimumHardfork":"muirGlacier","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{"difficultyBombDelay":{"v":9500000,"d":"the amount of blocks to delay the difficulty bomb with"}}}')},function(e){e.exports=JSON.parse('{"name":"EIP-3675","number":3675,"comment":"Upgrade consensus to Proof-of-Stake","url":"https://eips.ethereum.org/EIPS/eip-3675","status":"Draft","minimumHardfork":"london","requiredEIPs":[],"gasConfig":{},"gasPrices":{},"vm":{},"pow":{}}')},function(e,t,r){"use strict";(function(e){var n,i=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=r(28),f=r(119),u=r(53),c=r(233),d=e.from(1..toString(16).padStart(2,"0"),"hex"),l=function(t){function r(e,r){var n,i;void 0===r&&(r={});var a=t.call(this,o(o({},e),{type:1}))||this;a.DEFAULT_HARDFORK="berlin";var f=e.chainId,d=e.accessList,l=e.gasPrice;if(a.common=a._getCommon(r.common,f),a.chainId=a.common.chainIdBN(),!a.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");a.activeCapabilities=a.activeCapabilities.concat([2718,2930]);var h=c.AccessLists.getAccessListData(null!=d?d:[]);if(a.accessList=h.accessList,a.AccessListJSON=h.AccessListJSON,c.AccessLists.verifyAccessList(a.accessList),a.gasPrice=new s.BN((0,s.toBuffer)(""===l?"0x":l)),a._validateCannotExceedMaxInteger({gasPrice:a.gasPrice}),a.v&&!a.v.eqn(0)&&!a.v.eqn(1))throw new Error("The y-parity of the transaction should either be 0 or 1");if(a.common.gteHardfork("homestead")&&(null===(n=a.s)||void 0===n?void 0:n.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");return(null===(i=null==r?void 0:r.freeze)||void 0===i||i)&&Object.freeze(a),a}return i(r,t),Object.defineProperty(r.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),r.fromTxData=function(e,t){return void 0===t&&(t={}),new r(e,t)},r.fromSerializedTx=function(e,t){if(void 0===t&&(t={}),!e.slice(0,1).equals(d))throw new Error("Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: 1, received: "+e.slice(0,1).toString("hex"));var n=s.rlp.decode(e.slice(1));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return r.fromValuesArray(n,t)},r.fromRlpSerializedTx=function(e,t){return void 0===t&&(t={}),r.fromSerializedTx(e,t)},r.fromValuesArray=function(e,t){if(void 0===t&&(t={}),8!==e.length&&11!==e.length)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");var n=a(e,11),i=n[0],o=n[1],f=n[2],u=n[3],c=n[4],d=n[5],l=n[6],h=n[7],p=n[8],b=n[9],y=n[10];return new r({chainId:new s.BN(i),nonce:o,gasPrice:f,gasLimit:u,to:c,value:d,data:l,accessList:null!=h?h:[],v:void 0!==p?new s.BN(p):void 0,r:b,s:y},t)},r.prototype.getDataFee=function(){var e=t.prototype.getDataFee.call(this);return e.iaddn(c.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),e},r.prototype.getUpfrontCost=function(){return this.gasLimit.mul(this.gasPrice).add(this.value)},r.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.gasPrice),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:e.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):e.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):e.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):e.from([])]},r.prototype.serialize=function(){var t=this.raw();return e.concat([d,s.rlp.encode(t)])},r.prototype.getMessageToSign=function(t){void 0===t&&(t=!0);var r=this.raw().slice(0,8),n=e.concat([d,s.rlp.encode(r)]);return t?(0,s.keccak256)(n):n},r.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},r.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},r.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this.yParity,n=this.r,i=this.s;try{return(0,s.ecrecover)(t,r.addn(27),(0,s.bnToUnpaddedBuffer)(n),(0,s.bnToUnpaddedBuffer)(i))}catch(e){throw new Error("Invalid Signature")}},r.prototype._processSignature=function(e,t,n){var i={common:this.common};return r.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(t),s:new s.BN(n)},i)},r.prototype.toJSON=function(){var e=c.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),gasPrice:(0,s.bnToHex)(this.gasPrice),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},r}(f.BaseTransaction);t.default=l}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r(28),i=r(232),o=function(){function t(){}return t.fromTxData=function(e,t){if(void 0===t&&(t={}),"type"in e&&void 0!==e.type){var r=new n.BN((0,n.toBuffer)(e.type)).toNumber();if(0===r)return i.Transaction.fromTxData(e,t);if(1===r)return i.AccessListEIP2930Transaction.fromTxData(e,t);if(2===r)return i.FeeMarketEIP1559Transaction.fromTxData(e,t);throw new Error("Tx instantiation with type "+r+" not supported")}return i.Transaction.fromTxData(e,t)},t.fromSerializedData=function(e,t){if(void 0===t&&(t={}),e[0]<=127){var r=void 0;switch(e[0]){case 1:r=2930;break;case 2:r=1559;break;default:throw new Error("TypedTransaction with ID "+e[0]+" unknown")}return 1559===r?i.FeeMarketEIP1559Transaction.fromSerializedTx(e,t):i.AccessListEIP2930Transaction.fromSerializedTx(e,t)}return i.Transaction.fromSerializedTx(e,t)},t.fromBlockBodyData=function(t,r){if(void 0===r&&(r={}),e.isBuffer(t))return this.fromSerializedData(t,r);if(Array.isArray(t))return i.Transaction.fromValuesArray(t,r);throw new Error("Cannot decode transaction: unknown type input")},t.getTransactionClass=function(e,t){if(void 0===e&&(e=0),0==e||e>=128&&e<=255)return i.Transaction;switch(e){case 1:return i.AccessListEIP2930Transaction;case 2:return i.FeeMarketEIP1559Transaction;default:throw new Error("TypedTransaction with ID "+e+" unknown")}},t}();t.default=o}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n,i=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=r(28),f=r(119),u=r(53),c=r(233),d=e.from(2..toString(16).padStart(2,"0"),"hex"),l=function(t){function r(e,r){var n,i;void 0===r&&(r={});var a=t.call(this,o(o({},e),{type:2}))||this;a.DEFAULT_HARDFORK="london";var f=e.chainId,d=e.accessList,l=e.maxFeePerGas,h=e.maxPriorityFeePerGas;if(a.common=a._getCommon(r.common,f),a.chainId=a.common.chainIdBN(),!a.common.isActivatedEIP(1559))throw new Error("EIP-1559 not enabled on Common");a.activeCapabilities=a.activeCapabilities.concat([1559,2718,2930]);var p=c.AccessLists.getAccessListData(null!=d?d:[]);if(a.accessList=p.accessList,a.AccessListJSON=p.AccessListJSON,c.AccessLists.verifyAccessList(a.accessList),a.maxFeePerGas=new s.BN((0,s.toBuffer)(""===l?"0x":l)),a.maxPriorityFeePerGas=new s.BN((0,s.toBuffer)(""===h?"0x":h)),a._validateCannotExceedMaxInteger({maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas},256),a.maxFeePerGas.lt(a.maxPriorityFeePerGas))throw new Error("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");if(a.v&&!a.v.eqn(0)&&!a.v.eqn(1))throw new Error("The y-parity of the transaction should either be 0 or 1");if(a.common.gteHardfork("homestead")&&(null===(n=a.s)||void 0===n?void 0:n.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");return(null===(i=null==r?void 0:r.freeze)||void 0===i||i)&&Object.freeze(a),a}return i(r,t),Object.defineProperty(r.prototype,"senderR",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"senderS",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yParity",{get:function(){return this.v},enumerable:!1,configurable:!0}),r.fromTxData=function(e,t){return void 0===t&&(t={}),new r(e,t)},r.fromSerializedTx=function(e,t){if(void 0===t&&(t={}),!e.slice(0,1).equals(d))throw new Error("Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: 2, received: "+e.slice(0,1).toString("hex"));var n=s.rlp.decode(e.slice(1));if(!Array.isArray(n))throw new Error("Invalid serialized tx input: must be array");return r.fromValuesArray(n,t)},r.fromRlpSerializedTx=function(e,t){return void 0===t&&(t={}),r.fromSerializedTx(e,t)},r.fromValuesArray=function(e,t){if(void 0===t&&(t={}),9!==e.length&&12!==e.length)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");var n=a(e,12),i=n[0],o=n[1],f=n[2],u=n[3],c=n[4],d=n[5],l=n[6],h=n[7],p=n[8],b=n[9],y=n[10],m=n[11];return new r({chainId:new s.BN(i),nonce:o,maxPriorityFeePerGas:f,maxFeePerGas:u,gasLimit:c,to:d,value:l,data:h,accessList:null!=p?p:[],v:void 0!==b?new s.BN(b):void 0,r:y,s:m},t)},r.prototype.getDataFee=function(){var e=t.prototype.getDataFee.call(this);return e.iaddn(c.AccessLists.getDataFeeEIP2930(this.accessList,this.common)),e},r.prototype.getUpfrontCost=function(e){void 0===e&&(e=new s.BN(0));var t=s.BN.min(this.maxPriorityFeePerGas,this.maxFeePerGas.sub(e)).add(e);return this.gasLimit.mul(t).add(this.value)},r.prototype.raw=function(){return[(0,s.bnToUnpaddedBuffer)(this.chainId),(0,s.bnToUnpaddedBuffer)(this.nonce),(0,s.bnToUnpaddedBuffer)(this.maxPriorityFeePerGas),(0,s.bnToUnpaddedBuffer)(this.maxFeePerGas),(0,s.bnToUnpaddedBuffer)(this.gasLimit),void 0!==this.to?this.to.buf:e.from([]),(0,s.bnToUnpaddedBuffer)(this.value),this.data,this.accessList,void 0!==this.v?(0,s.bnToUnpaddedBuffer)(this.v):e.from([]),void 0!==this.r?(0,s.bnToUnpaddedBuffer)(this.r):e.from([]),void 0!==this.s?(0,s.bnToUnpaddedBuffer)(this.s):e.from([])]},r.prototype.serialize=function(){var t=this.raw();return e.concat([d,s.rlp.encode(t)])},r.prototype.getMessageToSign=function(t){void 0===t&&(t=!0);var r=this.raw().slice(0,9),n=e.concat([d,s.rlp.encode(r)]);return t?(0,s.keccak256)(n):n},r.prototype.hash=function(){if(!this.isSigned())throw new Error("Cannot call hash method if transaction is not signed");return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=(0,s.keccak256)(this.serialize())),this.cache.hash):(0,s.keccak256)(this.serialize())},r.prototype.getMessageToVerifySignature=function(){return this.getMessageToSign()},r.prototype.getSenderPublicKey=function(){var e;if(!this.isSigned())throw new Error("Cannot call this method if transaction is not signed");var t=this.getMessageToVerifySignature();if(this.common.gteHardfork("homestead")&&(null===(e=this.s)||void 0===e?void 0:e.gt(u.N_DIV_2)))throw new Error("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");var r=this.v,n=this.r,i=this.s;try{return(0,s.ecrecover)(t,r.addn(27),(0,s.bnToUnpaddedBuffer)(n),(0,s.bnToUnpaddedBuffer)(i))}catch(e){throw new Error("Invalid Signature")}},r.prototype._processSignature=function(e,t,n){var i={common:this.common};return r.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:new s.BN(e-27),r:new s.BN(t),s:new s.BN(n)},i)},r.prototype.toJSON=function(){var e=c.AccessLists.getAccessListJSON(this.accessList);return{chainId:(0,s.bnToHex)(this.chainId),nonce:(0,s.bnToHex)(this.nonce),maxPriorityFeePerGas:(0,s.bnToHex)(this.maxPriorityFeePerGas),maxFeePerGas:(0,s.bnToHex)(this.maxFeePerGas),gasLimit:(0,s.bnToHex)(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:(0,s.bnToHex)(this.value),data:"0x"+this.data.toString("hex"),accessList:e,v:void 0!==this.v?(0,s.bnToHex)(this.v):void 0,r:void 0!==this.r?(0,s.bnToHex)(this.r):void 0,s:void 0!==this.s?(0,s.bnToHex)(this.s):void 0}},r}(f.BaseTransaction);t.default=l}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,i(r(234),t),i(r(235),t),i(r(601),t),i(r(123),t),i(r(602),t),i(r(40),t),i(r(603),t),i(r(604),t),i(r(126),t);var o=r(54);Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}})},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,f=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){f=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(f)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:function(e){return new Uint8Array(e)},t=arguments.length>1?arguments[1]:void 0;return"function"==typeof e&&(e=e(t)),v("output",e,t),e}function _(e){return Object.prototype.toString.call(e).slice(8,-1)}e.exports=function(e){return{contextRandomize:function(t){switch(m(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&v("seed",t,32),e.contextRandomize(t)){case 1:throw new Error(f)}},privateKeyVerify:function(t){return v("private key",t,32),0===e.privateKeyVerify(t)},privateKeyNegate:function(t){switch(v("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(o)}},privateKeyTweakAdd:function(t,r){switch(v("private key",t,32),v("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(a)}},privateKeyTweakMul:function(t,r){switch(v("private key",t,32),v("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(s)}},publicKeyVerify:function(t){return v("public key",t,[33,65]),0===e.publicKeyVerify(t)},publicKeyCreate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(v("private key",t,32),g(r),n=w(n,r?33:65),e.publicKeyCreate(n,t)){case 0:return n;case 1:throw new Error(u);case 2:throw new Error(d)}},publicKeyConvert:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(v("public key",t,[33,65]),g(r),n=w(n,r?33:65),e.publicKeyConvert(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(d)}},publicKeyNegate:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;switch(v("public key",t,[33,65]),g(r),n=w(n,r?33:65),e.publicKeyNegate(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(o);case 3:throw new Error(d)}},publicKeyCombine:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0;m(Array.isArray(t),"Expected public keys to be an Array"),m(t.length>0,"Expected public keys array will have more than zero items");var o,a=n(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;v("public key",s,[33,65])}}catch(e){a.e(e)}finally{a.f()}switch(g(r),i=w(i,r?33:65),e.publicKeyCombine(i,t)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(d)}},publicKeyTweakAdd:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(v("public key",t,[33,65]),v("tweak",r,32),g(n),i=w(i,n?33:65),e.publicKeyTweakAdd(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(a)}},publicKeyTweakMul:function(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0;switch(v("public key",t,[33,65]),v("tweak",r,32),g(n),i=w(i,n?33:65),e.publicKeyTweakMul(i,t,r)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(s)}},signatureNormalize:function(t){switch(v("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(h)}},signatureExport:function(t,r){v("signature",t,64);var n={output:r=w(r,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(h);case 2:throw new Error(o)}},signatureImport:function(t,r){switch(v("signature",t),r=w(r,64),e.signatureImport(r,t)){case 0:return r;case 1:throw new Error(h);case 2:throw new Error(o)}},ecdsaSign:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;v("message",t,32),v("private key",r,32),m("Object"===_(n),"Expected options to be an Object"),void 0!==n.data&&v("options.data",n.data),void 0!==n.noncefn&&m("Function"===_(n.noncefn),"Expected options.noncefn to be a Function");var a={signature:i=w(i,64),recid:null};switch(e.ecdsaSign(a,t,r,n.data,n.noncefn)){case 0:return a;case 1:throw new Error(p);case 2:throw new Error(o)}},ecdsaVerify:function(t,r,n){switch(v("signature",t,64),v("message",r,32),v("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(h);case 2:throw new Error(c)}},ecdsaRecover:function(t,r,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4?arguments[4]:void 0;switch(v("signature",t,64),m("Number"===_(r)&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),v("message",n,32),g(i),a=w(a,i?33:65),e.ecdsaRecover(a,t,r,n)){case 0:return a;case 1:throw new Error(h);case 2:throw new Error(b);case 3:throw new Error(o)}},ecdh:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;switch(v("public key",t,[33,65]),v("private key",r,32),m("Object"===_(n),"Expected options to be an Object"),void 0!==n.data&&v("options.data",n.data),void 0!==n.hashfn?(m("Function"===_(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&v("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&v("options.ybuf",n.ybuf,32),v("output",i)):i=w(i,32),e.ecdh(i,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(c);case 2:throw new Error(y)}}}}},function(e,t,r){"use strict";var n=new(0,r(554).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function a(e){var t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){var r=new o(t);if(r.cmp(i.p)>=0)return null;var a=(r=r.toRed(i.red)).redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===e!==a.isOdd()&&(a=a.redNeg()),n.keyPair({pub:{x:r,y:a}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){var a=new o(t),s=new o(r);if(a.cmp(i.p)>=0||s.cmp(i.p)>=0)return null;if(a=a.toRed(i.red),s=s.toRed(i.red),(6===e||7===e)&&s.isOdd()!==(7===e))return null;var f=a.redSqr().redIMul(a);return s.redSqr().redISub(f.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:a,y:s}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function s(e,t){for(var r=t.encode(null,33===e.length),n=0;n=0)return 1;if(r.iadd(new o(e)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakMul:function(e,t){var r=new o(t);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(e)),r.cmp(i.n)>=0&&(r=r.umod(i.n));var n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0},publicKeyVerify:function(e){return null===a(e)?1:0},publicKeyCreate:function(e,t){var r=new o(t);return r.cmp(i.n)>=0||r.isZero()?1:(s(e,n.keyFromPrivate(t).getPublic()),0)},publicKeyConvert:function(e,t){var r=a(t);return null===r?1:(s(e,r.getPublic()),0)},publicKeyNegate:function(e,t){var r=a(t);if(null===r)return 1;var n=r.getPublic();return n.y=n.y.redNeg(),s(e,n),0},publicKeyCombine:function(e,t){for(var r=new Array(t.length),n=0;n=0)return 2;var f=n.getPublic().add(i.g.mul(r));return f.isInfinity()?2:(s(e,f),0)},publicKeyTweakMul:function(e,t,r){var n=a(t);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(s(e,n.getPublic().mul(r)),0)},signatureNormalize:function(e){var t=new o(e.subarray(0,32)),r=new o(e.subarray(32,64));return t.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&e.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport:function(e,t){var r=t.subarray(0,32),n=t.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;var a=e.output,s=a.subarray(4,37);s[0]=0,s.set(r,1);for(var f=33,u=0;f>1&&0===s[u]&&!(128&s[u+1]);--f,++u);if(128&(s=s.subarray(u))[0])return 1;if(f>1&&0===s[0]&&!(128&s[1]))return 1;var c=a.subarray(39,72);c[0]=0,c.set(n,1);for(var d=33,l=0;d>1&&0===c[l]&&!(128&c[l+1]);--d,++l);return 128&(c=c.subarray(l))[0]||d>1&&0===c[0]&&!(128&c[1])?1:(e.outputlen=6+f+d,a[0]=48,a[1]=e.outputlen-2,a[2]=2,a[3]=s.length,a.set(s,4),a[4+f]=2,a[5+f]=c.length,a.set(c,6+f),0)},signatureImport:function(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;var r=t[3];if(0===r)return 1;if(5+r>=t.length)return 1;if(2!==t[4+r])return 1;var n=t[5+r];if(0===n)return 1;if(6+r+n!==t.length)return 1;if(128&t[4])return 1;if(r>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[r+6])return 1;if(n>1&&0===t[r+6]&&!(128&t[r+7]))return 1;var a=t.subarray(4,4+r);if(33===a.length&&0===a[0]&&(a=a.subarray(1)),a.length>32)return 1;var s=t.subarray(6+r);if(33===s.length&&0===s[0]&&(s=s.slice(1)),s.length>32)throw new Error("S length is too long");var f=new o(a);f.cmp(i.n)>=0&&(f=new o(0));var u=new o(t.subarray(6+r));return u.cmp(i.n)>=0&&(u=new o(0)),e.set(f.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign:function(e,t,r,a,s){if(s){var f=s;s=function(e){var n=f(t,r,null,a,e);if(!(n instanceof Uint8Array&&32===n.length))throw new Error("This is the way");return new o(n)}}var u,c=new o(r);if(c.cmp(i.n)>=0||c.isZero())return 1;try{u=n.sign(t,r,{canonical:!0,k:s,pers:a})}catch(e){return 1}return e.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),e.recid=u.recoveryParam,0},ecdsaVerify:function(e,t,r){var s={r:e.subarray(0,32),s:e.subarray(32,64)},f=new o(s.r),u=new o(s.s);if(f.cmp(i.n)>=0||u.cmp(i.n)>=0)return 1;if(1===u.cmp(n.nh)||f.isZero()||u.isZero())return 3;var c=a(r);if(null===c)return 2;var d=c.getPublic();return n.verify(t,s,d)?0:3},ecdsaRecover:function(e,t,r,a){var f,u={r:t.slice(0,32),s:t.slice(32,64)},c=new o(u.r),d=new o(u.s);if(c.cmp(i.n)>=0||d.cmp(i.n)>=0)return 1;if(c.isZero()||d.isZero())return 2;try{f=n.recoverPubKey(a,u,r)}catch(e){return 2}return s(e,f),0},ecdh:function(e,t,r,s,f,u,c){var d=a(t);if(null===d)return 1;var l=new o(r);if(l.cmp(i.n)>=0||l.isZero())return 2;var h=d.getPublic().mul(l);if(void 0===f)for(var p=h.encode(null,!0),b=n.hash().update(p).digest(),y=0;y<32;++y)e[y]=b[y];else{u||(u=new Uint8Array(32));for(var m=h.getX().toArray("be",32),v=0;v<32;++v)u[v]=m[v];c||(c=new Uint8Array(32));for(var g=h.getY().toArray("be",32),w=0;w<32;++w)c[w]=g[w];var _=f(u,c,s);if(!(_ instanceof Uint8Array&&_.length===e.length))return 2;e.set(_)}return 0}}},function(e,t,r){"use strict";var n=t;n.version=r(555).version,n.utils=r(22),n.rand=r(239),n.curve=r(240),n.curves=r(121),n.ec=r(567),n.eddsa=r(571)},function(e){e.exports=JSON.parse('{"_args":[["elliptic@6.5.4","/home/user1/Desktop/work/web3_releases/1.8.0/web3.js/packages/web3-eth-accounts"]],"_from":"elliptic@6.5.4","_id":"elliptic@6.5.4","_inBundle":false,"_integrity":"sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"elliptic@6.5.4","name":"elliptic","escapedName":"elliptic","rawSpec":"6.5.4","saveSpec":null,"fetchSpec":"6.5.4"},"_requiredBy":["/ethereumjs-util/secp256k1"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz","_spec":"6.5.4","_where":"/home/user1/Desktop/work/web3_releases/1.8.0/web3.js/packages/web3-eth-accounts","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},"description":"EC cryptography","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.4"}')},function(e,t){},function(e,t,r){"use strict";var n=r(22),i=r(3),o=r(10),a=r(88),s=n.assert;function f(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(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 u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(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 c(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,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}o(f,a),e.exports=f,f.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},f.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},f.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,f,u,c,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new i(1),b=new i(0),y=new i(0),m=new i(1),v=0;0!==l.cmpn(0);){var g=h.div(l);u=h.sub(g.mul(l)),c=y.sub(g.mul(p));var w=m.sub(g.mul(b));if(!n&&u.cmp(d)<0)t=f.neg(),r=p,n=u.neg(),o=c;else if(n&&2==++v)break;f=u,h=l,l=u,y=p,p=c,m=b,b=w}a=u.neg(),s=c;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},f.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:f.add(u).neg()}},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},f.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},f.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},u.prototype.isInfinity=function(){return this.inf},u.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 r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.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,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(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)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.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))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,a.BasePoint),f.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),d=n.redMul(u),l=f.redSqr().redIAdd(c).redISub(d).redISub(d),h=f.redMul(d.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),c=r.redMul(f),d=s.redSqr().redIAdd(u).redISub(c).redISub(c),l=s.redMul(c.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},c.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 r=this;for(t=0;t=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(3),i=r(10),o=r(88),a=r(22);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(f,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new f(this,e,t)},s.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},f.prototype.precompute=function(){},f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},f.fromJSON=function(e,t){return new f(e,t[0],t[1]||e.one)},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},f.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},f.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),f=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,f)},f.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},f.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},f.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},f.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(22),i=r(3),o=r(10),a=r(88),s=n.assert;function f(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(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 i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,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()))))}o(f,a),e.exports=f,f.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},f.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},f.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},f.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var f=s.fromRed().isOdd();return(t&&!f||!t&&f)&&(s=s.redNeg()),this.point(e,s)},f.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},f.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(u,a.BasePoint),f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},f.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),f=i.redMul(a),u=o.redMul(s),c=i.redMul(s),d=a.redMul(o);return this.curve.point(f,u,d,c)},u.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),f=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(f);this.zOne?(e=a.redSub(s).redSub(f).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(f)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(f).redMul(o),t=u.redMul(n.redSub(f)),r=u.redMul(o))}else n=s.redAdd(f),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(f)),r=n.redMul(o);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),u=o.redMul(a),c=s.redMul(f),d=o.redMul(f),l=a.redMul(s);return this.curve.point(u,c,l,d)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(f).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=f.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(f).redMul(u)),this.curve.point(d,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.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},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,r){"use strict";t.sha1=r(561),t.sha224=r(562),t.sha256=r(242),t.sha384=r(563),t.sha512=r(243)},function(e,t,r){"use strict";var n=r(26),i=r(70),o=r(241),a=n.rotl32,s=n.sum32,f=n.sum32_5,u=o.ft_1,c=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,c),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(e,t,r,a){"object"===(0,n.default)(r)&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),f=t.getPrivate().toArray("be",s),u=e.toArray("be",s),c=new o({hash:this.hash,entropy:f,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),l=this.n.sub(new i(1)),h=0;;h++){var p=a.k?a.k(h):new i(c.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(l)>=0)){var b=this.g.mul(p);if(!b.isInfinity()){var y=b.getX(),m=y.umod(this.n);if(0!==m.cmpn(0)){var v=p.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var g=(b.getY().isOdd()?1:0)|(0!==y.cmp(m)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),g^=1),new d({r:m,s:v,recoveryParam:g})}}}}}},l.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n);var o=(t=new d(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,f=a.invm(this.n),u=f.mul(e).umod(this.n),c=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,r,n){u((3&r)===r,"The recovery param is more than two bits"),t=new d(t,n);var o=this.n,a=new i(e),s=t.r,f=t.s,c=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),b=f.mul(h).umod(o);return this.g.mulAdd(p,s,b)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new d(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";var n=r(122),i=r(238),o=r(39);function a(e){if(!(this instanceof a))return new a(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=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length"}},function(e,t,r){"use strict";var n=r(3),i=r(22),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function f(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=f(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=f(e,r);if(!1===a)return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var c=f(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var d=e.slice(r.place,c+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(u),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var o=n.concat(r),a=[48];return c(a,o.length),a=a.concat(o),i.encode(a,e)}},function(e,t,r){"use strict";var n=r(122),i=r(121),o=r(22),a=o.assert,s=o.parseBytes,f=r(572),u=r(573);function c(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[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=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),f=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:o})},c.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(u),o||(a.forEach(u),i(n))}))}));return t.reduce(c)}},function(e,t,r){"use strict";(function(t){var n=r(0),i=n(r(8)),o=n(r(9)),a=n(r(13)),s=n(r(14)),f=n(r(12));function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,f.default)(e);if(t){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var c=r(124).Transform;e.exports=function(e){return function(r){(0,a.default)(s,r);var n=u(s);function s(t,r,o,a){var f;return(0,i.default)(this,s),(f=n.call(this,a))._rate=t,f._capacity=r,f._delimitedSuffix=o,f._options=a,f._state=new e,f._state.initialize(t,r),f._finalized=!1,f}return(0,o.default)(s,[{key:"_transform",value:function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)}},{key:"_flush",value:function(){}},{key:"_read",value:function(e){this.push(this.squeeze(e))}},{key:"update",value:function(e,r){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return t.isBuffer(e)||(e=t.from(e,r)),this._state.absorb(e),this}},{key:"squeeze",value:function(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}},{key:"_resetState",value:function(){return this._state.initialize(this._rate,this._capacity),this}},{key:"_clone",value:function(){var e=new s(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}]),s}(c)}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(591);function i(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}i.prototype.initialize=function(e,t){for(var r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(var t=0;t>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},i.prototype.copy=function(e){for(var t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},e.exports=i}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=[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];t.p1600=function(e){for(var t=0;t<24;++t){var r=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],l=e[9]^e[19]^e[29]^e[39]^e[49],h=d^(o<<1|a>>>31),p=l^(a<<1|o>>>31),b=e[0]^h,y=e[1]^p,m=e[10]^h,v=e[11]^p,g=e[20]^h,w=e[21]^p,_=e[30]^h,k=e[31]^p,S=e[40]^h,A=e[41]^p;h=r^(s<<1|f>>>31),p=i^(f<<1|s>>>31);var E=e[2]^h,x=e[3]^p,P=e[12]^h,O=e[13]^p,R=e[22]^h,T=e[23]^p,M=e[32]^h,I=e[33]^p,B=e[42]^h,C=e[43]^p;h=o^(u<<1|c>>>31),p=a^(c<<1|u>>>31);var j=e[4]^h,U=e[5]^p,N=e[14]^h,L=e[15]^p,F=e[24]^h,D=e[25]^p,q=e[34]^h,z=e[35]^p,H=e[44]^h,K=e[45]^p;h=s^(d<<1|l>>>31),p=f^(l<<1|d>>>31);var G=e[6]^h,V=e[7]^p,W=e[16]^h,J=e[17]^p,X=e[26]^h,Z=e[27]^p,Y=e[36]^h,$=e[37]^p,Q=e[46]^h,ee=e[47]^p;h=u^(r<<1|i>>>31),p=c^(i<<1|r>>>31);var te=e[8]^h,re=e[9]^p,ne=e[18]^h,ie=e[19]^p,oe=e[28]^h,ae=e[29]^p,se=e[38]^h,fe=e[39]^p,ue=e[48]^h,ce=e[49]^p,de=b,le=y,he=v<<4|m>>>28,pe=m<<4|v>>>28,be=g<<3|w>>>29,ye=w<<3|g>>>29,me=k<<9|_>>>23,ve=_<<9|k>>>23,ge=S<<18|A>>>14,we=A<<18|S>>>14,_e=E<<1|x>>>31,ke=x<<1|E>>>31,Se=O<<12|P>>>20,Ae=P<<12|O>>>20,Ee=R<<10|T>>>22,xe=T<<10|R>>>22,Pe=I<<13|M>>>19,Oe=M<<13|I>>>19,Re=B<<2|C>>>30,Te=C<<2|B>>>30,Me=U<<30|j>>>2,Ie=j<<30|U>>>2,Be=N<<6|L>>>26,Ce=L<<6|N>>>26,je=D<<11|F>>>21,Ue=F<<11|D>>>21,Ne=q<<15|z>>>17,Le=z<<15|q>>>17,Fe=K<<29|H>>>3,De=H<<29|K>>>3,qe=G<<28|V>>>4,ze=V<<28|G>>>4,He=J<<23|W>>>9,Ke=W<<23|J>>>9,Ge=X<<25|Z>>>7,Ve=Z<<25|X>>>7,We=Y<<21|$>>>11,Je=$<<21|Y>>>11,Xe=ee<<24|Q>>>8,Ze=Q<<24|ee>>>8,Ye=te<<27|re>>>5,$e=re<<27|te>>>5,Qe=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=ae<<7|oe>>>25,rt=oe<<7|ae>>>25,nt=se<<8|fe>>>24,it=fe<<8|se>>>24,ot=ue<<14|ce>>>18,at=ce<<14|ue>>>18;e[0]=de^~Se&je,e[1]=le^~Ae&Ue,e[10]=qe^~Qe&be,e[11]=ze^~et&ye,e[20]=_e^~Be&Ge,e[21]=ke^~Ce&Ve,e[30]=Ye^~he&Ee,e[31]=$e^~pe&xe,e[40]=Me^~He&tt,e[41]=Ie^~Ke&rt,e[2]=Se^~je&We,e[3]=Ae^~Ue&Je,e[12]=Qe^~be&Pe,e[13]=et^~ye&Oe,e[22]=Be^~Ge&nt,e[23]=Ce^~Ve&it,e[32]=he^~Ee&Ne,e[33]=pe^~xe&Le,e[42]=He^~tt&me,e[43]=Ke^~rt&ve,e[4]=je^~We&ot,e[5]=Ue^~Je&at,e[14]=be^~Pe&Fe,e[15]=ye^~Oe&De,e[24]=Ge^~nt&ge,e[25]=Ve^~it&we,e[34]=Ee^~Ne&Xe,e[35]=xe^~Le&Ze,e[44]=tt^~me&Re,e[45]=rt^~ve&Te,e[6]=We^~ot&de,e[7]=Je^~at&le,e[16]=Pe^~Fe&qe,e[17]=Oe^~De&ze,e[26]=nt^~ge&_e,e[27]=it^~we&ke,e[36]=Ne^~Xe&Ye,e[37]=Le^~Ze&$e,e[46]=me^~Re&Me,e[47]=ve^~Te&Ie,e[8]=ot^~de&Se,e[9]=at^~le&Ae,e[18]=Fe^~qe&Qe,e[19]=De^~ze&et,e[28]=ge^~_e&Be,e[29]=we^~ke&Ce,e[38]=Xe^~Ye&he,e[39]=Ze^~$e&pe,e[48]=Re^~Me&He,e[49]=Te^~Ie&Ke,e[0]^=n[2*t],e[1]^=n[2*t+1]}}},function(e,t,r){"use strict";var n=r(10),i=r(593),o=r(594),a=r(595),s=r(600);function f(e){s.call(this,"digest"),this._hash=e}n(f,s),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new f(a(e))}},function(e,t,r){"use strict";var n=r(10),i=r(250),o=r(24).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function f(e,t){return e<>>32-t}function u(e,t,r,n,i,o,a){return f(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return f(e+(t&n|r&~n)+i+o|0,a)+t|0}function d(e,t,r,n,i,o,a){return f(e+(t^r^n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return f(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,e[0],3614090360,7),o=u(o,r,n,i,e[1],3905402710,12),i=u(i,o,r,n,e[2],606105819,17),n=u(n,i,o,r,e[3],3250441966,22),r=u(r,n,i,o,e[4],4118548399,7),o=u(o,r,n,i,e[5],1200080426,12),i=u(i,o,r,n,e[6],2821735955,17),n=u(n,i,o,r,e[7],4249261313,22),r=u(r,n,i,o,e[8],1770035416,7),o=u(o,r,n,i,e[9],2336552879,12),i=u(i,o,r,n,e[10],4294925233,17),n=u(n,i,o,r,e[11],2304563134,22),r=u(r,n,i,o,e[12],1804603682,7),o=u(o,r,n,i,e[13],4254626195,12),i=u(i,o,r,n,e[14],2792965006,17),r=c(r,n=u(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=c(o,r,n,i,e[6],3225465664,9),i=c(i,o,r,n,e[11],643717713,14),n=c(n,i,o,r,e[0],3921069994,20),r=c(r,n,i,o,e[5],3593408605,5),o=c(o,r,n,i,e[10],38016083,9),i=c(i,o,r,n,e[15],3634488961,14),n=c(n,i,o,r,e[4],3889429448,20),r=c(r,n,i,o,e[9],568446438,5),o=c(o,r,n,i,e[14],3275163606,9),i=c(i,o,r,n,e[3],4107603335,14),n=c(n,i,o,r,e[8],1163531501,20),r=c(r,n,i,o,e[13],2850285829,5),o=c(o,r,n,i,e[2],4243563512,9),i=c(i,o,r,n,e[7],1735328473,14),r=d(r,n=c(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=d(o,r,n,i,e[8],2272392833,11),i=d(i,o,r,n,e[11],1839030562,16),n=d(n,i,o,r,e[14],4259657740,23),r=d(r,n,i,o,e[1],2763975236,4),o=d(o,r,n,i,e[4],1272893353,11),i=d(i,o,r,n,e[7],4139469664,16),n=d(n,i,o,r,e[10],3200236656,23),r=d(r,n,i,o,e[13],681279174,4),o=d(o,r,n,i,e[0],3936430074,11),i=d(i,o,r,n,e[3],3572445317,16),n=d(n,i,o,r,e[6],76029189,23),r=d(r,n,i,o,e[9],3654602809,4),o=d(o,r,n,i,e[12],3873151461,11),i=d(i,o,r,n,e[15],530742520,16),r=l(r,n=d(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=l(o,r,n,i,e[7],1126891415,10),i=l(i,o,r,n,e[14],2878612391,15),n=l(n,i,o,r,e[5],4237533241,21),r=l(r,n,i,o,e[12],1700485571,6),o=l(o,r,n,i,e[3],2399980690,10),i=l(i,o,r,n,e[10],4293915773,15),n=l(n,i,o,r,e[1],2240044497,21),r=l(r,n,i,o,e[8],1873313359,6),o=l(o,r,n,i,e[15],4264355552,10),i=l(i,o,r,n,e[6],2734768916,15),n=l(n,i,o,r,e[13],1309151649,21),r=l(r,n,i,o,e[4],4149444226,6),o=l(o,r,n,i,e[11],3174756917,10),i=l(i,o,r,n,e[2],718787259,15),n=l(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},function(e,t,r){"use strict";var n=r(1).Buffer,i=r(10),o=r(250),a=new Array(16),s=[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],f=[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],u=[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],c=[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],d=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function b(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function m(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,w=0|this._a,_=0|this._b,k=0|this._c,S=0|this._d,A=0|this._e,E=0;E<80;E+=1){var x,P;E<16?(x=b(r,n,i,o,h,e[s[E]],d[0],u[E]),P=g(w,_,k,S,A,e[f[E]],l[0],c[E])):E<32?(x=y(r,n,i,o,h,e[s[E]],d[1],u[E]),P=v(w,_,k,S,A,e[f[E]],l[1],c[E])):E<48?(x=m(r,n,i,o,h,e[s[E]],d[2],u[E]),P=m(w,_,k,S,A,e[f[E]],l[2],c[E])):E<64?(x=v(r,n,i,o,h,e[s[E]],d[3],u[E]),P=y(w,_,k,S,A,e[f[E]],l[3],c[E])):(x=g(r,n,i,o,h,e[s[E]],d[4],u[E]),P=b(w,_,k,S,A,e[f[E]],l[4],c[E])),r=h,h=o,o=p(i,10),i=n,n=x,w=A,A=S,S=p(k,10),k=_,_=P}var O=this._b+i+S|0;this._b=this._c+o+A|0,this._c=this._d+h+w|0,this._d=this._e+r+_|0,this._e=this._a+n+k|0,this._a=O},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,r){"use strict";var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(596),n.sha1=r(597),n.sha224=r(598),n.sha256=r(251),n.sha384=r(599),n.sha512=r(252)},function(e,t,r){"use strict";var n=r(10),i=r(57),o=r(24).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=r[d-3]^r[d-8]^r[d-14]^r[d-16];for(var l=0;l<80;++l){var h=~~(l/20),p=0|((t=n)<<5|t>>>27)+c(h,i,o,s)+f+r[l]+a[h];f=s,s=o,o=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){"use strict";var n=r(10),i=r(57),o=r(24).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,f=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),b=u(n)+d(p,i,o,s)+f+r[h]+a[p]|0;f=s,s=o,o=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){"use strict";var n=r(10),i=r(251),o=r(57),a=r(24).Buffer,s=new Array(64);function f(){this.init(),this._w=s,o.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=f},function(e,t,r){"use strict";var n=r(10),i=r(252),o=r(57),a=r(24).Buffer,s=new Array(160);function f(){this.init(),this._w=s,o.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=f},function(e,t,r){"use strict";var n=r(24).Buffer,i=r(160).Transform,o=r(21).StringDecoder;function a(e){i.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}r(10)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=a},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;var i=n(r(41)),o=n(r(3)),a=r(40),s=r(235),f=function(){function t(e){(0,i.default)(20===e.length,"Invalid address length"),this.buf=e}return t.zero=function(){return new t((0,a.zeros)(20))},t.fromString=function(e){return(0,i.default)((0,s.isValidAddress)(e),"Invalid address"),new t((0,a.toBuffer)(e))},t.fromPublicKey=function(r){return(0,i.default)(e.isBuffer(r),"Public key should be Buffer"),new t((0,s.pubToAddress)(r))},t.fromPrivateKey=function(r){return(0,i.default)(e.isBuffer(r),"Private key should be Buffer"),new t((0,s.privateToAddress)(r))},t.generate=function(r,n){return(0,i.default)(o.default.isBN(n)),new t((0,s.generateAddress)(r.buf,n.toArrayLike(e)))},t.generate2=function(r,n,o){return(0,i.default)(e.isBuffer(n)),(0,i.default)(e.isBuffer(o)),new t((0,s.generateAddress2)(r.buf,n,o))},t.prototype.equals=function(e){return this.buf.equals(e.buf)},t.prototype.isZero=function(){return this.equals(t.zero())},t.prototype.isPrecompileOrSystemAddress=function(){var e=new o.default(this.buf),t=new o.default(0),r=new o.default("ffff","hex");return e.gte(t)&&e.lte(r)},t.prototype.toString=function(){return"0x"+this.buf.toString("hex")},t.prototype.toBuffer=function(){return e.from(this.buf)},t}();t.Address=f}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var i=r(236),o=n(r(3)),a=r(40),s=r(123),f=r(89),u=r(126);function c(e,t){var r=(0,u.toType)(e,u.TypeOutput.BN);if(!t)return r.subn(27);var n=(0,u.toType)(t,u.TypeOutput.BN);return r.sub(n.muln(2).addn(35))}function d(e){var t=new o.default(e);return t.eqn(0)||t.eqn(1)}t.ecsign=function(t,r,n){var o=(0,i.ecdsaSign)(t,r),a=o.signature,s=o.recid,f=e.from(a.slice(0,32)),c=e.from(a.slice(32,64));if(!n||"number"==typeof n){if(n&&!Number.isSafeInteger(n))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:f,s:c,v:n?s+(2*n+35):s+27}}return{r:f,s:c,v:(0,u.toType)(n,u.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(e)}};t.ecrecover=function(t,r,n,o,s){var f=e.concat([(0,a.setLengthLeft)(n,32),(0,a.setLengthLeft)(o,32)],64),u=c(r,s);if(!d(u))throw new Error("Invalid signature v value");var l=(0,i.ecdsaRecover)(f,u.toNumber(),t);return e.from((0,i.publicKeyConvert)(l,!1).slice(1))};t.toRpcSig=function(t,r,n,i){if(!d(c(t,i)))throw new Error("Invalid signature v value");return(0,a.bufferToHex)(e.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(n,32),(0,a.toBuffer)(t)]))};t.toCompactSig=function(t,r,n,i){if(!d(c(t,i)))throw new Error("Invalid signature v value");var o=(0,u.toType)(t,u.TypeOutput.Number),s=n;return(o>28&&o%2==1||1===o||28===o)&&((s=e.from(n))[0]|=128),(0,a.bufferToHex)(e.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(s,32)]))};t.fromRpcSig=function(e){var t,r,n,i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(64));else{if(64!==i.length)throw new Error("Invalid signature length");t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToInt)(i.slice(32,33))>>7,r[0]&=127}return n<27&&(n+=27),{v:n,r:t,s:r}};t.isValidSignature=function(e,t,r,n,i){void 0===n&&(n=!0);var a=new o.default("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new o.default("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==r.length)return!1;if(!d(c(e,i)))return!1;var f=new o.default(t),u=new o.default(r);return!(f.isZero()||f.gt(s)||u.isZero()||u.gt(s))&&(!n||1!==u.cmp(a))};t.hashPersonalMessage=function(t){(0,f.assertIsBuffer)(t);var r=e.from("Ethereum Signed Message:\n"+t.length,"utf-8");return(0,s.keccak)(e.concat([r,t]))}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){var n=r(0)(r(2)),i=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},s=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var f=s(r(41)),u=r(54),c=a(r(87)),d=r(40);t.defineProperties=function(t,r,i){if(t.raw=[],t._fields=[],t.toJSON=function(e){if(void 0===e&&(e=!1),e){var r={};return t._fields.forEach((function(e){r[e]="0x"+t[e].toString("hex")})),r}return(0,d.baToJSON)(t.raw)},t.serialize=function(){return c.encode(t.raw)},r.forEach((function(r,n){function i(){return t.raw[n]}function o(i){"00"!==(i=(0,d.toBuffer)(i)).toString("hex")||r.allowZero||(i=e.allocUnsafe(0)),r.allowLess&&r.length?(i=(0,d.unpadBuffer)(i),(0,f.default)(r.length>=i.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===i.length||!r.length||(0,f.default)(r.length===i.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[n]=i}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:i,set:o}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),i)if("string"==typeof i&&(i=e.from((0,u.stripHexPrefix)(i),"hex")),e.isBuffer(i)&&(i=c.decode(i)),Array.isArray(i)){if(i.length>t._fields.length)throw new Error("wrong number of fields in data");i.forEach((function(e,r){t[t._fields[r]]=(0,d.toBuffer)(e)}))}else{if("object"!==(0,n.default)(i))throw new Error("invalid data");var o=Object.keys(i);r.forEach((function(e){-1!==o.indexOf(e.name)&&(t[e.name]=i[e.name]),-1!==o.indexOf(e.alias)&&(t[e.alias]=i[e.alias])}))}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.rlp=t.BN=void 0;var s=a(r(3));t.BN=s.default;var f=o(r(87));t.rlp=f},function(e,t,r){"use strict";e.exports=function(e){var t,r=this;return this.net.getId().then((function(e){return t=e,r.getBlock(0)})).then((function(r){var n="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===r.hash&&1===t&&(n="main"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===r.hash&&3===t&&(n="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===r.hash&&4===t&&(n="rinkeby"),"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a"===r.hash&&5===t&&(n="goerli"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===r.hash&&42===t&&(n="kovan"),"function"==typeof e&&e(null,n),n})).catch((function(t){if("function"!=typeof e)throw t;e(t)}))}},function(e,t,r){"use strict";var n=r(33),i=r(79).subscriptions,o=r(36),a=r(80),s=function(){var e=this;n.packageInit(this,arguments);var t=this.setRequestManager;this.setRequestManager=function(r){return t(r),e.net.setRequestManager(r),!0};var r=this.setProvider;this.setProvider=function(){r.apply(e,arguments),e.setRequestManager(e._requestManager)},this.net=new a(this),[new i({name:"subscribe",type:"shh",subscriptions:{messages:{params:1}}}),new o({name:"getVersion",call:"shh_version",params:0}),new o({name:"getInfo",call:"shh_info",params:0}),new o({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new o({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new o({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new o({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new o({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new o({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new o({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new o({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new o({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new o({name:"newSymKey",call:"shh_newSymKey",params:0}),new o({name:"addSymKey",call:"shh_addSymKey",params:1}),new o({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new o({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new o({name:"getSymKey",call:"shh_getSymKey",params:1}),new o({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new o({name:"newMessageFilter",call:"shh_newMessageFilter",params:1}),new o({name:"getFilterMessages",call:"shh_getFilterMessages",params:1}),new o({name:"deleteMessageFilter",call:"shh_deleteMessageFilter",params:1}),new o({name:"post",call:"shh_post",params:1,inputFormatter:[null]}),new o({name:"unsubscribe",call:"shh_unsubscribe",params:1})].forEach((function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}))};s.prototype.clearSubscriptions=function(){this._requestManager.clearSubscriptions()},n.addProviders(s),e.exports=s},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(608),o=function e(t){this.givenProvider=e.givenProvider,t&&t._requestManager&&(t=t.currentProvider),"undefined"!=typeof document&&(this.pick=i.pick),this.setProvider(t)};o.givenProvider=null,"undefined"!=typeof ethereum&ðereum.bzz&&(o.givenProvider=ethereum.bzz),o.prototype.setProvider=function(e){if(e&&"object"===(0,n.default)(e)&&"string"==typeof e.bzz&&(e=e.bzz),"string"!=typeof e){this.currentProvider=null;var t=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw t},!1}return this.currentProvider=e,this.download=i.at(e).download,this.upload=i.at(e).upload,this.isAvailable=i.at(e).isAvailable,!0},e.exports=o},function(e,t,r){"use strict";var n=function(){throw"This swarm.js function isn't available on the browser."},i={readFile:n},o={download:n,safeDownloadArchived:n,directoryTree:n},a={platform:n,arch:n},s={join:n,slice:n},f={spawn:n},u={lookup:n},c=r(609),d=r(253),l=r(622),h=r(624),p=r(625);e.exports=p({fs:i,files:o,os:a,path:s,child_process:f,defaultArchives:{},mimetype:u,request:c,downloadUrl:null,bytes:d,hash:l,pick:h})},function(e,t,r){"use strict";var n=r(610),i=r(613),o=r(91),a=r(614),s=r(615),f=function(){};e.exports=function(e,t,r){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");"function"==typeof t&&(r=t,t={});if(r&&"function"!=typeof r)throw new TypeError("expected cb to be undefined or a function");r=r||f;var u=(t=t||{}).json?"json":"text",c=(t=o({responseType:u},t)).headers||{},d=(t.method||"GET").toUpperCase(),l=t.query;l&&("string"!=typeof l&&(l=n.stringify(l)),e=i(e,l));"json"===t.responseType&&a(c,"Accept","application/json");t.json&&"GET"!==d&&"HEAD"!==d&&(a(c,"Content-Type","application/json"),t.body=JSON.stringify(t.body));return t.method=d,t.url=e,t.headers=c,delete t.query,delete t.json,s(t,r)}},function(e,t,r){"use strict";var n=r(0)(r(2)),i=r(611),o=r(91),a=r(612);function s(e,t){return t.encode?t.strict?i(e):encodeURIComponent(e):e}function f(e){var t=e.indexOf("?");return-1===t?"":e.slice(t+1)}function u(e,t){var r=function(e){var t;switch(e.arrayFormat){case"index":return function(e,r,n){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return function(e,r,n){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};default:return function(e,t,r){void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t=o({arrayFormat:"none"},t)),i=Object.create(null);return"string"!=typeof e?i:(e=e.trim().replace(/^[?#&]/,""))?(e.split("&").forEach((function(e){var t=e.replace(/\+/g," ").split("="),n=t.shift(),o=t.length>0?t.join("="):void 0;o=void 0===o?null:a(o),r(a(n),o,i)})),Object.keys(i).sort().reduce((function(e,t){var r=i[t];return Boolean(r)&&"object"===(0,n.default)(r)&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===(0,n.default)(t)?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(r):e[t]=r,e}),Object.create(null))):i}t.extract=f,t.parse=u,t.stringify=function(e,t){!1===(t=o({encode:!0,strict:!0,arrayFormat:"none"},t)).sort&&(t.sort=function(){});var r=function(e){switch(e.arrayFormat){case"index":return function(t,r,n){return null===r?[s(t,e),"[",n,"]"].join(""):[s(t,e),"[",s(n,e),"]=",s(r,e)].join("")};case"bracket":return function(t,r){return null===r?s(t,e):[s(t,e),"[]=",s(r,e)].join("")};default:return function(t,r){return null===r?s(t,e):[s(t,e),"=",s(r,e)].join("")}}}(t);return e?Object.keys(e).sort(t.sort).map((function(n){var i=e[n];if(void 0===i)return"";if(null===i)return s(n,t);if(Array.isArray(i)){var o=[];return i.slice().forEach((function(e){void 0!==e&&o.push(r(n,e,o.length))})),o.join("&")}return s(n,t)+"="+s(i,t)})).filter((function(e){return e.length>0})).join("&"):""},t.parseUrl=function(e,t){return{url:e.split("?")[0]||"",query:u(f(e),t)}}},function(e,t,r){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}},function(e,t,r){"use strict";var n=r(0)(r(2)),i=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],a(r),a(n))}function s(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(i),r=1;r0&&(d=setTimeout((function(){if(!u){u=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),c.setRequestHeader)for(s in b)b.hasOwnProperty(s)&&c.setRequestHeader(s,b[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(p||null),c}e.exports=f,e.exports.default=f,f.XMLHttpRequest=n.XMLHttpRequest||function(){},f.XDomainRequest="withCredentials"in new f.XMLHttpRequest?f.XMLHttpRequest:n.XDomainRequest,function(e,t){for(var r=0;r>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(f<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(d<<1|l>>>31),r=f^(l<<1|d>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|p>>>31),r=c^(p<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=d^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,R=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,j=e[2]<<1|e[3]>>>31,U=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,I=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,D=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,k=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,P=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,A=e[49]<<14|e[48]>>>18,e[0]=b^~m&g,e[1]=y^~v&w,e[10]=E^~P&R,e[11]=x^~O&T,e[20]=j^~N&F,e[21]=U^~L&D,e[30]=G^~W&X,e[31]=V^~J&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=m^~g&_,e[3]=v^~w&k,e[12]=P^~R&M,e[13]=O^~T&I,e[22]=N^~F&q,e[23]=L^~D&z,e[32]=W^~X&Y,e[33]=J^~Z&$,e[42]=ne^~oe&se,e[43]=ie^~ae&fe,e[4]=g^~_&S,e[5]=w^~k&A,e[14]=R^~M&B,e[15]=T^~I&C,e[24]=F^~q&H,e[25]=D^~z&K,e[34]=X^~Y&Q,e[35]=Z^~$&ee,e[44]=oe^~se&ue,e[45]=ae^~fe&ce,e[6]=_^~S&b,e[7]=k^~A&y,e[16]=M^~B&E,e[17]=I^~C&x,e[26]=q^~H&j,e[27]=z^~K&U,e[36]=Y^~Q&G,e[37]=$^~ee&V,e[46]=se^~ue&te,e[47]=fe^~ce&re,e[8]=S^~b&m,e[9]=A^~y&v,e[18]=B^~E&P,e[19]=C^~x&O,e[28]=H^~j&N,e[29]=K^~U&L,e[38]=Q^~G&W,e[39]=ee^~V&J,e[48]=ue^~te&ne,e[49]=ce^~re&ie,e[0]^=a[n],e[1]^=a[n+1]},f=function(e){return function(t){var r;if("0x"===t.slice(0,2)){r=[];for(var a=2,f=t.length;a>2]|=t[h]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(f[y>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=u){for(e.start=y-u,e.block=f[c],y=0;y>2]|=i[3&y],e.lastByteIndex===u)for(f[0]=f[c],y=1;y>4&15]+n[15&p]+n[p>>12&15]+n[p>>8&15]+n[p>>20&15]+n[p>>16&15]+n[p>>28&15]+n[p>>24&15];m%c==0&&(s(l),y=0)}return"0x"+b}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))};var t}(e),r)}};e.exports={keccak256:f(256),keccak512:f(512),keccak256s:f(256),keccak512s:f(512)}},function(e,t,r){"use strict";var n=function(e){return function(){return new Promise((function(t,r){var n,i=function(r){var n={},i=r.target.files.length,o=0;[].map.call(r.target.files,(function(r){var a=new FileReader;a.onload=function(a){var s=new Uint8Array(a.target.result);if("directory"===e){var f=r.webkitRelativePath;n[f.slice(f.indexOf("/")+1)]={type:"text/plain",data:s},++o===i&&t(n)}else if("file"===e){var u=r.webkitRelativePath;t({type:mimetype.lookup(u),data:s})}else t(s)},a.readAsArrayBuffer(r)}))};"directory"===e?((n=document.createElement("input")).addEventListener("change",i),n.type="file",n.webkitdirectory=!0,n.mozdirectory=!0,n.msdirectory=!0,n.odirectory=!0,n.directory=!0):((n=document.createElement("input")).addEventListener("change",i),n.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),n.dispatchEvent(o)}))}};e.exports={data:n("data"),file:n("file"),directory:n("directory")}},function(e,t,r){"use strict";e.exports=function(e){var t=e.fs,r=e.files,n=e.os,i=e.path,o=e.child_process,a=e.mimetype,s=e.defaultArchives,f=e.request,u=e.downloadUrl,c=e.bytes,d=e.hash,l=e.pick,h=function(e){return function(t){for(var r={},n=0,i=e.length;n=400?n(new Error("Error ".concat(i.statusCode,"."))):r(new Uint8Array(t))}))}))}},y=function(e){return function(t){return function t(r){return function(n){return function(i){var o=function(e){return void 0===e.path?Promise.resolve():"application/bzz-manifest+json"===e.contentType?t(e.hash)(n+e.path)(i):Promise.resolve((r=n+e.path,function(e){return function(t){return t[r]=e,t}})(function(e){return{type:e.contentType,hash:e.hash}}(e))(i));var r};return b(e)(r).then((function(e){return JSON.parse(U(e)).entries})).then((function(e){return Promise.all(e.map(o))})).then((function(){return i}))}}}(t)("")({})}},m=function(e){return function(t){return y(e)(t).then((function(e){return h(Object.keys(e))(Object.keys(e).map((function(t){return e[t].hash})))}))}},v=function(e){return function(t){return y(e)(t).then((function(t){var r=Object.keys(t),n=r.map((function(e){return t[e].hash})),i=r.map((function(e){return t[e].type})),o=n.map(b(e));return Promise.all(o).then((function(e){return h(r)(function(e){return e.map((function(e,t){return{type:i[t],data:e}}))}(e))}))}))}},g=function(e){return function(t){return function(n){return r.download(p(e)(t))(n)}}},w=function(e){return function(t){return function(r){return m(e)(t).then((function(t){var n=[];for(var o in t)if(o.length>0){var a=i.join(r,o);n.push(g(e)(t[o])(a))}return Promise.all(n).then((function(){return r}))}))}}},_=function(e){return function(t){return new Promise((function(r,n){var i={body:"string"==typeof t?N(t):t,method:"POST"};f("".concat(e,"/bzz-raw:/"),i,(function(e,t){return e?n(e):r(t)}))}))}},k=function(e){return function(t){return function(r){return function(n){return function i(o){var a="/"===r[0]?r:"/"+r,s="".concat(e,"/bzz:/").concat(t).concat(a),u={method:"PUT",headers:{"Content-Type":n.type},body:n.data};return new Promise((function(e,t){f(s,u,(function(r,n){return r?t(r):-1!==n.indexOf("error")?t(n):e(n)}))})).catch((function(e){return o>0&&i(o-1)}))}(3)}}}},S=function(e){return function(t){return E(e)({"":t})}},A=function(e){return function(r){return t.readFile(r).then((function(t){return S(e)({type:a.lookup(r),data:t})}))}},E=function(e){return function(t){return _(e)("{}").then((function(r){return Object.keys(t).reduce((function(r,n){return r.then(function(r){return function(n){return k(e)(n)(r)(t[r])}}(n))}),Promise.resolve(r))}))}},x=function(e){return function(r){return t.readFile(r).then(_(e))}},P=function(e){return function(n){return function(i){return r.directoryTree(i).then((function(e){return Promise.all(e.map((function(e){return t.readFile(e)}))).then((function(t){var r=e.map((function(e){return e.slice(i.length)})),n=e.map((function(e){return a.lookup(e)||"text/plain"}));return h(r)(t.map((function(e,t){return{type:n[t],data:e}})))}))})).then((function(e){return(t=n?{"":e[n]}:{},function(e){var r={};for(var n in t)r[n]=t[n];for(var i in e)r[i]=e[i];return r})(e);var t})).then(E(e))}}},O=function(e){return function(t){if("data"===t.pick)return l.data().then(_(e));if("file"===t.pick)return l.file().then(S(e));if("directory"===t.pick)return l.directory().then(E(e));if(t.path)switch(t.kind){case"data":return x(e)(t.path);case"file":return A(e)(t.path);case"directory":return P(e)(t.defaultFile)(t.path)}else{if(t.length||"string"==typeof t)return _(e)(t);if(t instanceof Object)return E(e)(t)}return Promise.reject(new Error("Bad arguments"))}},R=function(e){return function(t){return function(r){return C(e)(t).then((function(n){return n?r?w(e)(t)(r):v(e)(t):r?g(e)(t)(r):b(e)(t)}))}}},T=function(e,t){var i=n.platform().replace("win32","windows")+"-"+("x64"===n.arch()?"amd64":"386"),o=(t||s)[i],a=u+o.archive+".tar.gz",f=o.archiveMD5,c=o.binaryMD5;return r.safeDownloadArchived(a)(f)(c)(e)},M=function(e){return new Promise((function(t,r){var n=o.spawn,i=function(e){return function(t){return-1!==(""+t).indexOf(e)}},a=e.account,s=e.password,f=e.dataDir,u=e.ensApi,c=e.privateKey,d=0,l=n(e.binPath,["--bzzaccount",a||c,"--datadir",f,"--ens-api",u]),h=function(e){0===d&&i("Passphrase")(e)?setTimeout((function(){d=1,l.stdin.write(s+"\n")}),500):i("Swarm http proxy started")(e)&&(d=2,clearTimeout(p),t(l))};l.stdout.on("data",h),l.stderr.on("data",h);var p=setTimeout((function(){return r(new Error("Couldn't start swarm process."))}),2e4)}))},I=function(e){return new Promise((function(t,r){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var n=setTimeout((function(){return e.kill("SIGKILL")}),8e3);e.once("close",(function(){clearTimeout(n),t()}))}))},B=function(e){return _(e)("test").then((function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e})).catch((function(){return!1}))},C=function(e){return function(t){return b(e)(t).then((function(e){try{return!!JSON.parse(U(e)).entries}catch(e){return!1}}))}},j=function(e){return function(t,r,n,i,o){var a;return void 0!==t&&(a=e(t)),void 0!==r&&(a=e(r)),void 0!==n&&(a=e(n)),void 0!==i&&(a=e(i)),void 0!==o&&(a=e(o)),a}},U=function(e){return c.toString(c.fromUint8Array(e))},N=function(e){return c.toUint8Array(c.fromString(e))},L=function(e){return{download:function(t,r){return R(e)(t)(r)},downloadData:j(b(e)),downloadDataToDisk:j(g(e)),downloadDirectory:j(v(e)),downloadDirectoryToDisk:j(w(e)),downloadEntries:j(y(e)),downloadRoutes:j(m(e)),isAvailable:function(){return B(e)},upload:function(t){return O(e)(t)},uploadData:j(_(e)),uploadFile:j(S(e)),uploadFileFromDisk:j(S(e)),uploadDataFromDisk:j(x(e)),uploadDirectory:j(E(e)),uploadDirectoryFromDisk:j(P(e)),uploadToManifest:j(k(e)),pick:l,hash:d,fromString:N,toString:U}};return{at:L,local:function(e){return function(t){return B("http://localhost:8500").then((function(r){return r?t(L("http://localhost:8500")).then((function(){})):T(e.binPath,e.archives).onData((function(t){return(e.onProgress||function(){})(t.length)})).then((function(){return M(e)})).then((function(e){return t(L("http://localhost:8500")).then((function(){return e}))})).then(I)}))}},download:R,downloadBinary:T,downloadData:b,downloadDataToDisk:g,downloadDirectory:v,downloadDirectoryToDisk:w,downloadEntries:y,downloadRoutes:m,isAvailable:B,startProcess:M,stopProcess:I,upload:O,uploadData:_,uploadDataFromDisk:x,uploadFile:S,uploadFileFromDisk:A,uploadDirectory:E,uploadDirectoryFromDisk:P,uploadToManifest:k,pick:l,hash:d,fromString:N,toString:U}}}])})); +//# sourceMappingURL=web3.min.js.map \ No newline at end of file diff --git a/test/deploy.ts b/test/deploy.ts index 27cf2405..fc6e2f17 100644 --- a/test/deploy.ts +++ b/test/deploy.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import * as http from 'http'; import * as path from 'path'; -import ganache, { Provider } from 'ganache'; +import ganache, { Provider, Server, ServerOptions } from 'ganache'; import handler from 'serve-handler'; import Web3 from 'web3'; @@ -14,21 +14,19 @@ export function getCounterContract(): { address: string } | null { return counterContract; } -async function deploy(): Promise<{ address: string }> { - const provider = await waitForGanache(); - await startTestServer(); - return await deployContract(provider); -} - -async function waitForGanache(): Promise { +export async function startLocalEthereum(opts?: ServerOptions): Promise> { console.log('Starting ganache...'); - const server = ganache.server({ seed: 'asd123', logging: { quiet: true } }); + opts = opts ?? {}; + const server = ganache.server({ ...opts, logging: { quiet: true } }); await server.listen(8545); console.log('Ganache running at http://localhost:8545'); - return server.provider; + return server; } -async function deployContract(provider: Provider): Promise<{ address: string } | null> { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type Contract = any | null; + +export async function deployContract(provider: Provider): Promise { console.log('Deploying test contract...'); const web3 = new Web3((provider as unknown) as Web3['currentProvider']); const compiledContracts = compileContracts(); @@ -47,15 +45,15 @@ async function deployContract(provider: Provider): Promise<{ address: string } | null, 2, )}`; + await new Promise((resolve) => { fs.writeFile(dataJsPath, data, resolve); }); - console.log('path:', dataJsPath); return { ...counterContract, ...counterContract, ...counterContract.options }; } -async function startTestServer(): Promise { +export async function startTestServer(): Promise { console.log('Starting test server...'); const server = http.createServer((request, response) => { return handler(request, response, { @@ -70,6 +68,5 @@ async function startTestServer(): Promise { resolve(); }); }); + return server; } - -export default deploy; diff --git a/test/global.ts b/test/global.ts new file mode 100644 index 00000000..455f96d2 --- /dev/null +++ b/test/global.ts @@ -0,0 +1,74 @@ +import { writeFileSync } from 'fs'; +import http from 'http'; +import path from 'path'; + +import { Provider, Server } from 'ganache'; +import puppeteer, { Browser } from 'puppeteer'; + +import * as dappeteer from '../src'; +import { Dappeteer } from '../src'; + +import { Contract, deployContract, startLocalEthereum, startTestServer } from './deploy'; + +export type InjectableContext = Readonly<{ + provider: Provider; + ethereum: Server<'ethereum'>; + testPageServer: http.Server; + browser: Browser; + metamask: Dappeteer; + contract: Contract; +}>; + +// TestContext will be used by all the test +export type TestContext = Mocha.Context & InjectableContext; + +export const LOCAL_PREFUNDED_MNEMONIC = + 'pioneer casual canoe gorilla embrace width fiction bounce spy exhibit another dog'; +export const PASSWORD = 'password1234'; + +export const mochaHooks = { + async beforeAll(this: Mocha.Context): Promise { + const ethereum = await startLocalEthereum({ + wallet: { + mnemonic: LOCAL_PREFUNDED_MNEMONIC, + defaultBalance: 100, + }, + }); + const browser = await dappeteer.launch(puppeteer, { + metaMaskVersion: process.env.METAMASK_VERSION || dappeteer.RECOMMENDED_METAMASK_VERSION, + }); + const server = await startTestServer(); + const metamask = await dappeteer.setupMetaMask(browser, { + // optional, else it will use a default seed + seed: LOCAL_PREFUNDED_MNEMONIC, + password: PASSWORD, + }); + const contract = await deployContract(ethereum.provider); + + const context: InjectableContext = { + ethereum: ethereum, + provider: ethereum.provider, + browser, + testPageServer: server, + metamask, + contract, + }; + + Object.assign(this, context); + }, + + async afterAll(this: TestContext): Promise { + this.testPageServer.close(); + await this.browser.close(); + await this.ethereum.close(); + }, + + async afterEach(this: TestContext): Promise { + if (this.currentTest.state === 'failed') { + writeFileSync( + path.resolve(__dirname, `../${this.currentTest.fullTitle()}.png`), + await this.metamask.page.screenshot({ encoding: 'binary', fullPage: true }), + ); + } + }, +}; diff --git a/test/mocha.opts b/test/mocha.opts deleted file mode 100644 index 32e6cbfd..00000000 --- a/test/mocha.opts +++ /dev/null @@ -1,6 +0,0 @@ ---require ts-node/register ---color ---recursive ---timeout 200000 ---exit -test/{,**/}*.spec.ts \ No newline at end of file diff --git a/test/test.spec.ts b/test/test.spec.ts deleted file mode 100644 index bd5060b0..00000000 --- a/test/test.spec.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { readdir } from 'fs/promises'; -import path from 'path'; - -import { expect, use as chaiUse } from 'chai'; -import chaiAsPromised from 'chai-as-promised'; -import puppeteer from 'puppeteer'; - -import { Dappeteer, RECOMMENDED_METAMASK_VERSION } from '../src'; -import * as dappeteer from '../src/index'; - -import deploy from './deploy'; -import { pause } from './utils'; -import { addNetworkTests } from './utils/addNetwork'; -import { importPKTests } from './utils/importPK'; - -chaiUse(chaiAsPromised); - -function getCounterNumber(contract): Promise { - return contract.methods - .count() - .call() - .then((res) => { - return Number(res); - }); -} - -async function clickElement(page, selector): Promise { - await page.bringToFront(); - await page.waitForSelector(selector); - const element = await page.$(selector); - await element.click(); -} - -export let testContract, browser, metamask: Dappeteer, testPage; - -describe('dappeteer', () => { - before(async () => { - testContract = await deploy(); - browser = await dappeteer.launch(puppeteer, { - metaMaskVersion: process.env.METAMASK_VERSION || RECOMMENDED_METAMASK_VERSION, - }); - metamask = await dappeteer.setupMetaMask(browser, { - // optional, else it will use a default seed - seed: 'pioneer casual canoe gorilla embrace width fiction bounce spy exhibit another dog', - password: 'password1234', - }); - testPage = await browser.newPage(); - await testPage.goto('http://localhost:8080/'); - - // output version - const directory = path.resolve(__dirname, '..', 'metamask'); - const files = await readdir(directory); - console.log(`::set-output name=version::${files.pop().replace(/_/g, '.')}`); - }); - - // validate dappateer setup - it('should be deployed, contract', async () => { - expect(testContract).to.be.ok; - expect(testContract.address).to.be.ok; - expect(testContract.options.address).to.be.ok; - }); - - it('should running, puppeteer', async () => { - expect(browser).to.be.ok; - }); - - it('should open, metamask', async () => { - expect(metamask).to.be.ok; - }); - - it('should open, test page', async () => { - expect(testPage).to.be.ok; - expect(await testPage.title()).to.be.equal('Local MetaMask test'); - }); - - describe('test addNetwork method', addNetworkTests.bind(this)); - describe('test importPK method', importPKTests.bind(this)); - - // TODO: add more cases - it('should switch network, localhost', async () => { - await metamask.switchNetwork('localhost'); - - const selectedNetwork = await metamask.page.evaluate( - () => (document.querySelector('.network-display > span:nth-child(2)') as HTMLSpanElement).innerHTML, - ); - expect(selectedNetwork).to.be.equal('Localhost 8545'); - }); - - describe('test switchAccount method', async () => { - before(async () => { - await metamask.importPK('4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b10'); - }); - - after(async () => { - await metamask.helpers.deleteAccount(2); - await pause(0.5); - }); - - it('should switch accounts', async () => { - await metamask.switchAccount(1); - }); - }); - - // TODO: cover more cases - it('should add token', async () => { - await metamask.switchNetwork('kovan'); - await metamask.addToken({ - tokenAddress: '0x4f96fe3b7a6cf9725f59d353f723c1bdb64ca6aa', - symbol: 'KAKI', - }); - await metamask.switchNetwork('localhost'); - }); - - it('should lock and unlock', async () => { - await metamask.lock(); - await metamask.unlock('password1234'); - }); - - it('should connect to ethereum', async () => { - await clickElement(testPage, '.connect-button'); - await metamask.approve(); - - // For some reason initial approve does not resolve nor fail promise - await clickElement(testPage, '.connect-button'); - await testPage.waitForSelector('#connected'); - }); - - it('should be able to sign', async () => { - await clickElement(testPage, '.sign-button'); - await metamask.sign(); - - await testPage.waitForSelector('#signed'); - }); - - it('should return token balance', async () => { - const tokenBalance: number = await metamask.helpers.getTokenBalance('ETH'); - expect(tokenBalance).to.be.greaterThan(0); - }); - - it('should return 0 token balance when token not found', async () => { - const tokenBalance: number = await metamask.helpers.getTokenBalance('FARTBUCKS'); - expect(tokenBalance).to.be.equal(0); - }); - - describe('test contract', async () => { - let counterBefore; - - before(async () => { - await metamask.switchNetwork('local'); - counterBefore = await getCounterNumber(testContract); - }); - - it('should confirm transaction', async () => { - // click increase button - await clickElement(testPage, '.increase-button'); - - // submit tx - await metamask.confirmTransaction(); - await testPage.waitForSelector('#txSent'); - }); - - it('should have increased count', async () => { - // wait half a seconds just in case - await pause(1); - - const counterAfter = await getCounterNumber(testContract); - - expect(counterAfter).to.be.equal(counterBefore + 1); - }); - }); - - describe('test confirmTransaction method', async () => { - it('should change gas values', async () => { - // click increase button - await clickElement(testPage, '.increase-fees-button'); - - // submit tx - await metamask.confirmTransaction({ - gas: 21000, - gasLimit: 400000, - }); - await testPage.waitForSelector('#feesTxSent'); - }); - - it('should not fail if gas priority is missing', async () => { - await metamask.switchNetwork('localhost'); - - // click increase button - await clickElement(testPage, '.transfer-button'); - await pause(1); - - // submit tx - await metamask.confirmTransaction({ - gas: 21000, - priority: 2, - gasLimit: 202020, - }); - - await pause(5); - await testPage.waitForSelector('#transferred'); - }); - }); - - after(async () => { - // close browser - await browser.close(); - }); -}); diff --git a/test/utils.ts b/test/utils.ts deleted file mode 100644 index 92bc3d95..00000000 --- a/test/utils.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function pause(seconds: number): Promise { - return new Promise((res) => setTimeout(res, 1000 * seconds)); -} diff --git a/test/utils/addNetwork.ts b/test/utils/addNetwork.ts deleted file mode 100644 index 3eeafc08..00000000 --- a/test/utils/addNetwork.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { expect } from 'chai'; - -import { clickOnLogo } from '../../src/helpers'; -import { metamask } from '../test.spec'; -import { pause } from '../utils'; - -export const addNetworkTests = async (): Promise => { - after(async () => { - await metamask.switchNetwork('local'); - await metamask.helpers.deleteNetwork('Binance Smart Chain'); - await pause(0.5); - }); - - it('should add network with required params', async () => { - await metamask.addNetwork({ - networkName: 'Binance Smart Chain', - rpc: 'https://data-seed-prebsc-1-s1.binance.org:8545/', - chainId: 97, - symbol: 'BNB', - }); - - const selectedNetwork = await metamask.page.evaluate( - () => (document.querySelector('.network-display > span:nth-child(2)') as HTMLSpanElement).innerHTML, - ); - expect(selectedNetwork).to.be.equal('Binance Smart Chain'); - }); - - it('should fail to add already added network', async () => { - await expect( - metamask.addNetwork({ - networkName: 'Binance Smart Chain', - rpc: 'https://data-seed-prebsc-1-s1.binance.org:8545/', - chainId: 97, - symbol: 'BNB', - }), - ).to.be.rejectedWith(SyntaxError); - - await clickOnLogo(metamask.page); - }); - - it('should fail to add network with wrong chain ID', async () => { - await expect( - metamask.addNetwork({ - networkName: 'Optimistic Ethereum Testnet Kovan', - rpc: 'https://kovan.optimism.io/', - chainId: 420, - symbol: 'KUR', - }), - ).to.be.rejectedWith(SyntaxError); - - await clickOnLogo(metamask.page); - }); -}; diff --git a/test/utils/importPK.ts b/test/utils/importPK.ts deleted file mode 100644 index 926d63a5..00000000 --- a/test/utils/importPK.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { expect } from 'chai'; - -import { clickOnLogo, openProfileDropdown } from '../../src/helpers'; -import { metamask } from '../test.spec'; -import { pause } from '../utils'; - -export const importPKTests = async (): Promise => { - afterEach(async () => { - await clickOnLogo(metamask.page); - }); - - after(async () => { - await metamask.helpers.deleteAccount(2); - await pause(0.5); - }); - - it('should import private key', async () => { - const countAccounts = async (): Promise => { - await openProfileDropdown(metamask.page); - const container = await metamask.page.$('.account-menu__accounts'); - const count = (await container.$$('.account-menu__account')).length; - await openProfileDropdown(metamask.page); - return count; - }; - - const beforeImport = await countAccounts(); - await metamask.importPK('4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b10'); - const afterImport = await countAccounts(); - - expect(beforeImport + 1).to.be.equal(afterImport); - }); - - it('should throw error on duplicated private key', async () => { - await expect( - metamask.importPK('4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b10'), - ).to.be.rejectedWith(SyntaxError); - }); - - it('should throw error on wrong key', async () => { - await expect( - metamask.importPK('4f3edf983ac636a65a$@!ce7c78d9aa706d3b113bce9c46f30d7d21715b23b10'), - ).to.be.rejectedWith(SyntaxError); - }); - - it('should throw error on to short key', async () => { - await expect(metamask.importPK('4f3edf983ac636a65ace7c78d9aa706d3b113bce9c46f30d7d21715b23b10')).to.be.rejectedWith( - SyntaxError, - ); - }); -}; diff --git a/test/utils/utils.ts b/test/utils/utils.ts new file mode 100644 index 00000000..8610c01f --- /dev/null +++ b/test/utils/utils.ts @@ -0,0 +1,12 @@ +import { Page } from 'puppeteer'; + +export function pause(seconds: number): Promise { + return new Promise((res) => setTimeout(res, 1000 * seconds)); +} + +export async function clickElement(page: Page, selector: string): Promise { + await page.bringToFront(); + await page.waitForSelector(selector, { timeout: 15000 }); + const element = await page.$(selector); + await element.click(); +} diff --git a/yarn.lock b/yarn.lock index fe04eba9..b20d2d78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -431,10 +431,10 @@ resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== -"@types/mocha@^7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-7.0.2.tgz#b17f16cf933597e10d6d78eae3251e692ce8b0ce" - integrity sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w== +"@types/mocha@^9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" + integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== "@types/node@*": version "14.14.27" @@ -559,6 +559,11 @@ "@typescript-eslint/types" "4.15.0" eslint-visitor-keys "^2.0.0" +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + abstract-leveldown@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz#08d19d4e26fb5be426f7a57004851b39e1795a2e" @@ -626,12 +631,7 @@ ajv@^7.0.2: require-from-string "^2.0.2" uri-js "^4.2.2" -ansi-colors@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" - integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== - -ansi-colors@^4.1.1: +ansi-colors@4.1.1, ansi-colors@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== @@ -646,17 +646,17 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= -ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - ansi-regex@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -675,10 +675,10 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" @@ -695,6 +695,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + array-filter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" @@ -888,6 +893,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.1, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -1061,10 +1073,10 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= -camelcase@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caseless@~0.12.0: version "0.12.0" @@ -1095,7 +1107,7 @@ chai@^4.3.4: pathval "^1.1.1" type-detect "^4.0.5" -chalk@^2.0.0, chalk@^2.4.2: +chalk@^2.0.0: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1112,25 +1124,33 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= -chokidar@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: - anymatch "~3.1.1" + anymatch "~3.1.2" braces "~3.0.2" - glob-parent "~5.1.0" + glob-parent "~5.1.2" is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.2.0" + readdirp "~3.6.0" optionalDependencies: - fsevents "~2.1.1" + fsevents "~2.3.2" chownr@^1.1.1: version "1.1.4" @@ -1175,14 +1195,14 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" clone-response@^1.0.2: version "1.0.2" @@ -1398,13 +1418,6 @@ debug@2.6.9, debug@^2.2.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - debug@4, debug@^4.0.1, debug@^4.1.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" @@ -1419,11 +1432,16 @@ debug@4.3.4: dependencies: ms "2.1.2" -decamelize@^1.1.1, decamelize@^1.2.0: +decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -1453,7 +1471,7 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== -define-properties@^1.1.2, define-properties@^1.1.3: +define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== @@ -1488,10 +1506,10 @@ devtools-protocol@0.0.982423: resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.982423.tgz#39ac3791d4c5b90ebb416d4384663b7b0cc44154" integrity sha512-FnVW2nDbjGNw1uD/JRC+9U5768W7e1TfUwqbDTcSsAu1jXFjITSX8w3rkW5FEpHRMPPGpvNSmO1pOpqByiWscA== -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== diff@^4.0.1: version "4.0.2" @@ -1570,11 +1588,6 @@ emittery@0.10.0: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.0.tgz#bb373c660a9d421bb44706ec4967ed50c02a8026" integrity sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ== -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -1661,12 +1674,22 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -2118,12 +2141,13 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-up@3.0.0, find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: - locate-path "^3.0.0" + locate-path "^6.0.0" + path-exists "^4.0.0" find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" @@ -2148,12 +2172,10 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" -flat@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" - integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== - dependencies: - is-buffer "~2.0.3" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== flatted@^3.1.0: version "3.1.1" @@ -2226,10 +2248,10 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== function-bind@^1.1.1: version "1.1.1" @@ -2263,7 +2285,7 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== -get-caller-file@^2.0.1: +get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -2308,17 +2330,24 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: +glob-parent@^5.0.0, glob-parent@^5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== dependencies: is-glob "^4.0.1" -glob@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -2413,11 +2442,6 @@ graceful-fs@^4.2.4: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -2446,7 +2470,7 @@ has-symbol-support-x@^1.4.1: resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== -has-symbols@^1.0.0, has-symbols@^1.0.1: +has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== @@ -2639,7 +2663,7 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-buffer@^2.0.5, is-buffer@~2.0.3: +is-buffer@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== @@ -2732,6 +2756,11 @@ is-plain-obj@^1.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + is-regex@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" @@ -2778,6 +2807,11 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + isarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -2863,13 +2897,12 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: - argparse "^1.0.7" - esprima "^4.0.0" + argparse "^2.0.1" js-yaml@^3.13.1: version "3.14.1" @@ -3040,14 +3073,6 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -3055,17 +3080,25 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash@^4.17.15, lodash@^4.17.20: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== -log-symbols@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: - chalk "^2.4.2" + chalk "^4.1.0" + is-unicode-supported "^0.1.0" lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" @@ -3226,6 +3259,13 @@ minimatch@3.0.4, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -3263,42 +3303,40 @@ mkdirp@*: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@0.5.5, mkdirp@^0.5.0: +mkdirp@^0.5.0: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: minimist "^1.2.5" -mocha@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" - integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== +mocha@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" + integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== dependencies: - ansi-colors "3.2.3" + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - mkdirp "0.5.5" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" mock-fs@^4.1.0: version "4.13.0" @@ -3320,7 +3358,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: +ms@2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -3375,6 +3413,11 @@ nano-json-stream-parser@^0.1.2: resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + napi-macros@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" @@ -3405,14 +3448,6 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== -node-environment-flags@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" - integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - node-fetch@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" @@ -3495,21 +3530,11 @@ object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - object.assign@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" @@ -3520,15 +3545,6 @@ object.assign@^4.1.2: has-symbols "^1.0.1" object-keys "^1.1.1" -object.getownpropertydescriptors@^2.0.3: - version "2.1.1" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz#0dfda8d108074d9c563e80490c883b6661091544" - integrity sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - object.values@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.2.tgz#7a2015e06fcb0f546bd652486ce8583a4731c731" @@ -3618,13 +3634,20 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0: +p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -3632,13 +3655,6 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -3646,6 +3662,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-timeout@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" @@ -4023,12 +4046,12 @@ readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: - picomatch "^2.0.4" + picomatch "^2.2.1" regexpp@^3.0.0, regexpp@^3.1.0: version "3.1.0" @@ -4076,11 +4099,6 @@ require-main-filename@^1.0.1: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -4180,7 +4198,7 @@ secp256k1@^4.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.7.0: +"semver@2 || 3 || 4 || 5", semver@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -4211,6 +4229,13 @@ send@0.17.1: range-parser "~1.2.1" statuses "~1.5.0" +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + serve-handler@5.0.8: version "5.0.8" resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-5.0.8.tgz#790dbe340dabf1d61bdbaa02ea37dcab372377a8" @@ -4412,7 +4437,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +string-width@^2.0.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -4420,14 +4445,14 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== +string-width@^4.1.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" string-width@^4.2.0: version "4.2.0" @@ -4475,13 +4500,6 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - strip-ansi@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" @@ -4489,6 +4507,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -4506,22 +4531,17 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" -strip-json-comments@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: - has-flag "^3.0.0" + has-flag "^4.0.0" supports-color@^5.3.0: version "5.5.0" @@ -5180,7 +5200,7 @@ which-typed-array@^1.1.2: has-symbols "^1.0.1" is-typed-array "^1.1.3" -which@1.3.1, which@^1.2.9: +which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -5194,18 +5214,16 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - word-wrap@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -5214,14 +5232,14 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" wrappy@1: version "1.0.2" @@ -5289,10 +5307,10 @@ y18n@^3.2.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== -y18n@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.1.tgz#8db2b83c31c5d75099bb890b23f3094891e247d4" - integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yaeti@^0.0.6: version "0.0.6" @@ -5309,13 +5327,15 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-parser@^9.0.2: version "9.0.2" @@ -5324,30 +5344,28 @@ yargs-parser@^9.0.2: dependencies: camelcase "^4.1.0" -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== - dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" - -yargs@13.3.2, yargs@^13.3.0: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" yargs@^11.0.0: version "11.1.1" @@ -5379,3 +5397,8 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==