aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitattributes2
-rw-r--r--app/_locales/en/messages.json6
-rw-r--r--app/images/meta-shield.svg3
-rw-r--r--app/scripts/controllers/onboarding.js43
-rw-r--r--app/scripts/metamask-controller.js11
-rw-r--r--package.json1
-rw-r--r--test/e2e/incremental-security.spec.js295
-rw-r--r--test/e2e/metamask-responsive-ui.spec.js2
-rw-r--r--test/e2e/metamask-ui.spec.js2
-rwxr-xr-xtest/e2e/run-all.sh12
-rw-r--r--test/e2e/send-eth-with-private-key-test/ethereumjs-tx.js711
-rw-r--r--test/e2e/send-eth-with-private-key-test/index.html17
-rw-r--r--test/e2e/send-eth-with-private-key-test/send-eth-with-private-key.js28
-rw-r--r--test/e2e/send-eth-with-private-key-test/web3js.js2
-rw-r--r--ui/app/components/app/backup-notification/backup-notification.component.js50
-rw-r--r--ui/app/components/app/backup-notification/backup-notification.container.js16
-rw-r--r--ui/app/components/app/backup-notification/index.js1
-rw-r--r--ui/app/components/app/backup-notification/index.scss75
-rw-r--r--ui/app/components/app/index.scss2
-rw-r--r--ui/app/ducks/app/app.js11
-rw-r--r--ui/app/helpers/higher-order-components/authenticated/authenticated.container.js1
-rw-r--r--ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js8
-rw-r--r--ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js13
-rw-r--r--ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js2
-rw-r--r--ui/app/pages/first-time-flow/first-time-flow.component.js16
-rw-r--r--ui/app/pages/first-time-flow/first-time-flow.container.js6
-rw-r--r--ui/app/pages/first-time-flow/index.scss4
-rw-r--r--ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js13
-rw-r--r--ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js23
-rw-r--r--ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js2
-rw-r--r--ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js2
-rw-r--r--ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss16
-rw-r--r--ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js47
-rw-r--r--ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js15
-rw-r--r--ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js21
-rw-r--r--ui/app/pages/first-time-flow/seed-phrase/tests/confirm-seed-phrase-component.test.js6
-rw-r--r--ui/app/pages/home/home.component.js9
-rw-r--r--ui/app/pages/home/home.container.js4
-rw-r--r--ui/app/pages/settings/networks-tab/networks-tab.component.js1
-rw-r--r--ui/app/store/actions.js36
40 files changed, 1507 insertions, 28 deletions
diff --git a/.gitattributes b/.gitattributes
index ae439a637..590ac71c0 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4,3 +4,5 @@ CHANGELOG.md merge=union
# we're using the dependencies we expect to be using
package-lock.json linguist-generated=false
yarn.lock linguist-generated=false
+
+test/e2e/send-eth-with-private-key-test/ethereumjs-tx.js linguist-vendored linguist-generated
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index f15dff386..4f9dff0c8 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -208,6 +208,9 @@
"backToAll": {
"message": "Back to All"
},
+ "backupNow": {
+ "message": "Backup now"
+ },
"balance": {
"message": "Balance"
},
@@ -1310,6 +1313,9 @@
"deleteNetworkDescription": {
"message": "Are you sure you want to delete this network?"
},
+ "remindMeLater": {
+ "message": "Remind me later"
+ },
"restoreFromSeed": {
"message": "Restore account?"
},
diff --git a/app/images/meta-shield.svg b/app/images/meta-shield.svg
new file mode 100644
index 000000000..346934dbc
--- /dev/null
+++ b/app/images/meta-shield.svg
@@ -0,0 +1,3 @@
+<svg width="20" height="24" viewBox="0 0 20 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M0 9.71495V3.57158L10 0.872803L20 3.57158V9.71495C20 16.0442 15.7999 21.4041 10 23.2357C4.19995 21.4041 0 16.0442 0 9.71495ZM15.3879 10.7277L15.6232 10.898L15.0819 11.5366L15.9057 14.1001L15.1431 16.7158L12.4738 15.9779L11.956 16.4036L10.9014 17.1367H9.09833L8.04379 16.4036L7.52596 15.9779L4.85671 16.7158L4.09874 14.1001L4.91784 11.5366L4.37644 10.898L4.61188 10.7277L4.23524 10.3825L4.52242 10.1553L4.14578 9.8669L4.4 9.6777L3.99989 7.74783L4.59302 5.95527L8.41104 7.38838H11.5887L15.4067 5.95527L15.9999 7.74783L15.6045 9.6777L15.854 9.8669L15.4773 10.1553L15.7644 10.3825L15.3879 10.7277ZM7.38499 13.1652L8.47065 12.6641L8.92346 13.6225L7.38499 13.1652ZM10.7685 13.6225L11.2197 12.6641L12.307 13.1652L10.7685 13.6225ZM9.24343 14.9001H10.4439L10.6519 15.0662L10.7689 16.178L10.6607 16.0674H9.02677L8.92279 16.178L9.03541 15.0662L9.24343 14.9001Z" fill="white"/>
+</svg>
diff --git a/app/scripts/controllers/onboarding.js b/app/scripts/controllers/onboarding.js
new file mode 100644
index 000000000..18fec4993
--- /dev/null
+++ b/app/scripts/controllers/onboarding.js
@@ -0,0 +1,43 @@
+const ObservableStore = require('obs-store')
+const extend = require('xtend')
+
+/**
+ * @typedef {Object} InitState
+ * @property {Boolean} seedPhraseBackedUp Indicates whether the user has completed the seed phrase backup challenge
+ */
+
+/**
+ * @typedef {Object} OnboardingOptions
+ * @property {InitState} initState The initial controller state
+ */
+
+/**
+ * Controller responsible for maintaining
+ * a cache of account balances in local storage
+ */
+class OnboardingController {
+ /**
+ * Creates a new controller instance
+ *
+ * @param {OnboardingOptions} [opts] Controller configuration parameters
+ */
+ constructor (opts = {}) {
+ const initState = extend({
+ seedPhraseBackedUp: null,
+ }, opts.initState)
+ this.store = new ObservableStore(initState)
+ }
+
+ setSeedPhraseBackedUp (newSeedPhraseBackUpState) {
+ this.store.updateState({
+ seedPhraseBackedUp: newSeedPhraseBackUpState,
+ })
+ }
+
+ getSeedPhraseBackedUp () {
+ return this.store.getState().seedPhraseBackedUp
+ }
+
+}
+
+module.exports = OnboardingController
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 158fb3079..d999bb790 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -28,6 +28,7 @@ const PreferencesController = require('./controllers/preferences')
const AppStateController = require('./controllers/app-state')
const InfuraController = require('./controllers/infura')
const CachedBalancesController = require('./controllers/cached-balances')
+const OnboardingController = require('./controllers/onboarding')
const RecentBlocksController = require('./controllers/recent-blocks')
const MessageManager = require('./lib/message-manager')
const PersonalMessageManager = require('./lib/personal-message-manager')
@@ -158,6 +159,10 @@ module.exports = class MetamaskController extends EventEmitter {
initState: initState.CachedBalancesController,
})
+ this.onboardingController = new OnboardingController({
+ initState: initState.OnboardingController,
+ })
+
// ensure accountTracker updates balances after network change
this.networkController.on('networkDidChange', () => {
this.accountTracker._updateAccounts()
@@ -262,6 +267,7 @@ module.exports = class MetamaskController extends EventEmitter {
NetworkController: this.networkController.store,
InfuraController: this.infuraController.store,
CachedBalancesController: this.cachedBalancesController.store,
+ OnboardingController: this.onboardingController.store,
})
this.memStore = new ComposableObservableStore(null, {
@@ -283,6 +289,7 @@ module.exports = class MetamaskController extends EventEmitter {
ShapeshiftController: this.shapeshiftController,
InfuraController: this.infuraController.store,
ProviderApprovalController: this.providerApprovalController.store,
+ OnboardingController: this.onboardingController.store,
})
this.memStore.subscribe(this.sendUpdate.bind(this))
}
@@ -398,6 +405,7 @@ module.exports = class MetamaskController extends EventEmitter {
const txController = this.txController
const networkController = this.networkController
const providerApprovalController = this.providerApprovalController
+ const onboardingController = this.onboardingController
return {
// etc
@@ -501,6 +509,9 @@ module.exports = class MetamaskController extends EventEmitter {
rejectProviderRequestByOrigin: providerApprovalController.rejectProviderRequestByOrigin.bind(providerApprovalController),
forceApproveProviderRequestByOrigin: providerApprovalController.forceApproveProviderRequestByOrigin.bind(providerApprovalController),
clearApprovedOrigins: providerApprovalController.clearApprovedOrigins.bind(providerApprovalController),
+
+ // onboarding controller
+ setSeedPhraseBackedUp: nodeify(onboardingController.setSeedPhraseBackedUp, onboardingController),
}
}
diff --git a/package.json b/package.json
index 0043a83c5..e4106a9a0 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
"dapp": "static-server test/e2e/contract-test --port 8080",
"dapp-chain": "GANACHE_ARGS='-b 2' concurrently -k -n ganache,dapp -p '[{time}][{name}]' 'yarn ganache:start' 'sleep 5 && static-server test/e2e/contract-test --port 8080'",
"watch:test:unit": "nodemon --exec \"yarn test:unit\" ./test ./app ./ui",
+ "sendwithprivatedapp": "static-server test/e2e/send-eth-with-private-key-test --port 8080",
"test:unit": "cross-env METAMASK_ENV=test mocha --exit --require test/setup.js --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\"",
"test:single": "cross-env METAMASK_ENV=test mocha --require test/helper.js",
"test:integration": "yarn test:integration:build && yarn test:flat",
diff --git a/test/e2e/incremental-security.spec.js b/test/e2e/incremental-security.spec.js
new file mode 100644
index 000000000..d9a89ff11
--- /dev/null
+++ b/test/e2e/incremental-security.spec.js
@@ -0,0 +1,295 @@
+const path = require('path')
+const assert = require('assert')
+const webdriver = require('selenium-webdriver')
+const { By, until } = webdriver
+const {
+ delay,
+ buildChromeWebDriver,
+ buildFirefoxWebdriver,
+ installWebExt,
+ getExtensionIdChrome,
+ getExtensionIdFirefox,
+} = require('./func')
+const {
+ assertElementNotPresent,
+ checkBrowserForConsoleErrors,
+ closeAllWindowHandlesExcept,
+ findElement,
+ findElements,
+ loadExtension,
+ openNewPage,
+ verboseReportOnFailure,
+} = require('./helpers')
+const fetchMockResponses = require('./fetch-mocks.js')
+
+describe('MetaMask', function () {
+ let extensionId
+ let driver
+ let publicAddress
+
+ const tinyDelayMs = 200
+ const regularDelayMs = tinyDelayMs * 2
+ const largeDelayMs = regularDelayMs * 2
+
+ this.timeout(0)
+ this.bail(true)
+
+ before(async function () {
+ let extensionUrl
+ switch (process.env.SELENIUM_BROWSER) {
+ case 'chrome': {
+ const extPath = path.resolve('dist/chrome')
+ driver = buildChromeWebDriver(extPath)
+ extensionId = await getExtensionIdChrome(driver)
+ await delay(largeDelayMs)
+ extensionUrl = `chrome-extension://${extensionId}/home.html`
+ break
+ }
+ case 'firefox': {
+ const extPath = path.resolve('dist/firefox')
+ driver = buildFirefoxWebdriver()
+ await installWebExt(driver, extPath)
+ await delay(largeDelayMs)
+ extensionId = await getExtensionIdFirefox(driver)
+ extensionUrl = `moz-extension://${extensionId}/home.html`
+ break
+ }
+ }
+ // Depending on the state of the application built into the above directory (extPath) and the value of
+ // METAMASK_DEBUG we will see different post-install behaviour and possibly some extra windows. Here we
+ // are closing any extraneous windows to reset us to a single window before continuing.
+ const [tab1] = await driver.getAllWindowHandles()
+ await closeAllWindowHandlesExcept(driver, [tab1])
+ await driver.switchTo().window(tab1)
+ await driver.get(extensionUrl)
+ })
+
+ beforeEach(async function () {
+ await driver.executeScript(
+ 'window.origFetch = window.fetch.bind(window);' +
+ 'window.fetch = ' +
+ '(...args) => { ' +
+ 'if (args[0] === "https://ethgasstation.info/json/ethgasAPI.json") { return ' +
+ 'Promise.resolve({ json: () => Promise.resolve(JSON.parse(\'' + fetchMockResponses.ethGasBasic + '\')) }); } else if ' +
+ '(args[0] === "https://ethgasstation.info/json/predictTable.json") { return ' +
+ 'Promise.resolve({ json: () => Promise.resolve(JSON.parse(\'' + fetchMockResponses.ethGasPredictTable + '\')) }); } else if ' +
+ '(args[0].match(/chromeextensionmm/)) { return ' +
+ 'Promise.resolve({ json: () => Promise.resolve(JSON.parse(\'' + fetchMockResponses.metametrics + '\')) }); } else if ' +
+ '(args[0] === "https://dev.blockscale.net/api/gasexpress.json") { return ' +
+ 'Promise.resolve({ json: () => Promise.resolve(JSON.parse(\'' + fetchMockResponses.gasExpress + '\')) }); } ' +
+ 'return window.origFetch(...args); };' +
+ 'function cancelInfuraRequest(requestDetails) {' +
+ 'console.log("Canceling: " + requestDetails.url);' +
+ 'return {' +
+ 'cancel: true' +
+ '};' +
+ ' }' +
+ 'window.chrome && window.chrome.webRequest && window.chrome.webRequest.onBeforeRequest.addListener(' +
+ 'cancelInfuraRequest,' +
+ '{urls: ["https://*.infura.io/*"]},' +
+ '["blocking"]' +
+ ');'
+ )
+ })
+
+ afterEach(async function () {
+ if (process.env.SELENIUM_BROWSER === 'chrome') {
+ const errors = await checkBrowserForConsoleErrors(driver)
+ if (errors.length) {
+ const errorReports = errors.map(err => err.message)
+ const errorMessage = `Errors found in browser console:\n${errorReports.join('\n')}`
+ console.error(new Error(errorMessage))
+ }
+ }
+ if (this.currentTest.state === 'failed') {
+ await verboseReportOnFailure(driver, this.currentTest)
+ }
+ })
+
+ after(async function () {
+ await driver.quit()
+ })
+
+ describe('Going through the first time flow, but skipping the seed phrase challenge', () => {
+ it('clicks the continue button on the welcome screen', async () => {
+ await findElement(driver, By.css('.welcome-page__header'))
+ const welcomeScreenBtn = await findElement(driver, By.css('.first-time-flow__button'))
+ welcomeScreenBtn.click()
+ await delay(largeDelayMs)
+ })
+
+ it('clicks the "Create New Wallet" option', async () => {
+ const customRpcButton = await findElement(driver, By.xpath(`//button[contains(text(), 'Create a Wallet')]`))
+ customRpcButton.click()
+ await delay(largeDelayMs)
+ })
+
+ it('clicks the "No thanks" option on the metametrics opt-in screen', async () => {
+ const optOutButton = await findElement(driver, By.css('.btn-default'))
+ optOutButton.click()
+ await delay(largeDelayMs)
+ })
+
+ it('accepts a secure password', async () => {
+ const passwordBox = await findElement(driver, By.css('.first-time-flow__form #create-password'))
+ const passwordBoxConfirm = await findElement(driver, By.css('.first-time-flow__form #confirm-password'))
+ const button = await findElement(driver, By.css('.first-time-flow__form button'))
+
+ await passwordBox.sendKeys('correct horse battery staple')
+ await passwordBoxConfirm.sendKeys('correct horse battery staple')
+
+ const tosCheckBox = await findElement(driver, By.css('.first-time-flow__checkbox'))
+ await tosCheckBox.click()
+
+ await button.click()
+ await delay(regularDelayMs)
+ })
+
+ it('skips the seed phrase challenge', async () => {
+ const buttons = await findElements(driver, By.css('.first-time-flow__button'))
+ await buttons[0].click()
+ await delay(regularDelayMs)
+
+ const detailsButton = await findElement(driver, By.css('.wallet-view__details-button'))
+ await detailsButton.click()
+ await delay(regularDelayMs)
+ })
+
+ it('gets the current accounts address', async () => {
+ const addressInput = await findElement(driver, By.css('.qr-ellip-address'))
+ publicAddress = await addressInput.getAttribute('value')
+
+ const accountModal = await driver.findElement(By.css('span .modal'))
+
+ await driver.executeScript("document.querySelector('.account-modal-close').click()")
+
+ await driver.wait(until.stalenessOf(accountModal))
+ await delay(regularDelayMs)
+ })
+
+ })
+
+ describe('send to current account from dapp with different provider', () => {
+ let extension
+
+ it('switches to dapp screen', async () => {
+ const windowHandles = await driver.getAllWindowHandles()
+ extension = windowHandles[0]
+
+ await openNewPage(driver, 'http://127.0.0.1:8080/')
+ await delay(regularDelayMs)
+ })
+
+ it('sends eth to the current account', async () => {
+ const addressInput = await findElement(driver, By.css('#address'))
+ await addressInput.sendKeys(publicAddress)
+ await delay(regularDelayMs)
+
+ const sendButton = await findElement(driver, By.css('#send'))
+ await sendButton.click()
+
+ const txStatus = await findElement(driver, By.css('#success'))
+ await driver.wait(until.elementTextMatches(txStatus, /Success/), 15000)
+ })
+
+ it('switches back to MetaMask', async () => {
+ await driver.switchTo().window(extension)
+ })
+
+ it('should have the correct amount of eth', async () => {
+ const balances = await findElements(driver, By.css('.currency-display-component__text'))
+ await driver.wait(until.elementTextMatches(balances[0], /1/), 15000)
+ const balance = await balances[0].getText()
+
+ assert.equal(balance, '1')
+ })
+ })
+
+ describe('backs up the seed phrase', () => {
+ it('should show a backup reminder', async () => {
+ const backupReminder = await findElements(driver, By.css('.backup-notification'))
+ assert.equal(backupReminder.length, 1)
+ })
+
+ it('should take the user to the seedphrase backup screen', async () => {
+ const backupButton = await findElement(driver, By.css('.backup-notification__submit-button'))
+ await backupButton.click()
+ await delay(regularDelayMs)
+ })
+
+ let seedPhrase
+
+ it('reveals the seed phrase', async () => {
+ const byRevealButton = By.css('.reveal-seed-phrase__secret-blocker .reveal-seed-phrase__reveal-button')
+ await driver.wait(until.elementLocated(byRevealButton, 10000))
+ const revealSeedPhraseButton = await findElement(driver, byRevealButton, 10000)
+ await revealSeedPhraseButton.click()
+ await delay(regularDelayMs)
+
+ seedPhrase = await driver.findElement(By.css('.reveal-seed-phrase__secret-words')).getText()
+ assert.equal(seedPhrase.split(' ').length, 12)
+ await delay(regularDelayMs)
+
+ const nextScreen = (await findElements(driver, By.css('button.first-time-flow__button')))[1]
+ await nextScreen.click()
+ await delay(regularDelayMs)
+ })
+
+ async function clickWordAndWait (word) {
+ const xpath = `//div[contains(@class, 'confirm-seed-phrase__seed-word--shuffled') and not(contains(@class, 'confirm-seed-phrase__seed-word--selected')) and contains(text(), '${word}')]`
+ const word0 = await findElement(driver, By.xpath(xpath), 10000)
+
+ await word0.click()
+ await delay(tinyDelayMs)
+ }
+
+ async function retypeSeedPhrase (words, wasReloaded, count = 0) {
+ try {
+ if (wasReloaded) {
+ const byRevealButton = By.css('.reveal-seed-phrase__secret-blocker .reveal-seed-phrase__reveal-button')
+ await driver.wait(until.elementLocated(byRevealButton, 10000))
+ const revealSeedPhraseButton = await findElement(driver, byRevealButton, 10000)
+ await revealSeedPhraseButton.click()
+ await delay(regularDelayMs)
+
+ const nextScreen = await findElement(driver, By.css('button.first-time-flow__button'))
+ await nextScreen.click()
+ await delay(regularDelayMs)
+ }
+
+ for (let i = 0; i < 12; i++) {
+ await clickWordAndWait(words[i])
+ }
+ } catch (e) {
+ if (count > 2) {
+ throw e
+ } else {
+ await loadExtension(driver, extensionId)
+ await retypeSeedPhrase(words, true, count + 1)
+ }
+ }
+ }
+
+ it('can retype the seed phrase', async () => {
+ const words = seedPhrase.split(' ')
+
+ await retypeSeedPhrase(words)
+
+ const confirm = await findElement(driver, By.xpath(`//button[contains(text(), 'Confirm')]`))
+ await confirm.click()
+ await delay(regularDelayMs)
+ })
+
+ it('should have the correct amount of eth', async () => {
+ const balances = await findElements(driver, By.css('.currency-display-component__text'))
+ await driver.wait(until.elementTextMatches(balances[0], /1/), 15000)
+ const balance = await balances[0].getText()
+
+ assert.equal(balance, '1')
+ })
+
+ it('should not show a backup reminder', async () => {
+ await assertElementNotPresent(webdriver, driver, By.css('.backup-notification'))
+ })
+ })
+})
diff --git a/test/e2e/metamask-responsive-ui.spec.js b/test/e2e/metamask-responsive-ui.spec.js
index 90661e387..b5d829ab4 100644
--- a/test/e2e/metamask-responsive-ui.spec.js
+++ b/test/e2e/metamask-responsive-ui.spec.js
@@ -156,7 +156,7 @@ describe('MetaMask', function () {
assert.equal(seedPhrase.split(' ').length, 12)
await delay(regularDelayMs)
- const nextScreen = await findElement(driver, By.css('button.first-time-flow__button'))
+ const nextScreen = (await findElements(driver, By.css('button.first-time-flow__button')))[1]
await nextScreen.click()
await delay(regularDelayMs)
})
diff --git a/test/e2e/metamask-ui.spec.js b/test/e2e/metamask-ui.spec.js
index 006d8af60..5c3e807fd 100644
--- a/test/e2e/metamask-ui.spec.js
+++ b/test/e2e/metamask-ui.spec.js
@@ -161,7 +161,7 @@ describe('MetaMask', function () {
assert.equal(seedPhrase.split(' ').length, 12)
await delay(regularDelayMs)
- const nextScreen = await findElement(driver, By.css('button.first-time-flow__button'))
+ const nextScreen = (await findElements(driver, By.css('button.first-time-flow__button')))[1]
await nextScreen.click()
await delay(regularDelayMs)
})
diff --git a/test/e2e/run-all.sh b/test/e2e/run-all.sh
index b527f0025..6f3f5e9be 100755
--- a/test/e2e/run-all.sh
+++ b/test/e2e/run-all.sh
@@ -6,7 +6,7 @@ set -u
set -o pipefail
export PATH="$PATH:./node_modules/.bin"
-export GANACHE_ARGS='--quiet --blockTime 2'
+export GANACHE_ARGS='--blockTime 2 --quiet'
concurrently --kill-others \
--names 'ganache,dapp,e2e' \
@@ -32,6 +32,7 @@ concurrently --kill-others \
'yarn ganache:start' \
'sleep 5 && mocha test/e2e/from-import-ui.spec'
+
export GANACHE_ARGS="$GANACHE_ARGS --deterministic --account=0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9,25000000000000000000"
concurrently --kill-others \
--names 'ganache,e2e' \
@@ -39,3 +40,12 @@ concurrently --kill-others \
--success first \
'npm run ganache:start' \
'sleep 5 && mocha test/e2e/send-edit.spec'
+
+export GANACHE_ARGS="$GANACHE_ARGS --deterministic --account=0x250F458997A364988956409A164BA4E16F0F99F916ACDD73ADCD3A1DE30CF8D1,0 --account=0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9,25000000000000000000"
+concurrently --kill-others \
+ --names 'ganache,sendwithprivatedapp,e2e' \
+ --prefix '[{time}][{name}]' \
+ --success first \
+ 'npm run ganache:start' \
+ 'npm run sendwithprivatedapp' \
+ 'sleep 5 && mocha test/e2e/incremental-security.spec'
diff --git a/test/e2e/send-eth-with-private-key-test/ethereumjs-tx.js b/test/e2e/send-eth-with-private-key-test/ethereumjs-tx.js
new file mode 100644
index 000000000..7afccb796
--- /dev/null
+++ b/test/e2e/send-eth-with-private-key-test/ethereumjs-tx.js
@@ -0,0 +1,711 @@
+/* eslint-disable */
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ethereumjs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+(function (global){
+"use strict";function compare(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function isBuffer(e){return global.Buffer&&"function"==typeof global.Buffer.isBuffer?global.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}function pToString(e){return Object.prototype.toString.call(e)}function isView(e){return!isBuffer(e)&&("function"==typeof global.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function getName(e){if(util.isFunction(e)){if(functionsHaveNames)return e.name;var t=e.toString().match(regex);return t&&t[1]}}function truncate(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function inspect(e){if(functionsHaveNames||!util.isFunction(e))return util.inspect(e);var t=getName(e);return"[Function"+(t?": "+t:"")+"]"}function getMessage(e){return truncate(inspect(e.actual),128)+" "+e.operator+" "+truncate(inspect(e.expected),128)}function fail(e,t,r,n,i){throw new assert.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function ok(e,t){e||fail(e,!0,t,"==",assert.ok)}function _deepEqual(e,t,r,n){if(e===t)return!0;if(isBuffer(e)&&isBuffer(t))return 0===compare(e,t);if(util.isDate(e)&&util.isDate(t))return e.getTime()===t.getTime();if(util.isRegExp(e)&&util.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(isView(e)&&isView(t)&&pToString(e)===pToString(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===compare(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(isBuffer(e)!==isBuffer(t))return!1;var i=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==i&&i===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),objEquiv(e,t,r,n))}return r?e===t:e==t}function isArguments(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function objEquiv(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1;if(util.isPrimitive(e)||util.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=isArguments(e),a=isArguments(t);if(i&&!a||!i&&a)return!1;if(i)return e=pSlice.call(e),t=pSlice.call(t),_deepEqual(e,t,r);var s,o,u=objectKeys(e),f=objectKeys(t);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),o=u.length-1;o>=0;o--)if(u[o]!==f[o])return!1;for(o=u.length-1;o>=0;o--)if(s=u[o],!_deepEqual(e[s],t[s],r,n))return!1;return!0}function notDeepStrictEqual(e,t,r){_deepEqual(e,t,!0)&&fail(e,t,r,"notDeepStrictEqual",notDeepStrictEqual)}function expectedException(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 _tryBlock(e){var t;try{e()}catch(e){t=e}return t}function _throws(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=_tryBlock(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&fail(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!e&&util.isError(i),o=!e&&i&&!r;if((s&&a&&expectedException(i,r)||o)&&fail(i,r,"Got unwanted exception"+n),e&&i&&r&&!expectedException(i,r)||!e&&i)throw i}var util=require("util/"),hasOwn=Object.prototype.hasOwnProperty,pSlice=Array.prototype.slice,functionsHaveNames="foo"===function(){}.name,assert=module.exports=ok,regex=/\s*function\s+([^\(\s]*)\s*/;assert.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=getMessage(this),this.generatedMessage=!0);var t=e.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=getName(t),a=n.indexOf("\n"+i);if(a>=0){var s=n.indexOf("\n",a+1);n=n.substring(s+1)}this.stack=n}}},util.inherits(assert.AssertionError,Error),assert.fail=fail,assert.ok=ok,assert.equal=function(e,t,r){e!=t&&fail(e,t,r,"==",assert.equal)},assert.notEqual=function(e,t,r){e==t&&fail(e,t,r,"!=",assert.notEqual)},assert.deepEqual=function(e,t,r){_deepEqual(e,t,!1)||fail(e,t,r,"deepEqual",assert.deepEqual)},assert.deepStrictEqual=function(e,t,r){_deepEqual(e,t,!0)||fail(e,t,r,"deepStrictEqual",assert.deepStrictEqual)},assert.notDeepEqual=function(e,t,r){_deepEqual(e,t,!1)&&fail(e,t,r,"notDeepEqual",assert.notDeepEqual)},assert.notDeepStrictEqual=notDeepStrictEqual,assert.strictEqual=function(e,t,r){e!==t&&fail(e,t,r,"===",assert.strictEqual)},assert.notStrictEqual=function(e,t,r){e===t&&fail(e,t,r,"!==",assert.notStrictEqual)},assert.throws=function(e,t,r){_throws(!0,e,t,r)},assert.doesNotThrow=function(e,t,r){_throws(!1,e,t,r)},assert.ifError=function(e){if(e)throw e};var objectKeys=Object.keys||function(e){var t=[];for(var r in e)hasOwn.call(e,r)&&t.push(r);return t};
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"util/":103}],2:[function(require,module,exports){
+"use strict";function placeHoldersCount(o){var r=o.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===o[r-2]?2:"="===o[r-1]?1:0}function byteLength(o){return 3*o.length/4-placeHoldersCount(o)}function toByteArray(o){var r,e,t,u,n,p=o.length;u=placeHoldersCount(o),n=new Arr(3*p/4-u),e=u>0?p-4:p;var a=0;for(r=0;r<e;r+=4)t=revLookup[o.charCodeAt(r)]<<18|revLookup[o.charCodeAt(r+1)]<<12|revLookup[o.charCodeAt(r+2)]<<6|revLookup[o.charCodeAt(r+3)],n[a++]=t>>16&255,n[a++]=t>>8&255,n[a++]=255&t;return 2===u?(t=revLookup[o.charCodeAt(r)]<<2|revLookup[o.charCodeAt(r+1)]>>4,n[a++]=255&t):1===u&&(t=revLookup[o.charCodeAt(r)]<<10|revLookup[o.charCodeAt(r+1)]<<4|revLookup[o.charCodeAt(r+2)]>>2,n[a++]=t>>8&255,n[a++]=255&t),n}function tripletToBase64(o){return lookup[o>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]}function encodeChunk(o,r,e){for(var t,u=[],n=r;n<e;n+=3)t=(o[n]<<16)+(o[n+1]<<8)+o[n+2],u.push(tripletToBase64(t));return u.join("")}function fromByteArray(o){for(var r,e=o.length,t=e%3,u="",n=[],p=0,a=e-t;p<a;p+=16383)n.push(encodeChunk(o,p,p+16383>a?a:p+16383));return 1===t?(r=o[e-1],u+=lookup[r>>2],u+=lookup[r<<4&63],u+="=="):2===t&&(r=(o[e-2]<<8)+o[e-1],u+=lookup[r>>10],u+=lookup[r>>4&63],u+=lookup[r<<2&63],u+="="),n.push(u),n.join("")}exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;
+
+},{}],3:[function(require,module,exports){
+function check(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var r=e[3];if(0===r)return!1;if(5+r>=e.length)return!1;if(2!==e[4+r])return!1;var n=e[5+r];return 0!==n&&(6+r+n===e.length&&(!(128&e[4])&&(!(r>1&&0===e[4]&&!(128&e[5]))&&(!(128&e[r+6])&&!(n>1&&0===e[r+6]&&!(128&e[r+7]))))))}function decode(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var r=e[3];if(0===r)throw new Error("R length is zero");if(5+r>=e.length)throw new Error("R length is too long");if(2!==e[4+r])throw new Error("Expected DER integer (2)");var n=e[5+r];if(0===n)throw new Error("S length is zero");if(6+r+n!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(r>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[r+6])throw new Error("S value is negative");if(n>1&&0===e[r+6]&&!(128&e[r+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+r),s:e.slice(6+r)}}function encode(e,r){var n=e.length,t=r.length;if(0===n)throw new Error("R length is zero");if(0===t)throw new Error("S length is zero");if(n>33)throw new Error("R length is too long");if(t>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&r[0])throw new Error("S value is negative");if(n>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(t>1&&0===r[0]&&!(128&r[1]))throw new Error("S value excessively padded");var o=Buffer.allocUnsafe(6+n+t);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+n]=2,o[5+n]=r.length,r.copy(o,6+n),o}var Buffer=require("safe-buffer").Buffer;module.exports={check:check,decode:decode,encode:encode};
+
+},{"safe-buffer":82}],4:[function(require,module,exports){
+!function(t,i){"use strict";function r(t,i){if(!t)throw new Error(i||"Assertion failed")}function h(t,i){t.super_=i;var r=function(){};r.prototype=i.prototype,t.prototype=new r,t.prototype.constructor=t}function n(t,i,r){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==i&&"be"!==i||(r=i,i=10),this._init(t||0,i||10,r||"be"))}function e(t,i,r){for(var h=0,n=Math.min(t.length,r),e=i;e<n;e++){var o=t.charCodeAt(e)-48;h<<=4,h|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return h}function o(t,i,r,h){for(var n=0,e=Math.min(t.length,r),o=i;o<e;o++){var s=t.charCodeAt(o)-48;n*=h,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}function s(t){for(var i=new Array(t.bitLength()),r=0;r<i.length;r++){var h=r/26|0,n=r%26;i[r]=(t.words[h]&1<<n)>>>n}return i}function u(t,i,r){r.negative=i.negative^t.negative;var h=t.length+i.length|0;r.length=h,h=h-1|0;var n=0|t.words[0],e=0|i.words[0],o=n*e,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var a=1;a<h;a++){for(var l=u>>>26,m=67108863&u,f=Math.min(a,i.length-1),d=Math.max(0,a-t.length+1);d<=f;d++){var p=a-d|0;l+=(o=(n=0|t.words[p])*(e=0|i.words[d])+m)/67108864|0,m=67108863&o}r.words[a]=0|m,u=0|l}return 0!==u?r.words[a]=0|u:r.length--,r.strip()}function a(t,i,r){r.negative=i.negative^t.negative,r.length=t.length+i.length;for(var h=0,n=0,e=0;e<r.length-1;e++){var o=n;n=0;for(var s=67108863&h,u=Math.min(e,i.length-1),a=Math.max(0,e-t.length+1);a<=u;a++){var l=e-a,m=(0|t.words[l])*(0|i.words[a]),f=67108863&m;s=67108863&(f=f+s|0),n+=(o=(o=o+(m/67108864|0)|0)+(f>>>26)|0)>>>26,o&=67108863}r.words[e]=s,h=o,o=n}return 0!==h?r.words[e]=h:r.length--,r.strip()}function l(t,i,r){return(new m).mulp(t,i,r)}function m(t,i){this.x=t,this.y=i}function f(t,i){this.name=t,this.p=new n(i,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function d(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function p(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(t){if("string"==typeof t){var i=n._prime(t);this.m=i.p,this.prime=i}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function c(t){g.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof t?t.exports=n:i.BN=n,n.BN=n,n.wordSize=26;var w;try{w=require("buffer").Buffer}catch(t){}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,i){return t.cmp(i)>0?t:i},n.min=function(t,i){return t.cmp(i)<0?t:i},n.prototype._init=function(t,i,h){if("number"==typeof t)return this._initNumber(t,i,h);if("object"==typeof t)return this._initArray(t,i,h);"hex"===i&&(i=16),r(i===(0|i)&&i>=2&&i<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===i?this._parseHex(t,n):this._parseBase(t,i,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===h&&this._initArray(this.toArray(),i,h)},n.prototype._initNumber=function(t,i,h){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===h&&this._initArray(this.toArray(),i,h)},n.prototype._initArray=function(t,i,h){if(r("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 n=0;n<this.length;n++)this.words[n]=0;var e,o,s=0;if("be"===h)for(n=t.length-1,e=0;n>=0;n-=3)o=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);else if("le"===h)for(n=0,e=0;n<t.length;n+=3)o=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);return this.strip()},n.prototype._parseHex=function(t,i){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var h,n,o=0;for(r=t.length-6,h=0;r>=i;r-=6)n=e(t,r,r+6),this.words[h]|=n<<o&67108863,this.words[h+1]|=n>>>26-o&4194303,(o+=24)>=26&&(o-=26,h++);r+6!==i&&(n=e(t,i,r+6),this.words[h]|=n<<o&67108863,this.words[h+1]|=n>>>26-o&4194303),this.strip()},n.prototype._parseBase=function(t,i,r){this.words=[0],this.length=1;for(var h=0,n=1;n<=67108863;n*=i)h++;h--,n=n/i|0;for(var e=t.length-r,s=e%h,u=Math.min(e,e-s)+r,a=0,l=r;l<u;l+=h)a=o(t,l,l+h,i),this.imuln(n),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a);if(0!==s){var m=1;for(a=o(t,l,t.length,i),l=0;l<s;l++)m*=i;this.imuln(m),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a)}},n.prototype.copy=function(t){t.words=new Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},n.prototype.clone=function(){var t=new n(null);return this.copy(t),t},n.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],b=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(t,i){t=t||10,i=0|i||1;var h;if(16===t||"hex"===t){h="";for(var n=0,e=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<n|e)).toString(16);h=0!==(e=s>>>24-n&16777215)||o!==this.length-1?y[6-u.length]+u+h:u+h,(n+=2)>=26&&(n-=26,o--)}for(0!==e&&(h=e.toString(16)+h);h.length%i!=0;)h="0"+h;return 0!==this.negative&&(h="-"+h),h}if(t===(0|t)&&t>=2&&t<=36){var a=b[t],l=_[t];h="";var m=this.clone();for(m.negative=0;!m.isZero();){var f=m.modn(l).toString(t);h=(m=m.idivn(l)).isZero()?f+h:y[a-f.length]+f+h}for(this.isZero()&&(h="0"+h);h.length%i!=0;)h="0"+h;return 0!==this.negative&&(h="-"+h),h}r(!1,"Base should be between 2 and 36")},n.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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,i){return r(void 0!==w),this.toArrayLike(w,t,i)},n.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},n.prototype.toArrayLike=function(t,i,h){var n=this.byteLength(),e=h||Math.max(1,n);r(n<=e,"byte array longer than desired length"),r(e>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===i,a=new t(e),l=this.clone();if(u){for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),a[s]=o;for(;s<e;s++)a[s]=0}else{for(s=0;s<e-n;s++)a[s]=0;for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),a[e-s-1]=o}return a},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var i=t,r=0;return i>=4096&&(r+=13,i>>>=13),i>=64&&(r+=7,i>>>=7),i>=8&&(r+=4,i>>>=4),i>=2&&(r+=2,i>>>=2),r+i},n.prototype._zeroBits=function(t){if(0===t)return 26;var i=t,r=0;return 0==(8191&i)&&(r+=13,i>>>=13),0==(127&i)&&(r+=7,i>>>=7),0==(15&i)&&(r+=4,i>>>=4),0==(3&i)&&(r+=2,i>>>=2),0==(1&i)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return 26*(this.length-1)+i},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,i=0;i<this.length;i++){var r=this._zeroBits(this.words[i]);if(t+=r,26!==r)break}return t},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},n.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this.strip()},n.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},n.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var i;i=this.length>t.length?t:this;for(var r=0;r<i.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=i.length,this.strip()},n.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},n.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var i,r;this.length>t.length?(i=this,r=t):(i=t,r=this);for(var h=0;h<r.length;h++)this.words[h]=i.words[h]^r.words[h];if(this!==i)for(;h<i.length;h++)this.words[h]=i.words[h];return this.length=i.length,this.strip()},n.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},n.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var i=0|Math.ceil(t/26),h=t%26;this._expand(i),h>0&&i--;for(var n=0;n<i;n++)this.words[n]=67108863&~this.words[n];return h>0&&(this.words[n]=~this.words[n]&67108863>>26-h),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,i){r("number"==typeof t&&t>=0);var h=t/26|0,n=t%26;return this._expand(h+1),this.words[h]=i?this.words[h]|1<<n:this.words[h]&~(1<<n),this.strip()},n.prototype.iadd=function(t){var i;if(0!==this.negative&&0===t.negative)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();var r,h;this.length>t.length?(r=this,h=t):(r=t,h=this);for(var n=0,e=0;e<h.length;e++)i=(0|r.words[e])+(0|h.words[e])+n,this.words[e]=67108863&i,n=i>>>26;for(;0!==n&&e<r.length;e++)i=(0|r.words[e])+n,this.words[e]=67108863&i,n=i>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;e<r.length;e++)this.words[e]=r.words[e];return this},n.prototype.add=function(t){var i;return 0!==t.negative&&0===this.negative?(t.negative=0,i=this.sub(t),t.negative^=1,i):0===t.negative&&0!==this.negative?(this.negative=0,i=t.sub(this),this.negative=1,i):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var h,n;r>0?(h=this,n=t):(h=t,n=this);for(var e=0,o=0;o<n.length;o++)e=(i=(0|h.words[o])-(0|n.words[o])+e)>>26,this.words[o]=67108863&i;for(;0!==e&&o<h.length;o++)e=(i=(0|h.words[o])+e)>>26,this.words[o]=67108863&i;if(0===e&&o<h.length&&h!==this)for(;o<h.length;o++)this.words[o]=h.words[o];return this.length=Math.max(this.length,o),h!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(t){return this.clone().isub(t)};var k=function(t,i,r){var h,n,e,o=t.words,s=i.words,u=r.words,a=0,l=0|o[0],m=8191&l,f=l>>>13,d=0|o[1],p=8191&d,M=d>>>13,v=0|o[2],g=8191&v,c=v>>>13,w=0|o[3],y=8191&w,b=w>>>13,_=0|o[4],k=8191&_,A=_>>>13,x=0|o[5],S=8191&x,Z=x>>>13,q=0|o[6],R=8191&q,B=q>>>13,N=0|o[7],L=8191&N,I=N>>>13,z=0|o[8],T=8191&z,E=z>>>13,O=0|o[9],j=8191&O,K=O>>>13,P=0|s[0],F=8191&P,C=P>>>13,D=0|s[1],H=8191&D,J=D>>>13,U=0|s[2],G=8191&U,Q=U>>>13,V=0|s[3],W=8191&V,X=V>>>13,Y=0|s[4],$=8191&Y,tt=Y>>>13,it=0|s[5],rt=8191&it,ht=it>>>13,nt=0|s[6],et=8191&nt,ot=nt>>>13,st=0|s[7],ut=8191&st,at=st>>>13,lt=0|s[8],mt=8191&lt,ft=lt>>>13,dt=0|s[9],pt=8191&dt,Mt=dt>>>13;r.negative=t.negative^i.negative,r.length=19;var vt=(a+(h=Math.imul(m,F))|0)+((8191&(n=(n=Math.imul(m,C))+Math.imul(f,F)|0))<<13)|0;a=((e=Math.imul(f,C))+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,h=Math.imul(p,F),n=(n=Math.imul(p,C))+Math.imul(M,F)|0,e=Math.imul(M,C);var gt=(a+(h=h+Math.imul(m,H)|0)|0)+((8191&(n=(n=n+Math.imul(m,J)|0)+Math.imul(f,H)|0))<<13)|0;a=((e=e+Math.imul(f,J)|0)+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,h=Math.imul(g,F),n=(n=Math.imul(g,C))+Math.imul(c,F)|0,e=Math.imul(c,C),h=h+Math.imul(p,H)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(M,H)|0,e=e+Math.imul(M,J)|0;var ct=(a+(h=h+Math.imul(m,G)|0)|0)+((8191&(n=(n=n+Math.imul(m,Q)|0)+Math.imul(f,G)|0))<<13)|0;a=((e=e+Math.imul(f,Q)|0)+(n>>>13)|0)+(ct>>>26)|0,ct&=67108863,h=Math.imul(y,F),n=(n=Math.imul(y,C))+Math.imul(b,F)|0,e=Math.imul(b,C),h=h+Math.imul(g,H)|0,n=(n=n+Math.imul(g,J)|0)+Math.imul(c,H)|0,e=e+Math.imul(c,J)|0,h=h+Math.imul(p,G)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(M,G)|0,e=e+Math.imul(M,Q)|0;var wt=(a+(h=h+Math.imul(m,W)|0)|0)+((8191&(n=(n=n+Math.imul(m,X)|0)+Math.imul(f,W)|0))<<13)|0;a=((e=e+Math.imul(f,X)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,h=Math.imul(k,F),n=(n=Math.imul(k,C))+Math.imul(A,F)|0,e=Math.imul(A,C),h=h+Math.imul(y,H)|0,n=(n=n+Math.imul(y,J)|0)+Math.imul(b,H)|0,e=e+Math.imul(b,J)|0,h=h+Math.imul(g,G)|0,n=(n=n+Math.imul(g,Q)|0)+Math.imul(c,G)|0,e=e+Math.imul(c,Q)|0,h=h+Math.imul(p,W)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(M,W)|0,e=e+Math.imul(M,X)|0;var yt=(a+(h=h+Math.imul(m,$)|0)|0)+((8191&(n=(n=n+Math.imul(m,tt)|0)+Math.imul(f,$)|0))<<13)|0;a=((e=e+Math.imul(f,tt)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,h=Math.imul(S,F),n=(n=Math.imul(S,C))+Math.imul(Z,F)|0,e=Math.imul(Z,C),h=h+Math.imul(k,H)|0,n=(n=n+Math.imul(k,J)|0)+Math.imul(A,H)|0,e=e+Math.imul(A,J)|0,h=h+Math.imul(y,G)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,G)|0,e=e+Math.imul(b,Q)|0,h=h+Math.imul(g,W)|0,n=(n=n+Math.imul(g,X)|0)+Math.imul(c,W)|0,e=e+Math.imul(c,X)|0,h=h+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(M,$)|0,e=e+Math.imul(M,tt)|0;var bt=(a+(h=h+Math.imul(m,rt)|0)|0)+((8191&(n=(n=n+Math.imul(m,ht)|0)+Math.imul(f,rt)|0))<<13)|0;a=((e=e+Math.imul(f,ht)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,h=Math.imul(R,F),n=(n=Math.imul(R,C))+Math.imul(B,F)|0,e=Math.imul(B,C),h=h+Math.imul(S,H)|0,n=(n=n+Math.imul(S,J)|0)+Math.imul(Z,H)|0,e=e+Math.imul(Z,J)|0,h=h+Math.imul(k,G)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(A,G)|0,e=e+Math.imul(A,Q)|0,h=h+Math.imul(y,W)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(b,W)|0,e=e+Math.imul(b,X)|0,h=h+Math.imul(g,$)|0,n=(n=n+Math.imul(g,tt)|0)+Math.imul(c,$)|0,e=e+Math.imul(c,tt)|0,h=h+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(M,rt)|0,e=e+Math.imul(M,ht)|0;var _t=(a+(h=h+Math.imul(m,et)|0)|0)+((8191&(n=(n=n+Math.imul(m,ot)|0)+Math.imul(f,et)|0))<<13)|0;a=((e=e+Math.imul(f,ot)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,h=Math.imul(L,F),n=(n=Math.imul(L,C))+Math.imul(I,F)|0,e=Math.imul(I,C),h=h+Math.imul(R,H)|0,n=(n=n+Math.imul(R,J)|0)+Math.imul(B,H)|0,e=e+Math.imul(B,J)|0,h=h+Math.imul(S,G)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(Z,G)|0,e=e+Math.imul(Z,Q)|0,h=h+Math.imul(k,W)|0,n=(n=n+Math.imul(k,X)|0)+Math.imul(A,W)|0,e=e+Math.imul(A,X)|0,h=h+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,e=e+Math.imul(b,tt)|0,h=h+Math.imul(g,rt)|0,n=(n=n+Math.imul(g,ht)|0)+Math.imul(c,rt)|0,e=e+Math.imul(c,ht)|0,h=h+Math.imul(p,et)|0,n=(n=n+Math.imul(p,ot)|0)+Math.imul(M,et)|0,e=e+Math.imul(M,ot)|0;var kt=(a+(h=h+Math.imul(m,ut)|0)|0)+((8191&(n=(n=n+Math.imul(m,at)|0)+Math.imul(f,ut)|0))<<13)|0;a=((e=e+Math.imul(f,at)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,h=Math.imul(T,F),n=(n=Math.imul(T,C))+Math.imul(E,F)|0,e=Math.imul(E,C),h=h+Math.imul(L,H)|0,n=(n=n+Math.imul(L,J)|0)+Math.imul(I,H)|0,e=e+Math.imul(I,J)|0,h=h+Math.imul(R,G)|0,n=(n=n+Math.imul(R,Q)|0)+Math.imul(B,G)|0,e=e+Math.imul(B,Q)|0,h=h+Math.imul(S,W)|0,n=(n=n+Math.imul(S,X)|0)+Math.imul(Z,W)|0,e=e+Math.imul(Z,X)|0,h=h+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(A,$)|0,e=e+Math.imul(A,tt)|0,h=h+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,ht)|0)+Math.imul(b,rt)|0,e=e+Math.imul(b,ht)|0,h=h+Math.imul(g,et)|0,n=(n=n+Math.imul(g,ot)|0)+Math.imul(c,et)|0,e=e+Math.imul(c,ot)|0,h=h+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(M,ut)|0,e=e+Math.imul(M,at)|0;var At=(a+(h=h+Math.imul(m,mt)|0)|0)+((8191&(n=(n=n+Math.imul(m,ft)|0)+Math.imul(f,mt)|0))<<13)|0;a=((e=e+Math.imul(f,ft)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,h=Math.imul(j,F),n=(n=Math.imul(j,C))+Math.imul(K,F)|0,e=Math.imul(K,C),h=h+Math.imul(T,H)|0,n=(n=n+Math.imul(T,J)|0)+Math.imul(E,H)|0,e=e+Math.imul(E,J)|0,h=h+Math.imul(L,G)|0,n=(n=n+Math.imul(L,Q)|0)+Math.imul(I,G)|0,e=e+Math.imul(I,Q)|0,h=h+Math.imul(R,W)|0,n=(n=n+Math.imul(R,X)|0)+Math.imul(B,W)|0,e=e+Math.imul(B,X)|0,h=h+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(Z,$)|0,e=e+Math.imul(Z,tt)|0,h=h+Math.imul(k,rt)|0,n=(n=n+Math.imul(k,ht)|0)+Math.imul(A,rt)|0,e=e+Math.imul(A,ht)|0,h=h+Math.imul(y,et)|0,n=(n=n+Math.imul(y,ot)|0)+Math.imul(b,et)|0,e=e+Math.imul(b,ot)|0,h=h+Math.imul(g,ut)|0,n=(n=n+Math.imul(g,at)|0)+Math.imul(c,ut)|0,e=e+Math.imul(c,at)|0,h=h+Math.imul(p,mt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(M,mt)|0,e=e+Math.imul(M,ft)|0;var xt=(a+(h=h+Math.imul(m,pt)|0)|0)+((8191&(n=(n=n+Math.imul(m,Mt)|0)+Math.imul(f,pt)|0))<<13)|0;a=((e=e+Math.imul(f,Mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h=Math.imul(j,H),n=(n=Math.imul(j,J))+Math.imul(K,H)|0,e=Math.imul(K,J),h=h+Math.imul(T,G)|0,n=(n=n+Math.imul(T,Q)|0)+Math.imul(E,G)|0,e=e+Math.imul(E,Q)|0,h=h+Math.imul(L,W)|0,n=(n=n+Math.imul(L,X)|0)+Math.imul(I,W)|0,e=e+Math.imul(I,X)|0,h=h+Math.imul(R,$)|0,n=(n=n+Math.imul(R,tt)|0)+Math.imul(B,$)|0,e=e+Math.imul(B,tt)|0,h=h+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,ht)|0)+Math.imul(Z,rt)|0,e=e+Math.imul(Z,ht)|0,h=h+Math.imul(k,et)|0,n=(n=n+Math.imul(k,ot)|0)+Math.imul(A,et)|0,e=e+Math.imul(A,ot)|0,h=h+Math.imul(y,ut)|0,n=(n=n+Math.imul(y,at)|0)+Math.imul(b,ut)|0,e=e+Math.imul(b,at)|0,h=h+Math.imul(g,mt)|0,n=(n=n+Math.imul(g,ft)|0)+Math.imul(c,mt)|0,e=e+Math.imul(c,ft)|0;var St=(a+(h=h+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,Mt)|0)+Math.imul(M,pt)|0))<<13)|0;a=((e=e+Math.imul(M,Mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,h=Math.imul(j,G),n=(n=Math.imul(j,Q))+Math.imul(K,G)|0,e=Math.imul(K,Q),h=h+Math.imul(T,W)|0,n=(n=n+Math.imul(T,X)|0)+Math.imul(E,W)|0,e=e+Math.imul(E,X)|0,h=h+Math.imul(L,$)|0,n=(n=n+Math.imul(L,tt)|0)+Math.imul(I,$)|0,e=e+Math.imul(I,tt)|0,h=h+Math.imul(R,rt)|0,n=(n=n+Math.imul(R,ht)|0)+Math.imul(B,rt)|0,e=e+Math.imul(B,ht)|0,h=h+Math.imul(S,et)|0,n=(n=n+Math.imul(S,ot)|0)+Math.imul(Z,et)|0,e=e+Math.imul(Z,ot)|0,h=h+Math.imul(k,ut)|0,n=(n=n+Math.imul(k,at)|0)+Math.imul(A,ut)|0,e=e+Math.imul(A,at)|0,h=h+Math.imul(y,mt)|0,n=(n=n+Math.imul(y,ft)|0)+Math.imul(b,mt)|0,e=e+Math.imul(b,ft)|0;var Zt=(a+(h=h+Math.imul(g,pt)|0)|0)+((8191&(n=(n=n+Math.imul(g,Mt)|0)+Math.imul(c,pt)|0))<<13)|0;a=((e=e+Math.imul(c,Mt)|0)+(n>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,h=Math.imul(j,W),n=(n=Math.imul(j,X))+Math.imul(K,W)|0,e=Math.imul(K,X),h=h+Math.imul(T,$)|0,n=(n=n+Math.imul(T,tt)|0)+Math.imul(E,$)|0,e=e+Math.imul(E,tt)|0,h=h+Math.imul(L,rt)|0,n=(n=n+Math.imul(L,ht)|0)+Math.imul(I,rt)|0,e=e+Math.imul(I,ht)|0,h=h+Math.imul(R,et)|0,n=(n=n+Math.imul(R,ot)|0)+Math.imul(B,et)|0,e=e+Math.imul(B,ot)|0,h=h+Math.imul(S,ut)|0,n=(n=n+Math.imul(S,at)|0)+Math.imul(Z,ut)|0,e=e+Math.imul(Z,at)|0,h=h+Math.imul(k,mt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(A,mt)|0,e=e+Math.imul(A,ft)|0;var qt=(a+(h=h+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,Mt)|0)+Math.imul(b,pt)|0))<<13)|0;a=((e=e+Math.imul(b,Mt)|0)+(n>>>13)|0)+(qt>>>26)|0,qt&=67108863,h=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(K,$)|0,e=Math.imul(K,tt),h=h+Math.imul(T,rt)|0,n=(n=n+Math.imul(T,ht)|0)+Math.imul(E,rt)|0,e=e+Math.imul(E,ht)|0,h=h+Math.imul(L,et)|0,n=(n=n+Math.imul(L,ot)|0)+Math.imul(I,et)|0,e=e+Math.imul(I,ot)|0,h=h+Math.imul(R,ut)|0,n=(n=n+Math.imul(R,at)|0)+Math.imul(B,ut)|0,e=e+Math.imul(B,at)|0,h=h+Math.imul(S,mt)|0,n=(n=n+Math.imul(S,ft)|0)+Math.imul(Z,mt)|0,e=e+Math.imul(Z,ft)|0;var Rt=(a+(h=h+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,Mt)|0)+Math.imul(A,pt)|0))<<13)|0;a=((e=e+Math.imul(A,Mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,h=Math.imul(j,rt),n=(n=Math.imul(j,ht))+Math.imul(K,rt)|0,e=Math.imul(K,ht),h=h+Math.imul(T,et)|0,n=(n=n+Math.imul(T,ot)|0)+Math.imul(E,et)|0,e=e+Math.imul(E,ot)|0,h=h+Math.imul(L,ut)|0,n=(n=n+Math.imul(L,at)|0)+Math.imul(I,ut)|0,e=e+Math.imul(I,at)|0,h=h+Math.imul(R,mt)|0,n=(n=n+Math.imul(R,ft)|0)+Math.imul(B,mt)|0,e=e+Math.imul(B,ft)|0;var Bt=(a+(h=h+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,Mt)|0)+Math.imul(Z,pt)|0))<<13)|0;a=((e=e+Math.imul(Z,Mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,h=Math.imul(j,et),n=(n=Math.imul(j,ot))+Math.imul(K,et)|0,e=Math.imul(K,ot),h=h+Math.imul(T,ut)|0,n=(n=n+Math.imul(T,at)|0)+Math.imul(E,ut)|0,e=e+Math.imul(E,at)|0,h=h+Math.imul(L,mt)|0,n=(n=n+Math.imul(L,ft)|0)+Math.imul(I,mt)|0,e=e+Math.imul(I,ft)|0;var Nt=(a+(h=h+Math.imul(R,pt)|0)|0)+((8191&(n=(n=n+Math.imul(R,Mt)|0)+Math.imul(B,pt)|0))<<13)|0;a=((e=e+Math.imul(B,Mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h=Math.imul(j,ut),n=(n=Math.imul(j,at))+Math.imul(K,ut)|0,e=Math.imul(K,at),h=h+Math.imul(T,mt)|0,n=(n=n+Math.imul(T,ft)|0)+Math.imul(E,mt)|0,e=e+Math.imul(E,ft)|0;var Lt=(a+(h=h+Math.imul(L,pt)|0)|0)+((8191&(n=(n=n+Math.imul(L,Mt)|0)+Math.imul(I,pt)|0))<<13)|0;a=((e=e+Math.imul(I,Mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,h=Math.imul(j,mt),n=(n=Math.imul(j,ft))+Math.imul(K,mt)|0,e=Math.imul(K,ft);var It=(a+(h=h+Math.imul(T,pt)|0)|0)+((8191&(n=(n=n+Math.imul(T,Mt)|0)+Math.imul(E,pt)|0))<<13)|0;a=((e=e+Math.imul(E,Mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863;var zt=(a+(h=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,Mt))+Math.imul(K,pt)|0))<<13)|0;return a=((e=Math.imul(K,Mt))+(n>>>13)|0)+(zt>>>26)|0,zt&=67108863,u[0]=vt,u[1]=gt,u[2]=ct,u[3]=wt,u[4]=yt,u[5]=bt,u[6]=_t,u[7]=kt,u[8]=At,u[9]=xt,u[10]=St,u[11]=Zt,u[12]=qt,u[13]=Rt,u[14]=Bt,u[15]=Nt,u[16]=Lt,u[17]=It,u[18]=zt,0!==a&&(u[19]=a,r.length++),r};Math.imul||(k=u),n.prototype.mulTo=function(t,i){var r=this.length+t.length;return 10===this.length&&10===t.length?k(this,t,i):r<63?u(this,t,i):r<1024?a(this,t,i):l(this,t,i)},m.prototype.makeRBT=function(t){for(var i=new Array(t),r=n.prototype._countBits(t)-1,h=0;h<t;h++)i[h]=this.revBin(h,r,t);return i},m.prototype.revBin=function(t,i,r){if(0===t||t===r-1)return t;for(var h=0,n=0;n<i;n++)h|=(1&t)<<i-n-1,t>>=1;return h},m.prototype.permute=function(t,i,r,h,n,e){for(var o=0;o<e;o++)h[o]=i[t[o]],n[o]=r[t[o]]},m.prototype.transform=function(t,i,r,h,n,e){this.permute(e,t,i,r,h,n);for(var o=1;o<n;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),a=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var m=u,f=a,d=0;d<o;d++){var p=r[l+d],M=h[l+d],v=r[l+d+o],g=h[l+d+o],c=m*v-f*g;g=m*g+f*v,v=c,r[l+d]=p+v,h[l+d]=M+g,r[l+d+o]=p-v,h[l+d+o]=M-g,d!==s&&(c=u*m-a*f,f=u*f+a*m,m=c)}},m.prototype.guessLen13b=function(t,i){var r=1|Math.max(i,t),h=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+h},m.prototype.conjugate=function(t,i,r){if(!(r<=1))for(var h=0;h<r/2;h++){var n=t[h];t[h]=t[r-h-1],t[r-h-1]=n,n=i[h],i[h]=-i[r-h-1],i[r-h-1]=-n}},m.prototype.normalize13b=function(t,i){for(var r=0,h=0;h<i/2;h++){var n=8192*Math.round(t[2*h+1]/i)+Math.round(t[2*h]/i)+r;t[h]=67108863&n,r=n<67108864?0:n/67108864|0}return t},m.prototype.convert13b=function(t,i,h,n){for(var e=0,o=0;o<i;o++)e+=0|t[o],h[2*o]=8191&e,e>>>=13,h[2*o+1]=8191&e,e>>>=13;for(o=2*i;o<n;++o)h[o]=0;r(0===e),r(0==(-8192&e))},m.prototype.stub=function(t){for(var i=new Array(t),r=0;r<t;r++)i[r]=0;return i},m.prototype.mulp=function(t,i,r){var h=2*this.guessLen13b(t.length,i.length),n=this.makeRBT(h),e=this.stub(h),o=new Array(h),s=new Array(h),u=new Array(h),a=new Array(h),l=new Array(h),m=new Array(h),f=r.words;f.length=h,this.convert13b(t.words,t.length,o,h),this.convert13b(i.words,i.length,a,h),this.transform(o,e,s,u,h,n),this.transform(a,e,l,m,h,n);for(var d=0;d<h;d++){var p=s[d]*l[d]-u[d]*m[d];u[d]=s[d]*m[d]+u[d]*l[d],s[d]=p}return this.conjugate(s,u,h),this.transform(s,u,f,e,h,n),this.conjugate(f,e,h),this.normalize13b(f,h),r.negative=t.negative^i.negative,r.length=t.length+i.length,r.strip()},n.prototype.mul=function(t){var i=new n(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},n.prototype.mulf=function(t){var i=new n(null);return i.words=new Array(this.length+t.length),l(this,t,i)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var i=0,h=0;h<this.length;h++){var n=(0|this.words[h])*t,e=(67108863&n)+(67108863&i);i>>=26,i+=n/67108864|0,i+=e>>>26,this.words[h]=67108863&e}return 0!==i&&(this.words[h]=i,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var i=s(t);if(0===i.length)return new n(1);for(var r=this,h=0;h<i.length&&0===i[h];h++,r=r.sqr());if(++h<i.length)for(var e=r.sqr();h<i.length;h++,e=e.sqr())0!==i[h]&&(r=r.mul(e));return r},n.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var i,h=t%26,n=(t-h)/26,e=67108863>>>26-h<<26-h;if(0!==h){var o=0;for(i=0;i<this.length;i++){var s=this.words[i]&e,u=(0|this.words[i])-s<<h;this.words[i]=u|o,o=s>>>26-h}o&&(this.words[i]=o,this.length++)}if(0!==n){for(i=this.length-1;i>=0;i--)this.words[i+n]=this.words[i];for(i=0;i<n;i++)this.words[i]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},n.prototype.iushrn=function(t,i,h){r("number"==typeof t&&t>=0);var n;n=i?(i-i%26)/26:0;var e=t%26,o=Math.min((t-e)/26,this.length),s=67108863^67108863>>>e<<e,u=h;if(n-=o,n=Math.max(0,n),u){for(var a=0;a<o;a++)u.words[a]=this.words[a];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,a=0;a<this.length;a++)this.words[a]=this.words[a+o];else this.words[0]=0,this.length=1;var l=0;for(a=this.length-1;a>=0&&(0!==l||a>=n);a--){var m=0|this.words[a];this.words[a]=l<<26-e|m>>>e,l=m&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,i,h){return r(0===this.negative),this.iushrn(t,i,h)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var i=t%26,h=(t-i)/26,n=1<<i;return!(this.length<=h)&&!!(this.words[h]&n)},n.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var i=t%26,h=(t-i)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=h)return this;if(0!==i&&h++,this.length=Math.min(h,this.length),0!==i){var n=67108863^67108863>>>i<<i;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(t){return this.clone().imaskn(t)},n.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},n.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(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 i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},n.prototype.addn=function(t){return this.clone().iaddn(t)},n.prototype.subn=function(t){return this.clone().isubn(t)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(t,i,h){var n,e=t.length+h;this._expand(e);var o,s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+h])+s;var u=(0|t.words[n])*i;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+h]=67108863&o}for(;n<this.length-h;n++)s=(o=(0|this.words[n+h])+s)>>26,this.words[n+h]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,i){var r=this.length-t.length,h=this.clone(),e=t,o=0|e.words[e.length-1];0!==(r=26-this._countBits(o))&&(e=e.ushln(r),h.iushln(r),o=0|e.words[e.length-1]);var s,u=h.length-e.length;if("mod"!==i){(s=new n(null)).length=u+1,s.words=new Array(s.length);for(var a=0;a<s.length;a++)s.words[a]=0}var l=h.clone()._ishlnsubmul(e,1,u);0===l.negative&&(h=l,s&&(s.words[u]=1));for(var m=u-1;m>=0;m--){var f=67108864*(0|h.words[e.length+m])+(0|h.words[e.length+m-1]);for(f=Math.min(f/o|0,67108863),h._ishlnsubmul(e,f,m);0!==h.negative;)f--,h.negative=0,h._ishlnsubmul(e,1,m),h.isZero()||(h.negative^=1);s&&(s.words[m]=f)}return s&&s.strip(),h.strip(),"div"!==i&&0!==r&&h.iushrn(r),{div:s||null,mod:h}},n.prototype.divmod=function(t,i,h){if(r(!t.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var e,o,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,i),"mod"!==i&&(e=s.div.neg()),"div"!==i&&(o=s.mod.neg(),h&&0!==o.negative&&o.iadd(t)),{div:e,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),i),"mod"!==i&&(e=s.div.neg()),{div:e,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),i),"div"!==i&&(o=s.mod.neg(),h&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===i?{div:this.divn(t.words[0]),mod:null}:"mod"===i?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,i)},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var r=0!==i.div.negative?i.mod.isub(t):i.mod,h=t.ushrn(1),n=t.andln(1),e=r.cmp(h);return e<0||1===n&&0===e?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var i=(1<<26)%t,h=0,n=this.length-1;n>=0;n--)h=(i*h+(0|this.words[n]))%t;return h},n.prototype.idivn=function(t){r(t<=67108863);for(var i=0,h=this.length-1;h>=0;h--){var n=(0|this.words[h])+67108864*i;this.words[h]=n/t|0,i=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var i=this,h=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var e=new n(1),o=new n(0),s=new n(0),u=new n(1),a=0;i.isEven()&&h.isEven();)i.iushrn(1),h.iushrn(1),++a;for(var l=h.clone(),m=i.clone();!i.isZero();){for(var f=0,d=1;0==(i.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(i.iushrn(f);f-- >0;)(e.isOdd()||o.isOdd())&&(e.iadd(l),o.isub(m)),e.iushrn(1),o.iushrn(1);for(var p=0,M=1;0==(h.words[0]&M)&&p<26;++p,M<<=1);if(p>0)for(h.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(m)),s.iushrn(1),u.iushrn(1);i.cmp(h)>=0?(i.isub(h),e.isub(s),o.isub(u)):(h.isub(i),s.isub(e),u.isub(o))}return{a:s,b:u,gcd:h.iushln(a)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var i=this,h=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var e=new n(1),o=new n(0),s=h.clone();i.cmpn(1)>0&&h.cmpn(1)>0;){for(var u=0,a=1;0==(i.words[0]&a)&&u<26;++u,a<<=1);if(u>0)for(i.iushrn(u);u-- >0;)e.isOdd()&&e.iadd(s),e.iushrn(1);for(var l=0,m=1;0==(h.words[0]&m)&&l<26;++l,m<<=1);if(l>0)for(h.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);i.cmp(h)>=0?(i.isub(h),e.isub(o)):(h.isub(i),o.isub(e))}var f;return(f=0===i.cmpn(1)?e:o).cmpn(0)<0&&f.iadd(t),f},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),r=t.clone();i.negative=0,r.negative=0;for(var h=0;i.isEven()&&r.isEven();h++)i.iushrn(1),r.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=i.cmp(r);if(n<0){var e=i;i=r,r=e}else if(0===n||0===r.cmpn(1))break;i.isub(r)}return r.iushln(h)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var i=t%26,h=(t-i)/26,n=1<<i;if(this.length<=h)return this._expand(h+1),this.words[h]|=n,this;for(var e=n,o=h;0!==e&&o<this.length;o++){var s=0|this.words[o];e=(s+=e)>>>26,s&=67108863,this.words[o]=s}return 0!==e&&(this.words[o]=e,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;this.strip();var h;if(this.length>1)h=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];h=n===t?0:n<t?-1:1}return 0!==this.negative?0|-h:h},n.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var i=this.ucmp(t);return 0!==this.negative?0|-i:i},n.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var i=0,r=this.length-1;r>=0;r--){var h=0|this.words[r],n=0|t.words[r];if(h!==n){h<n?i=-1:h>n&&(i=1);break}}return i},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new g(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var A={k256:null,p224:null,p192:null,p25519:null};f.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},f.prototype.ireduce=function(t){var i,r=t;do{this.split(r,this.tmp),i=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(i>this.n);var h=i<this.n?-1:r.ucmp(this.p);return 0===h?(r.words[0]=0,r.length=1):h>0?r.isub(this.p):r.strip(),r},f.prototype.split=function(t,i){t.iushrn(this.n,0,i)},f.prototype.imulK=function(t){return t.imul(this.k)},h(d,f),d.prototype.split=function(t,i){for(var r=Math.min(t.length,9),h=0;h<r;h++)i.words[h]=t.words[h];if(i.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var n=t.words[9];for(i.words[i.length++]=4194303&n,h=10;h<t.length;h++){var e=0|t.words[h];t.words[h-10]=(4194303&e)<<4|n>>>22,n=e}n>>>=22,t.words[h-10]=n,0===n&&t.length>10?t.length-=10:t.length-=9},d.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var i=0,r=0;r<t.length;r++){var h=0|t.words[r];i+=977*h,t.words[r]=67108863&i,i=64*h+(i/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},h(p,f),h(M,f),h(v,f),v.prototype.imulK=function(t){for(var i=0,r=0;r<t.length;r++){var h=19*(0|t.words[r])+i,n=67108863&h;h>>>=26,t.words[r]=n,i=h}return 0!==i&&(t.words[t.length++]=i),t},n._prime=function(t){if(A[t])return A[t];var i;if("k256"===t)i=new d;else if("p224"===t)i=new p;else if("p192"===t)i=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);i=new v}return A[t]=i,i},g.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},g.prototype._verify2=function(t,i){r(0==(t.negative|i.negative),"red works only with positives"),r(t.red&&t.red===i.red,"red works only with red numbers")},g.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},g.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},g.prototype.add=function(t,i){this._verify2(t,i);var r=t.add(i);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function(t,i){this._verify2(t,i);var r=t.iadd(i);return r.cmp(this.m)>=0&&r.isub(this.m),r},g.prototype.sub=function(t,i){this._verify2(t,i);var r=t.sub(i);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function(t,i){this._verify2(t,i);var r=t.isub(i);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},g.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},g.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},g.prototype.isqr=function(t){return this.imul(t,t.clone())},g.prototype.sqr=function(t){return this.mul(t,t)},g.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(r(i%2==1),3===i){var h=this.m.add(new n(1)).iushrn(2);return this.pow(t,h)}for(var e=this.m.subn(1),o=0;!e.isZero()&&0===e.andln(1);)o++,e.iushrn(1);r(!e.isZero());var s=new n(1).toRed(this),u=s.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new n(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var m=this.pow(l,e),f=this.pow(t,e.addn(1).iushrn(1)),d=this.pow(t,e),p=o;0!==d.cmp(s);){for(var M=d,v=0;0!==M.cmp(s);v++)M=M.redSqr();r(v<p);var g=this.pow(m,new n(1).iushln(p-v-1));f=f.redMul(g),m=g.redSqr(),d=d.redMul(m),p=v}return f},g.prototype.invm=function(t){var i=t._invmp(this.m);return 0!==i.negative?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},g.prototype.pow=function(t,i){if(i.isZero())return new n(1).toRed(this);if(0===i.cmpn(1))return t.clone();var r=new Array(16);r[0]=new n(1).toRed(this),r[1]=t;for(var h=2;h<r.length;h++)r[h]=this.mul(r[h-1],t);var e=r[0],o=0,s=0,u=i.bitLength()%26;for(0===u&&(u=26),h=i.length-1;h>=0;h--){for(var a=i.words[h],l=u-1;l>=0;l--){var m=a>>l&1;e!==r[0]&&(e=this.sqr(e)),0!==m||0!==o?(o<<=1,o|=m,(4===++s||0===h&&0===l)&&(e=this.mul(e,r[o]),s=0,o=0)):s=0}u=26}return e},g.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},g.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},n.mont=function(t){return new c(t)},h(c,g),c.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},c.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},c.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(i),h=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(h).iushrn(this.shift),e=n;return n.cmp(this.m)>=0?e=n.isub(this.m):n.cmpn(0)<0&&(e=n.iadd(this.m)),e._forceRed(this)},c.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new n(0)._forceRed(this);var r=t.mul(i),h=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=r.isub(h).iushrn(this.shift),o=e;return e.cmp(this.m)>=0?o=e.isub(this.m):e.cmpn(0)<0&&(o=e.iadd(this.m)),o._forceRed(this)},c.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}("undefined"==typeof module||module,this);
+
+},{"buffer":6}],5:[function(require,module,exports){
+function Rand(t){this.rand=t}var r;if(module.exports=function(t){return r||(r=new Rand(null)),r.generate(t)},module.exports.Rand=Rand,Rand.prototype.generate=function(t){return this._rand(t)},Rand.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),e=0;e<r.length;e++)r[e]=this.rand.getByte();return r},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?Rand.prototype._rand=function(t){var r=new Uint8Array(t);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Rand.prototype._rand=function(t){var r=new Uint8Array(t);return self.msCrypto.getRandomValues(r),r}:"object"==typeof window&&(Rand.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var crypto=require("crypto");if("function"!=typeof crypto.randomBytes)throw new Error("Not supported");Rand.prototype._rand=function(t){return crypto.randomBytes(t)}}catch(t){}
+
+},{"crypto":6}],6:[function(require,module,exports){
+
+},{}],7:[function(require,module,exports){
+(function (Buffer){
+const Sha3=require("js-sha3"),hashLengths=[224,256,384,512];var hash=function(t){if(void 0!==t&&-1==hashLengths.indexOf(t))throw new Error("Unsupported hash length");this.content=[],this.bitcount=t?"keccak_"+t:"keccak_512"};hash.prototype.update=function(t){if(Buffer.isBuffer(t))this.content.push(t);else{if("string"!=typeof t)throw new Error("Unsupported argument to update");this.content.push(new Buffer(t))}return this},hash.prototype.digest=function(t){var e=Sha3[this.bitcount](Buffer.concat(this.content));if("hex"===t)return e;if("binary"===t||void 0===t)return new Buffer(e,"hex").toString("binary");throw new Error("Unsupported encoding for digest: "+t)},module.exports={SHA3Hash:hash};
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":8,"js-sha3":55}],8:[function(require,module,exports){
+"use strict";function typedArraySupport(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}function createBuffer(e){if(e>K_MAX_LENGTH)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=Buffer.prototype,t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return isArrayBuffer(e)?fromArrayBuffer(e,t,r):"string"==typeof e?fromString(e,t):fromObject(e)}function assertSize(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function alloc(e,t,r){return assertSize(e),e<=0?createBuffer(e):void 0!==t?"string"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromString(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|byteLength(e,t),n=createBuffer(r),f=n.write(e,t);return f!==r&&(n=n.slice(0,f)),n}function fromArrayLike(e){for(var t=e.length<0?0:0|checked(e.length),r=createBuffer(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function fromArrayBuffer(e,t,r){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),n.__proto__=Buffer.prototype,n}function fromObject(e){if(Buffer.isBuffer(e)){var t=0|checked(e.length),r=createBuffer(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(e){if(isArrayBufferView(e)||"length"in e)return"number"!=typeof e.length||numberIsNaN(e.length)?createBuffer(0):fromArrayLike(e);if("Buffer"===e.type&&Array.isArray(e.data))return fromArrayLike(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(e){if(e>=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|e}function SlowBuffer(e){return+e!=e&&(e=0),Buffer.alloc(+e)}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(isArrayBufferView(e)||isArrayBuffer(e))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 utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(n)return utf8ToBytes(e).length;t=(""+t).toLowerCase(),n=!0}}function slowToString(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,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,f){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,numberIsNaN(r)&&(r=f?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(f)return-1;r=e.length-1}else if(r<0){if(!f)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,f);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,f);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,f){function i(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,u=e.length,s=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;o=2,u/=2,s/=2,r/=2}var a;if(f){var h=-1;for(a=r;a<u;a++)if(i(e,a)===i(t,-1===h?0:a-h)){if(-1===h&&(h=a),a-h+1===s)return h*o}else-1!==h&&(a-=a-h),h=-1}else for(r+s>u&&(r=u-s),a=r;a>=0;a--){for(var c=!0,l=0;l<s;l++)if(i(e,a+l)!==i(t,l)){c=!1;break}if(c)return a}return-1}function hexWrite(e,t,r,n){r=Number(r)||0;var f=e.length-r;n?(n=Number(n))>f&&(n=f):n=f;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var u=parseInt(t.substr(2*o,2),16);if(numberIsNaN(u))return o;e[r+o]=u}return o}function utf8Write(e,t,r,n){return blitBuffer(utf8ToBytes(t,e.length-r),e,r,n)}function asciiWrite(e,t,r,n){return blitBuffer(asciiToBytes(t),e,r,n)}function latin1Write(e,t,r,n){return asciiWrite(e,t,r,n)}function base64Write(e,t,r,n){return blitBuffer(base64ToBytes(t),e,r,n)}function ucs2Write(e,t,r,n){return blitBuffer(utf16leToBytes(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?base64.fromByteArray(e):base64.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);for(var n=[],f=t;f<r;){var i=e[f],o=null,u=i>239?4:i>223?3:i>191?2:1;if(f+u<=r){var s,a,h,c;switch(u){case 1:i<128&&(o=i);break;case 2:128==(192&(s=e[f+1]))&&(c=(31&i)<<6|63&s)>127&&(o=c);break;case 3:s=e[f+1],a=e[f+2],128==(192&s)&&128==(192&a)&&(c=(15&i)<<12|(63&s)<<6|63&a)>2047&&(c<55296||c>57343)&&(o=c);break;case 4:s=e[f+1],a=e[f+2],h=e[f+3],128==(192&s)&&128==(192&a)&&128==(192&h)&&(c=(15&i)<<18|(63&s)<<12|(63&a)<<6|63&h)>65535&&c<1114112&&(o=c)}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),f+=u}return decodeCodePointsArray(n)}function decodeCodePointsArray(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=MAX_ARGUMENTS_LENGTH));return r}function asciiSlice(e,t,r){var n="";r=Math.min(e.length,r);for(var f=t;f<r;++f)n+=String.fromCharCode(127&e[f]);return n}function latin1Slice(e,t,r){var n="";r=Math.min(e.length,r);for(var f=t;f<r;++f)n+=String.fromCharCode(e[f]);return n}function hexSlice(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var f="",i=t;i<r;++i)f+=toHex(e[i]);return f}function utf16leSlice(e,t,r){for(var n=e.slice(t,r),f="",i=0;i<n.length;i+=2)f+=String.fromCharCode(n[i]+256*n[i+1]);return f}function checkOffset(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,f,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>f||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function checkIEEE754(e,t,r,n,f,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(e,t,r,n,52,8),r+8}function base64clean(e){if((e=e.trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function toHex(e){return e<16?"0"+e.toString(16):e.toString(16)}function utf8ToBytes(e,t){t=t||1/0;for(var r,n=e.length,f=null,i=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!f){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}f=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),f=r;continue}r=65536+(f-55296<<10|r-56320)}else f&&(t-=3)>-1&&i.push(239,191,189);if(f=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function utf16leToBytes(e,t){for(var r,n,f,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,f=r%256,i.push(f),i.push(n);return i}function base64ToBytes(e){return base64.toByteArray(base64clean(e))}function blitBuffer(e,t,r,n){for(var f=0;f<n&&!(f+r>=t.length||f>=e.length);++f)t[f+r]=e[f];return f}function isArrayBuffer(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function isArrayBufferView(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function numberIsNaN(e){return e!==e}var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;exports.kMaxLength=K_MAX_LENGTH,Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(e,t,r){return alloc(e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function(e){return null!=e&&!0===e._isBuffer},Buffer.compare=function(e,t){if(!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,f=0,i=Math.min(r,n);f<i;++f)if(e[f]!==t[f]){r=e[f],n=t[f];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Buffer.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Buffer.allocUnsafe(t),f=0;for(r=0;r<e.length;++r){var i=e[r];if(!Buffer.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,f),f+=i.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)swap(this,t,t+1);return this},Buffer.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)swap(this,t,t+3),swap(this,t+1,t+2);return this},Buffer.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)swap(this,t,t+7),swap(this,t+1,t+6),swap(this,t+2,t+5),swap(this,t+3,t+4);return this},Buffer.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?utf8Slice(this,0,e):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(e){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function(){var e="",t=exports.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},Buffer.prototype.compare=function(e,t,r,n,f){if(!Buffer.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===f&&(f=this.length),t<0||r>e.length||n<0||f>this.length)throw new RangeError("out of range index");if(n>=f&&t>=r)return 0;if(n>=f)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,f>>>=0,this===e)return 0;for(var i=f-n,o=r-t,u=Math.min(i,o),s=this.slice(n,f),a=e.slice(t,r),h=0;h<u;++h)if(s[h]!==a[h]){i=s[h],o=a[h];break}return i<o?-1:o<i?1:0},Buffer.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Buffer.prototype.indexOf=function(e,t,r){return bidirectionalIndexOf(this,e,t,r,!0)},Buffer.prototype.lastIndexOf=function(e,t,r){return bidirectionalIndexOf(this,e,t,r,!1)},Buffer.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=Buffer.prototype,n},Buffer.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i<t&&(f*=256);)n+=this[e+i]*f;return n},Buffer.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],f=1;t>0&&(f*=256);)n+=this[e+--t]*f;return n},Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i<t&&(f*=256);)n+=this[e+i]*f;return f*=128,n>=f&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=t,f=1,i=this[e+--n];n>0&&(f*=256);)i+=this[e+--n]*f;return f*=128,i>=f&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var f=1,i=0;for(this[t]=255&e;++i<r&&(f*=256);)this[t+i]=e/f&255;return t+r},Buffer.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var f=r-1,i=1;for(this[t+f]=255&e;--f>=0&&(i*=256);)this[t+f]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=0,o=1,u=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===u&&0!==this[t+i-1]&&(u=1),this[t+i]=(e/o>>0)-u&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=r-1,o=1,u=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/o>>0)-u&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.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<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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<n-r&&(n=e.length-t+r);var f,i=n-r;if(this===e&&r<t&&t<n)for(f=i-1;f>=0;--f)e[f+t]=this[f+r];else if(i<1e3)for(f=0;f<i;++f)e[f+t]=this[f+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},Buffer.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var f=e.charCodeAt(0);f<256&&(e=f)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var i;if("number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=Buffer.isBuffer(e)?e:new Buffer(e,n),u=o.length;for(i=0;i<r-t;++i)this[i+t]=o[i%u]}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;
+
+},{"base64-js":2,"ieee754":50}],9:[function(require,module,exports){
+function CipherBase(t){Transform.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}var Buffer=require("safe-buffer").Buffer,Transform=require("stream").Transform,StringDecoder=require("string_decoder").StringDecoder,inherits=require("inherits");inherits(CipherBase,Transform),CipherBase.prototype.update=function(t,e,r){"string"==typeof t&&(t=Buffer.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},CipherBase.prototype.setAutoPadding=function(){},CipherBase.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},CipherBase.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},CipherBase.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},CipherBase.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){i=t}finally{r(i)}},CipherBase.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},CipherBase.prototype._finalOrDigest=function(t){var e=this.__final()||Buffer.alloc(0);return t&&(e=this._toString(e,t,!0)),e},CipherBase.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new StringDecoder(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i},module.exports=CipherBase;
+
+},{"inherits":51,"safe-buffer":82,"stream":97,"string_decoder":98}],10:[function(require,module,exports){
+(function (Buffer){
+function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===objectToString(r)}function isBoolean(r){return"boolean"==typeof r}function isNull(r){return null===r}function isNullOrUndefined(r){return null==r}function isNumber(r){return"number"==typeof r}function isString(r){return"string"==typeof r}function isSymbol(r){return"symbol"==typeof r}function isUndefined(r){return void 0===r}function isRegExp(r){return"[object RegExp]"===objectToString(r)}function isObject(r){return"object"==typeof r&&null!==r}function isDate(r){return"[object Date]"===objectToString(r)}function isError(r){return"[object Error]"===objectToString(r)||r instanceof Error}function isFunction(r){return"function"==typeof r}function isPrimitive(r){return null===r||"boolean"==typeof r||"number"==typeof r||"string"==typeof r||"symbol"==typeof r||void 0===r}function objectToString(r){return Object.prototype.toString.call(r)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=Buffer.isBuffer;
+
+}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
+},{"../../is-buffer/index.js":52}],11:[function(require,module,exports){
+(function (Buffer){
+"use strict";function HashNoConstructor(s){Base.call(this,"digest"),this._hash=s,this.buffers=[]}function Hash(s){Base.call(this,"digest"),this._hash=s}var inherits=require("inherits"),md5=require("./md5"),RIPEMD160=require("ripemd160"),sha=require("sha.js"),Base=require("cipher-base");inherits(HashNoConstructor,Base),HashNoConstructor.prototype._update=function(s){this.buffers.push(s)},HashNoConstructor.prototype._final=function(){var s=Buffer.concat(this.buffers),t=this._hash(s);return this.buffers=null,t},inherits(Hash,Base),Hash.prototype._update=function(s){this._hash.update(s)},Hash.prototype._final=function(){return this._hash.digest()},module.exports=function(s){return"md5"===(s=s.toLowerCase())?new HashNoConstructor(md5):new Hash("rmd160"===s||"ripemd160"===s?new RIPEMD160:sha(s))};
+
+}).call(this,require("buffer").Buffer)
+},{"./md5":13,"buffer":8,"cipher-base":9,"inherits":51,"ripemd160":80,"sha.js":90}],12:[function(require,module,exports){
+(function (Buffer){
+"use strict";function toArray(e){if(e.length%intSize!=0){var r=e.length+(intSize-e.length%intSize);e=Buffer.concat([e,zeroBuffer],r)}for(var t=new Array(e.length>>>2),n=0,i=0;n<e.length;n+=intSize,i++)t[i]=e.readInt32LE(n);return t}var intSize=4,zeroBuffer=new Buffer(intSize);zeroBuffer.fill(0);var charSize=8,hashSize=16;module.exports=function(e,r){var t=r(toArray(e),e.length*charSize);e=new Buffer(hashSize);for(var n=0;n<t.length;n++)e.writeInt32LE(t[n],n<<2,!0);return e};
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":8}],13:[function(require,module,exports){
+"use strict";function core_md5(d,_){d[_>>5]|=128<<_%32,d[14+(_+64>>>9<<4)]=_;for(var m=1732584193,f=-271733879,i=-1732584194,h=271733878,g=0;g<d.length;g+=16){var n=m,r=f,e=i,a=h;f=md5_ii(f=md5_ii(f=md5_ii(f=md5_ii(f=md5_hh(f=md5_hh(f=md5_hh(f=md5_hh(f=md5_gg(f=md5_gg(f=md5_gg(f=md5_gg(f=md5_ff(f=md5_ff(f=md5_ff(f=md5_ff(f,i=md5_ff(i,h=md5_ff(h,m=md5_ff(m,f,i,h,d[g+0],7,-680876936),f,i,d[g+1],12,-389564586),m,f,d[g+2],17,606105819),h,m,d[g+3],22,-1044525330),i=md5_ff(i,h=md5_ff(h,m=md5_ff(m,f,i,h,d[g+4],7,-176418897),f,i,d[g+5],12,1200080426),m,f,d[g+6],17,-1473231341),h,m,d[g+7],22,-45705983),i=md5_ff(i,h=md5_ff(h,m=md5_ff(m,f,i,h,d[g+8],7,1770035416),f,i,d[g+9],12,-1958414417),m,f,d[g+10],17,-42063),h,m,d[g+11],22,-1990404162),i=md5_ff(i,h=md5_ff(h,m=md5_ff(m,f,i,h,d[g+12],7,1804603682),f,i,d[g+13],12,-40341101),m,f,d[g+14],17,-1502002290),h,m,d[g+15],22,1236535329),i=md5_gg(i,h=md5_gg(h,m=md5_gg(m,f,i,h,d[g+1],5,-165796510),f,i,d[g+6],9,-1069501632),m,f,d[g+11],14,643717713),h,m,d[g+0],20,-373897302),i=md5_gg(i,h=md5_gg(h,m=md5_gg(m,f,i,h,d[g+5],5,-701558691),f,i,d[g+10],9,38016083),m,f,d[g+15],14,-660478335),h,m,d[g+4],20,-405537848),i=md5_gg(i,h=md5_gg(h,m=md5_gg(m,f,i,h,d[g+9],5,568446438),f,i,d[g+14],9,-1019803690),m,f,d[g+3],14,-187363961),h,m,d[g+8],20,1163531501),i=md5_gg(i,h=md5_gg(h,m=md5_gg(m,f,i,h,d[g+13],5,-1444681467),f,i,d[g+2],9,-51403784),m,f,d[g+7],14,1735328473),h,m,d[g+12],20,-1926607734),i=md5_hh(i,h=md5_hh(h,m=md5_hh(m,f,i,h,d[g+5],4,-378558),f,i,d[g+8],11,-2022574463),m,f,d[g+11],16,1839030562),h,m,d[g+14],23,-35309556),i=md5_hh(i,h=md5_hh(h,m=md5_hh(m,f,i,h,d[g+1],4,-1530992060),f,i,d[g+4],11,1272893353),m,f,d[g+7],16,-155497632),h,m,d[g+10],23,-1094730640),i=md5_hh(i,h=md5_hh(h,m=md5_hh(m,f,i,h,d[g+13],4,681279174),f,i,d[g+0],11,-358537222),m,f,d[g+3],16,-722521979),h,m,d[g+6],23,76029189),i=md5_hh(i,h=md5_hh(h,m=md5_hh(m,f,i,h,d[g+9],4,-640364487),f,i,d[g+12],11,-421815835),m,f,d[g+15],16,530742520),h,m,d[g+2],23,-995338651),i=md5_ii(i,h=md5_ii(h,m=md5_ii(m,f,i,h,d[g+0],6,-198630844),f,i,d[g+7],10,1126891415),m,f,d[g+14],15,-1416354905),h,m,d[g+5],21,-57434055),i=md5_ii(i,h=md5_ii(h,m=md5_ii(m,f,i,h,d[g+12],6,1700485571),f,i,d[g+3],10,-1894986606),m,f,d[g+10],15,-1051523),h,m,d[g+1],21,-2054922799),i=md5_ii(i,h=md5_ii(h,m=md5_ii(m,f,i,h,d[g+8],6,1873313359),f,i,d[g+15],10,-30611744),m,f,d[g+6],15,-1560198380),h,m,d[g+13],21,1309151649),i=md5_ii(i,h=md5_ii(h,m=md5_ii(m,f,i,h,d[g+4],6,-145523070),f,i,d[g+11],10,-1120210379),m,f,d[g+2],15,718787259),h,m,d[g+9],21,-343485551),m=safe_add(m,n),f=safe_add(f,r),i=safe_add(i,e),h=safe_add(h,a)}return[m,f,i,h]}function md5_cmn(d,_,m,f,i,h){return safe_add(bit_rol(safe_add(safe_add(_,d),safe_add(f,h)),i),m)}function md5_ff(d,_,m,f,i,h,g){return md5_cmn(_&m|~_&f,d,_,i,h,g)}function md5_gg(d,_,m,f,i,h,g){return md5_cmn(_&f|m&~f,d,_,i,h,g)}function md5_hh(d,_,m,f,i,h,g){return md5_cmn(_^m^f,d,_,i,h,g)}function md5_ii(d,_,m,f,i,h,g){return md5_cmn(m^(_|~f),d,_,i,h,g)}function safe_add(d,_){var m=(65535&d)+(65535&_);return(d>>16)+(_>>16)+(m>>16)<<16|65535&m}function bit_rol(d,_){return d<<_|d>>>32-_}var makeHash=require("./make-hash");module.exports=function(d){return makeHash(d,core_md5)};
+
+},{"./make-hash":12}],14:[function(require,module,exports){
+"use strict";var elliptic=exports;elliptic.version=require("../package.json").version,elliptic.utils=require("./elliptic/utils"),elliptic.rand=require("brorand"),elliptic.curve=require("./elliptic/curve"),elliptic.curves=require("./elliptic/curves"),elliptic.ec=require("./elliptic/ec"),elliptic.eddsa=require("./elliptic/eddsa");
+
+},{"../package.json":29,"./elliptic/curve":17,"./elliptic/curves":20,"./elliptic/ec":21,"./elliptic/eddsa":24,"./elliptic/utils":28,"brorand":5}],15:[function(require,module,exports){
+"use strict";function BaseCurve(t,e){this.type=t,this.p=new BN(e.p,16),this.red=e.prime?BN.red(e.prime):BN.mont(this.p),this.zero=new BN(0).toRed(this.red),this.one=new BN(1).toRed(this.red),this.two=new BN(2).toRed(this.red),this.n=e.n&&new BN(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 n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function BasePoint(t,e){this.curve=t,this.type=e,this.precomputed=null}var BN=require("bn.js"),elliptic=require("../../elliptic"),utils=elliptic.utils,getNAF=utils.getNAF,getJSF=utils.getJSF,assert=utils.assert;module.exports=BaseCurve,BaseCurve.prototype.point=function(){throw new Error("Not implemented")},BaseCurve.prototype.validate=function(){throw new Error("Not implemented")},BaseCurve.prototype._fixedNafMul=function(t,e){assert(t.precomputed);var n=t._getDoubles(),r=getNAF(e,1),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;for(var o=[],s=0;s<r.length;s+=n.step){for(var a=0,e=s+n.step-1;e>=s;e--)a=(a<<1)+r[e];o.push(a)}for(var p=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s<o.length;s++)(a=o[s])===d?u=u.mixedAdd(n.points[s]):a===-d&&(u=u.mixedAdd(n.points[s].neg()));p=p.add(u)}return p.toP()},BaseCurve.prototype._wnafMul=function(t,e){var n=4,r=t._getNAFPoints(n);n=r.wnd;for(var i=r.points,o=getNAF(e,n),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var e=0;a>=0&&0===o[a];a--)e++;if(a>=0&&e++,s=s.dblp(e),a<0)break;var p=o[a];assert(0!==p),s="affine"===t.type?p>0?s.mixedAdd(i[p-1>>1]):s.mixedAdd(i[-p-1>>1].neg()):p>0?s.add(i[p-1>>1]):s.add(i[-p-1>>1].neg())}return"affine"===t.type?s.toP():s},BaseCurve.prototype._wnafMulAdd=function(t,e,n,r,i){for(var o=this._wnafT1,s=this._wnafT2,a=this._wnafT3,p=0,u=0;u<r;u++){var d=(N=e[u])._getNAFPoints(t);o[u]=d.wnd,s[u]=d.points}for(u=r-1;u>=1;u-=2){var l=u-1,h=u;if(1===o[l]&&1===o[h]){var f=[e[l],null,null,e[h]];0===e[l].y.cmp(e[h].y)?(f[1]=e[l].add(e[h]),f[2]=e[l].toJ().mixedAdd(e[h].neg())):0===e[l].y.cmp(e[h].y.redNeg())?(f[1]=e[l].toJ().mixedAdd(e[h]),f[2]=e[l].add(e[h].neg())):(f[1]=e[l].toJ().mixedAdd(e[h]),f[2]=e[l].toJ().mixedAdd(e[h].neg()));var c=[-3,-1,-5,-7,0,7,5,1,3],g=getJSF(n[l],n[h]);p=Math.max(g[0].length,p),a[l]=new Array(p),a[h]=new Array(p);for(b=0;b<p;b++){var v=0|g[0][b],m=0|g[1][b];a[l][b]=c[3*(v+1)+(m+1)],a[h][b]=0,s[l]=f}}else a[l]=getNAF(n[l],o[l]),a[h]=getNAF(n[h],o[h]),p=Math.max(a[l].length,p),p=Math.max(a[h].length,p)}for(var y=this.jpoint(null,null,null),w=this._wnafT4,u=p;u>=0;u--){for(var B=0;u>=0;){for(var A=!0,b=0;b<r;b++)w[b]=0|a[b][u],0!==w[b]&&(A=!1);if(!A)break;B++,u--}if(u>=0&&B++,y=y.dblp(B),u<0)break;for(b=0;b<r;b++){var N,_=w[b];0!==_&&(_>0?N=s[b][_-1>>1]:_<0&&(N=s[b][-_-1>>1].neg()),y="affine"===N.type?y.mixedAdd(N):y.add(N))}}for(u=0;u<r;u++)s[u]=null;return i?y:y.toP()},BaseCurve.BasePoint=BasePoint,BasePoint.prototype.eq=function(){throw new Error("Not implemented")},BasePoint.prototype.validate=function(){return this.curve.validate(this)},BaseCurve.prototype.decodePoint=function(t,e){t=utils.toArray(t,e);var n=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*n)return 6===t[0]?assert(t[t.length-1]%2==0):7===t[0]&&assert(t[t.length-1]%2==1),this.point(t.slice(1,1+n),t.slice(1+n,1+2*n));if((2===t[0]||3===t[0])&&t.length-1===n)return this.pointFromX(t.slice(1,1+n),3===t[0]);throw new Error("Unknown point format")},BasePoint.prototype.encodeCompressed=function(t){return this.encode(t,!0)},BasePoint.prototype._encode=function(t){var e=this.curve.p.byteLength(),n=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",e))},BasePoint.prototype.encode=function(t,e){return utils.encode(this._encode(e),t)},BasePoint.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},BasePoint.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},BasePoint.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)r=r.dbl();n.push(r)}return{step:t,points:n}},BasePoint.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],n=(1<<t)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)e[i]=e[i-1].add(r);return{wnd:t,points:e}},BasePoint.prototype._getBeta=function(){return null},BasePoint.prototype.dblp=function(t){for(var e=this,n=0;n<t;n++)e=e.dbl();return e};
+
+},{"../../elliptic":14,"bn.js":4}],16:[function(require,module,exports){
+"use strict";function EdwardsCurve(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,Base.call(this,"edwards",t),this.a=new BN(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new BN(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new BN(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),assert(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function Point(t,r,e,i,d){Base.BasePoint.call(this,t,"projective"),null===r&&null===e&&null===i?(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 BN(r,16),this.y=new BN(e,16),this.z=i?new BN(i,16):this.curve.one,this.t=d&&new BN(d,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()))))}var curve=require("../curve"),elliptic=require("../../elliptic"),BN=require("bn.js"),inherits=require("inherits"),Base=curve.base,assert=elliptic.utils.assert;inherits(EdwardsCurve,Base),module.exports=EdwardsCurve,EdwardsCurve.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},EdwardsCurve.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},EdwardsCurve.prototype.jpoint=function(t,r,e,i){return this.point(t,r,e,i)},EdwardsCurve.prototype.pointFromX=function(t,r){(t=new BN(t,16)).red||(t=t.toRed(this.red));var e=t.redSqr(),i=this.c2.redSub(this.a.redMul(e)),d=this.one.redSub(this.c2.redMul(this.d).redMul(e)),s=i.redMul(d.redInvm()),u=s.redSqrt();if(0!==u.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var n=u.fromRed().isOdd();return(r&&!n||!r&&n)&&(u=u.redNeg()),this.point(t,u)},EdwardsCurve.prototype.pointFromY=function(t,r){(t=new BN(t,16)).red||(t=t.toRed(this.red));var e=t.redSqr(),i=e.redSub(this.one),d=e.redMul(this.d).redAdd(this.one),s=i.redMul(d.redInvm());if(0===s.cmp(this.zero)){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var u=s.redSqrt();if(0!==u.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return u.isOdd()!==r&&(u=u.redNeg()),this.point(u,t)},EdwardsCurve.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),e=t.y.redSqr(),i=r.redMul(this.a).redAdd(e),d=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(e)));return 0===i.cmp(d)},inherits(Point,Base.BasePoint),EdwardsCurve.prototype.pointFromJSON=function(t){return Point.fromJSON(this,t)},EdwardsCurve.prototype.point=function(t,r,e,i){return new Point(this,t,r,e,i)},Point.fromJSON=function(t,r){return new Point(t,r[0],r[1],r[2])},Point.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},Point.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},Point.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),e=this.z.redSqr();e=e.redIAdd(e);var i=this.curve._mulA(t),d=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),s=i.redAdd(r),u=s.redSub(e),n=i.redSub(r),h=d.redMul(u),o=s.redMul(n),l=d.redMul(n),c=u.redMul(s);return this.curve.point(h,o,c,l)},Point.prototype._projDbl=function(){var t,r,e,i=this.x.redAdd(this.y).redSqr(),d=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var u=(o=this.curve._mulA(d)).redAdd(s);if(this.zOne)t=i.redSub(d).redSub(s).redMul(u.redSub(this.curve.two)),r=u.redMul(o.redSub(s)),e=u.redSqr().redSub(u).redSub(u);else{var n=this.z.redSqr(),h=u.redSub(n).redISub(n);t=i.redSub(d).redISub(s).redMul(h),r=u.redMul(o.redSub(s)),e=u.redMul(h)}}else{var o=d.redAdd(s),n=this.curve._mulC(this.c.redMul(this.z)).redSqr(),h=o.redSub(n).redSub(n);t=this.curve._mulC(i.redISub(o)).redMul(h),r=this.curve._mulC(o).redMul(d.redISub(s)),e=o.redMul(h)}return this.curve.point(t,r,e)},Point.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},Point.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),e=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),d=this.z.redMul(t.z.redAdd(t.z)),s=e.redSub(r),u=d.redSub(i),n=d.redAdd(i),h=e.redAdd(r),o=s.redMul(u),l=n.redMul(h),c=s.redMul(h),p=u.redMul(n);return this.curve.point(o,l,p,c)},Point.prototype._projAdd=function(t){var r,e,i=this.z.redMul(t.z),d=i.redSqr(),s=this.x.redMul(t.x),u=this.y.redMul(t.y),n=this.curve.d.redMul(s).redMul(u),h=d.redSub(n),o=d.redAdd(n),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(s).redISub(u),c=i.redMul(h).redMul(l);return this.curve.twisted?(r=i.redMul(o).redMul(u.redSub(this.curve._mulA(s))),e=h.redMul(o)):(r=i.redMul(o).redMul(u.redSub(s)),e=this.curve._mulC(h).redMul(o)),this.curve.point(c,r,e)},Point.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},Point.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},Point.prototype.mulAdd=function(t,r,e){return this.curve._wnafMulAdd(1,[this,r],[t,e],2,!1)},Point.prototype.jmulAdd=function(t,r,e){return this.curve._wnafMulAdd(1,[this,r],[t,e],2,!0)},Point.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},Point.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},Point.prototype.getX=function(){return this.normalize(),this.x.fromRed()},Point.prototype.getY=function(){return this.normalize(),this.y.fromRed()},Point.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},Point.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(r))return!0;for(var e=t.clone(),i=this.curve.redN.redMul(this.z);;){if(e.iadd(this.curve.n),e.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},Point.prototype.toP=Point.prototype.normalize,Point.prototype.mixedAdd=Point.prototype.add;
+
+},{"../../elliptic":14,"../curve":17,"bn.js":4,"inherits":51}],17:[function(require,module,exports){
+"use strict";var curve=exports;curve.base=require("./base"),curve.short=require("./short"),curve.mont=require("./mont"),curve.edwards=require("./edwards");
+
+},{"./base":15,"./edwards":16,"./mont":18,"./short":19}],18:[function(require,module,exports){
+"use strict";function MontCurve(t){Base.call(this,"mont",t),this.a=new BN(t.a,16).toRed(this.red),this.b=new BN(t.b,16).toRed(this.red),this.i4=new BN(4).toRed(this.red).redInvm(),this.two=new BN(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function Point(t,r,e){Base.BasePoint.call(this,t,"projective"),null===r&&null===e?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new BN(r,16),this.z=new BN(e,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var curve=require("../curve"),BN=require("bn.js"),inherits=require("inherits"),Base=curve.base,elliptic=require("../../elliptic"),utils=elliptic.utils;inherits(MontCurve,Base),module.exports=MontCurve,MontCurve.prototype.validate=function(t){var r=t.normalize().x,e=r.redSqr(),i=e.redMul(r).redAdd(e.redMul(this.a)).redAdd(r);return 0===i.redSqrt().redSqr().cmp(i)},inherits(Point,Base.BasePoint),MontCurve.prototype.decodePoint=function(t,r){return this.point(utils.toArray(t,r),1)},MontCurve.prototype.point=function(t,r){return new Point(this,t,r)},MontCurve.prototype.pointFromJSON=function(t){return Point.fromJSON(this,t)},Point.prototype.precompute=function(){},Point.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},Point.fromJSON=function(t,r){return new Point(t,r[0],r[1]||t.one)},Point.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},Point.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Point.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),r=this.x.redSub(this.z).redSqr(),e=t.redSub(r),i=t.redMul(r),o=e.redMul(r.redAdd(this.curve.a24.redMul(e)));return this.curve.point(i,o)},Point.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},Point.prototype.diffAdd=function(t,r){var e=this.x.redAdd(this.z),i=this.x.redSub(this.z),o=t.x.redAdd(t.z),n=t.x.redSub(t.z).redMul(e),u=o.redMul(i),d=r.z.redMul(n.redAdd(u).redSqr()),s=r.x.redMul(n.redISub(u).redSqr());return this.curve.point(d,s)},Point.prototype.mul=function(t){for(var r=t.clone(),e=this,i=this.curve.point(null,null),o=this,n=[];0!==r.cmpn(0);r.iushrn(1))n.push(r.andln(1));for(var u=n.length-1;u>=0;u--)0===n[u]?(e=e.diffAdd(i,o),i=i.dbl()):(i=e.diffAdd(i,o),e=e.dbl());return i},Point.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},Point.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},Point.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},Point.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Point.prototype.getX=function(){return this.normalize(),this.x.fromRed()};
+
+},{"../../elliptic":14,"../curve":17,"bn.js":4,"inherits":51}],19:[function(require,module,exports){
+"use strict";function ShortCurve(r){Base.call(this,"short",r),this.a=new BN(r.a,16).toRed(this.red),this.b=new BN(r.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(r),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function Point(r,e,t,d){Base.BasePoint.call(this,r,"affine"),null===e&&null===t?(this.x=null,this.y=null,this.inf=!0):(this.x=new BN(e,16),this.y=new BN(t,16),d&&(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 JPoint(r,e,t,d){Base.BasePoint.call(this,r,"jacobian"),null===e&&null===t&&null===d?(this.x=this.curve.one,this.y=this.curve.one,this.z=new BN(0)):(this.x=new BN(e,16),this.y=new BN(t,16),this.z=new BN(d,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}var curve=require("../curve"),elliptic=require("../../elliptic"),BN=require("bn.js"),inherits=require("inherits"),Base=curve.base,assert=elliptic.utils.assert;inherits(ShortCurve,Base),module.exports=ShortCurve,ShortCurve.prototype._getEndomorphism=function(r){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,t;if(r.beta)e=new BN(r.beta,16).toRed(this.red);else{var d=this._getEndoRoots(this.p);e=(e=d[0].cmp(d[1])<0?d[0]:d[1]).toRed(this.red)}if(r.lambda)t=new BN(r.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?t=i[0]:(t=i[1],assert(0===this.g.mul(t).x.cmp(this.g.x.redMul(e))))}var n;return n=r.basis?r.basis.map(function(r){return{a:new BN(r.a,16),b:new BN(r.b,16)}}):this._getEndoBasis(t),{beta:e,lambda:t,basis:n}}},ShortCurve.prototype._getEndoRoots=function(r){var e=r===this.p?this.red:BN.mont(r),t=new BN(2).toRed(e).redInvm(),d=t.redNeg(),i=new BN(3).toRed(e).redNeg().redSqrt().redMul(t);return[d.redAdd(i).fromRed(),d.redSub(i).fromRed()]},ShortCurve.prototype._getEndoBasis=function(r){for(var e,t,d,i,n,u,s,o,h,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),p=r,a=this.n.clone(),c=new BN(1),f=new BN(0),v=new BN(0),S=new BN(1),b=0;0!==p.cmpn(0);){var I=a.div(p);o=a.sub(I.mul(p)),h=v.sub(I.mul(c));var y=S.sub(I.mul(f));if(!d&&o.cmp(l)<0)e=s.neg(),t=c,d=o.neg(),i=h;else if(d&&2==++b)break;s=o,a=p,p=o,v=c,c=h,S=f,f=y}n=o.neg(),u=h;var A=d.sqr().add(i.sqr());return n.sqr().add(u.sqr()).cmp(A)>=0&&(n=e,u=t),d.negative&&(d=d.neg(),i=i.neg()),n.negative&&(n=n.neg(),u=u.neg()),[{a:d,b:i},{a:n,b:u}]},ShortCurve.prototype._endoSplit=function(r){var e=this.endo.basis,t=e[0],d=e[1],i=d.b.mul(r).divRound(this.n),n=t.b.neg().mul(r).divRound(this.n),u=i.mul(t.a),s=n.mul(d.a),o=i.mul(t.b),h=n.mul(d.b);return{k1:r.sub(u).sub(s),k2:o.add(h).neg()}},ShortCurve.prototype.pointFromX=function(r,e){(r=new BN(r,16)).red||(r=r.toRed(this.red));var t=r.redSqr().redMul(r).redIAdd(r.redMul(this.a)).redIAdd(this.b),d=t.redSqrt();if(0!==d.redSqr().redSub(t).cmp(this.zero))throw new Error("invalid point");var i=d.fromRed().isOdd();return(e&&!i||!e&&i)&&(d=d.redNeg()),this.point(r,d)},ShortCurve.prototype.validate=function(r){if(r.inf)return!0;var e=r.x,t=r.y,d=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(d).redIAdd(this.b);return 0===t.redSqr().redISub(i).cmpn(0)},ShortCurve.prototype._endoWnafMulAdd=function(r,e,t){for(var d=this._endoWnafT1,i=this._endoWnafT2,n=0;n<r.length;n++){var u=this._endoSplit(e[n]),s=r[n],o=s._getBeta();u.k1.negative&&(u.k1.ineg(),s=s.neg(!0)),u.k2.negative&&(u.k2.ineg(),o=o.neg(!0)),d[2*n]=s,d[2*n+1]=o,i[2*n]=u.k1,i[2*n+1]=u.k2}for(var h=this._wnafMulAdd(1,d,i,2*n,t),l=0;l<2*n;l++)d[l]=null,i[l]=null;return h},inherits(Point,Base.BasePoint),ShortCurve.prototype.point=function(r,e,t){return new Point(this,r,e,t)},ShortCurve.prototype.pointFromJSON=function(r,e){return Point.fromJSON(this,r,e)},Point.prototype._getBeta=function(){if(this.curve.endo){var r=this.precomputed;if(r&&r.beta)return r.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(r){var t=this.curve,d=function(r){return t.point(r.x.redMul(t.endo.beta),r.y)};r.beta=e,e.precomputed={beta:null,naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(d)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(d)}}}return e}},Point.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Point.fromJSON=function(r,e,t){function d(e){return r.point(e[0],e[1],t)}"string"==typeof e&&(e=JSON.parse(e));var i=r.point(e[0],e[1],t);if(!e[2])return i;var n=e[2];return i.precomputed={beta:null,doubles:n.doubles&&{step:n.doubles.step,points:[i].concat(n.doubles.points.map(d))},naf:n.naf&&{wnd:n.naf.wnd,points:[i].concat(n.naf.points.map(d))}},i},Point.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Point.prototype.isInfinity=function(){return this.inf},Point.prototype.add=function(r){if(this.inf)return r;if(r.inf)return this;if(this.eq(r))return this.dbl();if(this.neg().eq(r))return this.curve.point(null,null);if(0===this.x.cmp(r.x))return this.curve.point(null,null);var e=this.y.redSub(r.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(r.x).redInvm()));var t=e.redSqr().redISub(this.x).redISub(r.x),d=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,d)},Point.prototype.dbl=function(){if(this.inf)return this;var r=this.y.redAdd(this.y);if(0===r.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,t=this.x.redSqr(),d=r.redInvm(),i=t.redAdd(t).redIAdd(t).redIAdd(e).redMul(d),n=i.redSqr().redISub(this.x.redAdd(this.x)),u=i.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,u)},Point.prototype.getX=function(){return this.x.fromRed()},Point.prototype.getY=function(){return this.y.fromRed()},Point.prototype.mul=function(r){return r=new BN(r,16),this._hasDoubles(r)?this.curve._fixedNafMul(this,r):this.curve.endo?this.curve._endoWnafMulAdd([this],[r]):this.curve._wnafMul(this,r)},Point.prototype.mulAdd=function(r,e,t){var d=[this,e],i=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(d,i):this.curve._wnafMulAdd(1,d,i,2)},Point.prototype.jmulAdd=function(r,e,t){var d=[this,e],i=[r,t];return this.curve.endo?this.curve._endoWnafMulAdd(d,i,!0):this.curve._wnafMulAdd(1,d,i,2,!0)},Point.prototype.eq=function(r){return this===r||this.inf===r.inf&&(this.inf||0===this.x.cmp(r.x)&&0===this.y.cmp(r.y))},Point.prototype.neg=function(r){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(r&&this.precomputed){var t=this.precomputed,d=function(r){return r.neg()};e.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(d)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(d)}}}return e},Point.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},inherits(JPoint,Base.BasePoint),ShortCurve.prototype.jpoint=function(r,e,t){return new JPoint(this,r,e,t)},JPoint.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var r=this.z.redInvm(),e=r.redSqr(),t=this.x.redMul(e),d=this.y.redMul(e).redMul(r);return this.curve.point(t,d)},JPoint.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},JPoint.prototype.add=function(r){if(this.isInfinity())return r;if(r.isInfinity())return this;var e=r.z.redSqr(),t=this.z.redSqr(),d=this.x.redMul(e),i=r.x.redMul(t),n=this.y.redMul(e.redMul(r.z)),u=r.y.redMul(t.redMul(this.z)),s=d.redSub(i),o=n.redSub(u);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=s.redSqr(),l=h.redMul(s),p=d.redMul(h),a=o.redSqr().redIAdd(l).redISub(p).redISub(p),c=o.redMul(p.redISub(a)).redISub(n.redMul(l)),f=this.z.redMul(r.z).redMul(s);return this.curve.jpoint(a,c,f)},JPoint.prototype.mixedAdd=function(r){if(this.isInfinity())return r.toJ();if(r.isInfinity())return this;var e=this.z.redSqr(),t=this.x,d=r.x.redMul(e),i=this.y,n=r.y.redMul(e).redMul(this.z),u=t.redSub(d),s=i.redSub(n);if(0===u.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var o=u.redSqr(),h=o.redMul(u),l=t.redMul(o),p=s.redSqr().redIAdd(h).redISub(l).redISub(l),a=s.redMul(l.redISub(p)).redISub(i.redMul(h)),c=this.z.redMul(u);return this.curve.jpoint(p,a,c)},JPoint.prototype.dblp=function(r){if(0===r)return this;if(this.isInfinity())return this;if(!r)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,t=0;t<r;t++)e=e.dbl();return e}for(var d=this.curve.a,i=this.curve.tinv,n=this.x,u=this.y,s=this.z,o=s.redSqr().redSqr(),h=u.redAdd(u),t=0;t<r;t++){var l=n.redSqr(),p=h.redSqr(),a=p.redSqr(),c=l.redAdd(l).redIAdd(l).redIAdd(d.redMul(o)),f=n.redMul(p),v=c.redSqr().redISub(f.redAdd(f)),S=f.redISub(v),b=c.redMul(S);b=b.redIAdd(b).redISub(a);var I=h.redMul(s);t+1<r&&(o=o.redMul(a)),n=v,s=I,h=b}return this.curve.jpoint(n,h.redMul(i),s)},JPoint.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},JPoint.prototype._zeroDbl=function(){var r,e,t;if(this.zOne){var d=this.x.redSqr(),i=this.y.redSqr(),n=i.redSqr(),u=this.x.redAdd(i).redSqr().redISub(d).redISub(n);u=u.redIAdd(u);var s=d.redAdd(d).redIAdd(d),o=s.redSqr().redISub(u).redISub(u),h=n.redIAdd(n);h=(h=h.redIAdd(h)).redIAdd(h),r=o,e=s.redMul(u.redISub(o)).redISub(h),t=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),p=this.y.redSqr(),a=p.redSqr(),c=this.x.redAdd(p).redSqr().redISub(l).redISub(a);c=c.redIAdd(c);var f=l.redAdd(l).redIAdd(l),v=f.redSqr(),S=a.redIAdd(a);S=(S=S.redIAdd(S)).redIAdd(S),r=v.redISub(c).redISub(c),e=f.redMul(c.redISub(r)).redISub(S),t=(t=this.y.redMul(this.z)).redIAdd(t)}return this.curve.jpoint(r,e,t)},JPoint.prototype._threeDbl=function(){var r,e,t;if(this.zOne){var d=this.x.redSqr(),i=this.y.redSqr(),n=i.redSqr(),u=this.x.redAdd(i).redSqr().redISub(d).redISub(n);u=u.redIAdd(u);var s=d.redAdd(d).redIAdd(d).redIAdd(this.curve.a),o=s.redSqr().redISub(u).redISub(u);r=o;var h=n.redIAdd(n);h=(h=h.redIAdd(h)).redIAdd(h),e=s.redMul(u.redISub(o)).redISub(h),t=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),p=this.y.redSqr(),a=this.x.redMul(p),c=this.x.redSub(l).redMul(this.x.redAdd(l));c=c.redAdd(c).redIAdd(c);var f=a.redIAdd(a),v=(f=f.redIAdd(f)).redAdd(f);r=c.redSqr().redISub(v),t=this.y.redAdd(this.z).redSqr().redISub(p).redISub(l);var S=p.redSqr();S=(S=(S=S.redIAdd(S)).redIAdd(S)).redIAdd(S),e=c.redMul(f.redISub(r)).redISub(S)}return this.curve.jpoint(r,e,t)},JPoint.prototype._dbl=function(){var r=this.curve.a,e=this.x,t=this.y,d=this.z,i=d.redSqr().redSqr(),n=e.redSqr(),u=t.redSqr(),s=n.redAdd(n).redIAdd(n).redIAdd(r.redMul(i)),o=e.redAdd(e),h=(o=o.redIAdd(o)).redMul(u),l=s.redSqr().redISub(h.redAdd(h)),p=h.redISub(l),a=u.redSqr();a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a);var c=s.redMul(p).redISub(a),f=t.redAdd(t).redMul(d);return this.curve.jpoint(l,c,f)},JPoint.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var r=this.x.redSqr(),e=this.y.redSqr(),t=this.z.redSqr(),d=e.redSqr(),i=r.redAdd(r).redIAdd(r),n=i.redSqr(),u=this.x.redAdd(e).redSqr().redISub(r).redISub(d),s=(u=(u=(u=u.redIAdd(u)).redAdd(u).redIAdd(u)).redISub(n)).redSqr(),o=d.redIAdd(d);o=(o=(o=o.redIAdd(o)).redIAdd(o)).redIAdd(o);var h=i.redIAdd(u).redSqr().redISub(n).redISub(s).redISub(o),l=e.redMul(h);l=(l=l.redIAdd(l)).redIAdd(l);var p=this.x.redMul(s).redISub(l);p=(p=p.redIAdd(p)).redIAdd(p);var a=this.y.redMul(h.redMul(o.redISub(h)).redISub(u.redMul(s)));a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a);var c=this.z.redAdd(u).redSqr().redISub(t).redISub(s);return this.curve.jpoint(p,a,c)},JPoint.prototype.mul=function(r,e){return r=new BN(r,e),this.curve._wnafMul(this,r)},JPoint.prototype.eq=function(r){if("affine"===r.type)return this.eq(r.toJ());if(this===r)return!0;var e=this.z.redSqr(),t=r.z.redSqr();if(0!==this.x.redMul(t).redISub(r.x.redMul(e)).cmpn(0))return!1;var d=e.redMul(this.z),i=t.redMul(r.z);return 0===this.y.redMul(i).redISub(r.y.redMul(d)).cmpn(0)},JPoint.prototype.eqXToP=function(r){var e=this.z.redSqr(),t=r.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(t))return!0;for(var d=r.clone(),i=this.curve.redN.redMul(e);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}return!1},JPoint.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},JPoint.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};
+
+},{"../../elliptic":14,"../curve":17,"bn.js":4,"inherits":51}],20:[function(require,module,exports){
+"use strict";function PresetCurve(f){"short"===f.type?this.curve=new elliptic.curve.short(f):"edwards"===f.type?this.curve=new elliptic.curve.edwards(f):this.curve=new elliptic.curve.mont(f),this.g=this.curve.g,this.n=this.curve.n,this.hash=f.hash,assert(this.g.validate(),"Invalid curve"),assert(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function defineCurve(f,e){Object.defineProperty(curves,f,{configurable:!0,enumerable:!0,get:function(){var a=new PresetCurve(e);return Object.defineProperty(curves,f,{configurable:!0,enumerable:!0,value:a}),a}})}var curves=exports,hash=require("hash.js"),elliptic=require("../elliptic"),assert=elliptic.utils.assert;curves.PresetCurve=PresetCurve,defineCurve("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:hash.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),defineCurve("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:hash.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),defineCurve("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:hash.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),defineCurve("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:hash.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"]}),defineCurve("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:hash.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"]}),defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:!1,g:["9"]}),defineCurve("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:hash.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var pre;try{pre=require("./precomputed/secp256k1")}catch(f){pre=void 0}defineCurve("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:hash.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]});
+
+},{"../elliptic":14,"./precomputed/secp256k1":27,"hash.js":37}],21:[function(require,module,exports){
+"use strict";function EC(e){if(!(this instanceof EC))return new EC(e);"string"==typeof e&&(assert(elliptic.curves.hasOwnProperty(e),"Unknown curve "+e),e=elliptic.curves[e]),e instanceof elliptic.curves.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 BN=require("bn.js"),HmacDRBG=require("hmac-drbg"),elliptic=require("../../elliptic"),utils=elliptic.utils,assert=utils.assert,KeyPair=require("./key"),Signature=require("./signature");module.exports=EC,EC.prototype.keyPair=function(e){return new KeyPair(this,e)},EC.prototype.keyFromPrivate=function(e,t){return KeyPair.fromPrivate(this,e,t)},EC.prototype.keyFromPublic=function(e,t){return KeyPair.fromPublic(this,e,t)},EC.prototype.genKeyPair=function(e){e||(e={});for(var t=new HmacDRBG({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||elliptic.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new BN(2));;){var i=new BN(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},EC.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},EC.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new BN(e,16));for(var i=this.n.byteLength(),s=t.getPrivate().toArray("be",i),u=e.toArray("be",i),o=new HmacDRBG({hash:this.hash,entropy:s,nonce:u,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new BN(1)),h=0;!0;h++){var a=n.k?n.k(h):new BN(o.generate(this.n.byteLength()));if(!((a=this._truncateToN(a,!0)).cmpn(1)<=0||a.cmp(c)>=0)){var p=this.g.mul(a);if(!p.isInfinity()){var m=p.getX(),v=m.umod(this.n);if(0!==v.cmpn(0)){var y=a.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var l=(p.getY().isOdd()?1:0)|(0!==m.cmp(v)?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),l^=1),new Signature({r:v,s:y,recoveryParam:l})}}}}}},EC.prototype.verify=function(e,t,r,n){e=this._truncateToN(new BN(e,16)),r=this.keyFromPublic(r,n);var i=(t=new Signature(t,"hex")).r,s=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var u=s.invm(this.n),o=u.mul(e).umod(this.n),c=u.mul(i).umod(this.n);if(!this.curve._maxwellTrick)return!(h=this.g.mulAdd(o,r.getPublic(),c)).isInfinity()&&0===h.getX().umod(this.n).cmp(i);var h=this.g.jmulAdd(o,r.getPublic(),c);return!h.isInfinity()&&h.eqXToP(i)},EC.prototype.recoverPubKey=function(e,t,r,n){assert((3&r)===r,"The recovery param is more than two bits"),t=new Signature(t,n);var i=this.n,s=new BN(e),u=t.r,o=t.s,c=1&r,h=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");u=h?this.curve.pointFromX(u.add(this.curve.n),c):this.curve.pointFromX(u,c);var a=t.r.invm(i),p=i.sub(s).mul(a).umod(i),m=o.mul(a).umod(i);return this.g.mulAdd(p,u,m)},EC.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new Signature(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch(e){continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};
+
+},{"../../elliptic":14,"./key":22,"./signature":23,"bn.js":4,"hmac-drbg":49}],22:[function(require,module,exports){
+"use strict";function KeyPair(i,t){this.ec=i,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var BN=require("bn.js"),elliptic=require("../../elliptic"),utils=elliptic.utils,assert=utils.assert;module.exports=KeyPair,KeyPair.fromPublic=function(i,t,e){return t instanceof KeyPair?t:new KeyPair(i,{pub:t,pubEnc:e})},KeyPair.fromPrivate=function(i,t,e){return t instanceof KeyPair?t:new KeyPair(i,{priv:t,privEnc:e})},KeyPair.prototype.validate=function(){var i=this.getPublic();return i.isInfinity()?{result:!1,reason:"Invalid public key"}:i.validate()?i.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"}},KeyPair.prototype.getPublic=function(i,t){return"string"==typeof i&&(t=i,i=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,i):this.pub},KeyPair.prototype.getPrivate=function(i){return"hex"===i?this.priv.toString(16,2):this.priv},KeyPair.prototype._importPrivate=function(i,t){this.priv=new BN(i,t||16),this.priv=this.priv.umod(this.ec.curve.n)},KeyPair.prototype._importPublic=function(i,t){if(i.x||i.y)return"mont"===this.ec.curve.type?assert(i.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||assert(i.x&&i.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(i.x,i.y));this.pub=this.ec.curve.decodePoint(i,t)},KeyPair.prototype.derive=function(i){return i.mul(this.priv).getX()},KeyPair.prototype.sign=function(i,t,e){return this.ec.sign(i,this,t,e)},KeyPair.prototype.verify=function(i,t){return this.ec.verify(i,t,this)},KeyPair.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};
+
+},{"../../elliptic":14,"bn.js":4}],23:[function(require,module,exports){
+"use strict";function Signature(t,r){if(t instanceof Signature)return t;this._importDER(t,r)||(assert(t.r&&t.s,"Signature without r or s"),this.r=new BN(t.r,16),this.s=new BN(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function Position(){this.place=0}function getLength(t,r){var e=t[r.place++];if(!(128&e))return e;for(var n=15&e,i=0,a=0,c=r.place;a<n;a++,c++)i<<=8,i|=t[c];return r.place=c,i}function rmPadding(t){for(var r=0,e=t.length-1;!t[r]&&!(128&t[r+1])&&r<e;)r++;return 0===r?t:t.slice(r)}function constructLength(t,r){if(r<128)t.push(r);else{var e=1+(Math.log(r)/Math.LN2>>>3);for(t.push(128|e);--e;)t.push(r>>>(e<<3)&255);t.push(r)}}var BN=require("bn.js"),elliptic=require("../../elliptic"),utils=elliptic.utils,assert=utils.assert;module.exports=Signature,Signature.prototype._importDER=function(t,r){t=utils.toArray(t,r);var e=new Position;if(48!==t[e.place++])return!1;if(getLength(t,e)+e.place!==t.length)return!1;if(2!==t[e.place++])return!1;var n=getLength(t,e),i=t.slice(e.place,n+e.place);if(e.place+=n,2!==t[e.place++])return!1;var a=getLength(t,e);if(t.length!==a+e.place)return!1;var c=t.slice(e.place,a+e.place);return 0===i[0]&&128&i[1]&&(i=i.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new BN(i),this.s=new BN(c),this.recoveryParam=null,!0},Signature.prototype.toDER=function(t){var r=this.r.toArray(),e=this.s.toArray();for(128&r[0]&&(r=[0].concat(r)),128&e[0]&&(e=[0].concat(e)),r=rmPadding(r),e=rmPadding(e);!(e[0]||128&e[1]);)e=e.slice(1);var n=[2];constructLength(n,r.length),(n=n.concat(r)).push(2),constructLength(n,e.length);var i=n.concat(e),a=[48];return constructLength(a,i.length),a=a.concat(i),utils.encode(a,t)};
+
+},{"../../elliptic":14,"bn.js":4}],24:[function(require,module,exports){
+"use strict";function EDDSA(t){if(assert("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof EDDSA))return new EDDSA(t);var t=elliptic.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=hash.sha512}var hash=require("hash.js"),elliptic=require("../../elliptic"),utils=elliptic.utils,assert=utils.assert,parseBytes=utils.parseBytes,KeyPair=require("./key"),Signature=require("./signature");module.exports=EDDSA,EDDSA.prototype.sign=function(t,e){t=parseBytes(t);var i=this.keyFromSecret(e),r=this.hashInt(i.messagePrefix(),t),n=this.g.mul(r),s=this.encodePoint(n),o=this.hashInt(s,i.pubBytes(),t).mul(i.priv()),u=r.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:u,Rencoded:s})},EDDSA.prototype.verify=function(t,e,i){t=parseBytes(t),e=this.makeSignature(e);var r=this.keyFromPublic(i),n=this.hashInt(e.Rencoded(),r.pubBytes(),t),s=this.g.mul(e.S());return e.R().add(r.pub().mul(n)).eq(s)},EDDSA.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return utils.intFromLE(t.digest()).umod(this.curve.n)},EDDSA.prototype.keyFromPublic=function(t){return KeyPair.fromPublic(this,t)},EDDSA.prototype.keyFromSecret=function(t){return KeyPair.fromSecret(this,t)},EDDSA.prototype.makeSignature=function(t){return t instanceof Signature?t:new Signature(this,t)},EDDSA.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},EDDSA.prototype.decodePoint=function(t){var e=(t=utils.parseBytes(t)).length-1,i=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),n=utils.intFromLE(i);return this.curve.pointFromY(n,r)},EDDSA.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},EDDSA.prototype.decodeInt=function(t){return utils.intFromLE(t)},EDDSA.prototype.isPoint=function(t){return t instanceof this.pointClass};
+
+},{"../../elliptic":14,"./key":25,"./signature":26,"hash.js":37}],25:[function(require,module,exports){
+"use strict";function KeyPair(e,t){this.eddsa=e,this._secret=parseBytes(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=parseBytes(t.pub)}var elliptic=require("../../elliptic"),utils=elliptic.utils,assert=utils.assert,parseBytes=utils.parseBytes,cachedProperty=utils.cachedProperty;KeyPair.fromPublic=function(e,t){return t instanceof KeyPair?t:new KeyPair(e,{pub:t})},KeyPair.fromSecret=function(e,t){return t instanceof KeyPair?t:new KeyPair(e,{secret:t})},KeyPair.prototype.secret=function(){return this._secret},cachedProperty(KeyPair,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),cachedProperty(KeyPair,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),cachedProperty(KeyPair,"privBytes",function(){var e=this.eddsa,t=this.hash(),i=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r}),cachedProperty(KeyPair,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),cachedProperty(KeyPair,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),cachedProperty(KeyPair,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),KeyPair.prototype.sign=function(e){return assert(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},KeyPair.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},KeyPair.prototype.getSecret=function(e){return assert(this._secret,"KeyPair is public only"),utils.encode(this.secret(),e)},KeyPair.prototype.getPublic=function(e){return utils.encode(this.pubBytes(),e)},module.exports=KeyPair;
+
+},{"../../elliptic":14}],26:[function(require,module,exports){
+"use strict";function Signature(e,t){this.eddsa=e,"object"!=typeof t&&(t=parseBytes(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),assert(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof BN&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}var BN=require("bn.js"),elliptic=require("../../elliptic"),utils=elliptic.utils,assert=utils.assert,cachedProperty=utils.cachedProperty,parseBytes=utils.parseBytes;cachedProperty(Signature,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),cachedProperty(Signature,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),cachedProperty(Signature,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),cachedProperty(Signature,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),Signature.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Signature.prototype.toHex=function(){return utils.encode(this.toBytes(),"hex").toUpperCase()},module.exports=Signature;
+
+},{"../../elliptic":14,"bn.js":4}],27:[function(require,module,exports){
+module.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}};
+
+},{}],28:[function(require,module,exports){
+"use strict";function getNAF(t,r){for(var i=[],n=1<<r+1,e=t.clone();e.cmpn(1)>=0;){var s;if(e.isOdd()){var u=e.andln(n-1);s=u>(n>>1)-1?(n>>1)-u:u,e.isubn(s)}else s=0;i.push(s);for(var l=0!==e.cmpn(0)&&0===e.andln(n-1)?r+1:1,o=1;o<l;o++)i.push(0);e.iushrn(l)}return i}function getJSF(t,r){var i=[[],[]];t=t.clone(),r=r.clone();for(var n=0,e=0;t.cmpn(-n)>0||r.cmpn(-e)>0;){var s=t.andln(3)+n&3,u=r.andln(3)+e&3;3===s&&(s=-1),3===u&&(u=-1);var l;l=0==(1&s)?0:3!==(a=t.andln(7)+n&7)&&5!==a||2!==u?s:-s,i[0].push(l);var o;if(0==(1&u))o=0;else{var a=r.andln(7)+e&7;o=3!==a&&5!==a||2!==s?u:-u}i[1].push(o),2*n===l+1&&(n=1-n),2*e===o+1&&(e=1-e),t.iushrn(1),r.iushrn(1)}return i}function cachedProperty(t,r,i){var n="_"+r;t.prototype[r]=function(){return void 0!==this[n]?this[n]:this[n]=i.call(this)}}function parseBytes(t){return"string"==typeof t?utils.toArray(t,"hex"):t}function intFromLE(t){return new BN(t,"hex","le")}var utils=exports,BN=require("bn.js"),minAssert=require("minimalistic-assert"),minUtils=require("minimalistic-crypto-utils");utils.assert=minAssert,utils.toArray=minUtils.toArray,utils.zero2=minUtils.zero2,utils.toHex=minUtils.toHex,utils.encode=minUtils.encode,utils.getNAF=getNAF,utils.getJSF=getJSF,utils.cachedProperty=cachedProperty,utils.parseBytes=parseBytes,utils.intFromLE=intFromLE;
+
+},{"bn.js":4,"minimalistic-assert":63,"minimalistic-crypto-utils":64}],29:[function(require,module,exports){
+module.exports={
+ "_args": [
+ [
+ "elliptic@6.4.0",
+ "/Users/hdrewes/Documents/DEV/EthereumJS/browser-builds"
+ ]
+ ],
+ "_from": "elliptic@6.4.0",
+ "_id": "elliptic@6.4.0",
+ "_inBundle": false,
+ "_integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",
+ "_location": "/elliptic",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "elliptic@6.4.0",
+ "name": "elliptic",
+ "escapedName": "elliptic",
+ "rawSpec": "6.4.0",
+ "saveSpec": null,
+ "fetchSpec": "6.4.0"
+ },
+ "_requiredBy": [
+ "/browserify-sign",
+ "/create-ecdh",
+ "/secp256k1"
+ ],
+ "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",
+ "_spec": "6.4.0",
+ "_where": "/Users/hdrewes/Documents/DEV/EthereumJS/browser-builds",
+ "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"
+ },
+ "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": {
+ "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"
+}
+
+},{}],30:[function(require,module,exports){
+module.exports={
+ "genesisGasLimit": {
+ "v": 5000,
+ "d": "Gas limit of the Genesis block."
+ },
+ "genesisDifficulty": {
+ "v": 17179869184,
+ "d": "Difficulty of the Genesis block."
+ },
+ "genesisNonce": {
+ "v": "0x0000000000000042",
+ "d": "the geneis nonce"
+ },
+ "genesisExtraData": {
+ "v": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
+ "d": "extra data "
+ },
+ "genesisHash": {
+ "v": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
+ "d": "genesis hash"
+ },
+ "genesisStateRoot": {
+ "v": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544",
+ "d": "the genesis state root"
+ },
+ "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."
+ },
+ "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."
+ },
+ "maximumExtraDataSize": {
+ "v": 32,
+ "d": "Maximum size extra data may be after Genesis."
+ },
+ "epochDuration": {
+ "v": 30000,
+ "d": "Duration between proof-of-work epochs."
+ },
+ "stackLimit": {
+ "v": 1024,
+ "d": "Maximum size of VM stack allowed."
+ },
+ "callCreateDepth": {
+ "v": 1024,
+ "d": "Maximum depth of call/create stack."
+ },
+
+ "tierStepGas": {
+ "v": [0, 2, 3, 5, 8, 10, 20],
+ "d": "Once per operation, for a selection of them."
+ },
+ "expGas": {
+ "v": 10,
+ "d": "Once per EXP instuction."
+ },
+ "expByteGas": {
+ "v": 10,
+ "d": "Times ceil(log256(exponent)) for the EXP instruction."
+ },
+
+ "sha3Gas": {
+ "v": 30,
+ "d": "Once per SHA3 operation."
+ },
+ "sha3WordGas": {
+ "v": 6,
+ "d": "Once per word of the SHA3 operation's data."
+ },
+ "sloadGas": {
+ "v": 50,
+ "d": "Once per SLOAD operation."
+ },
+ "sstoreSetGas": {
+ "v": 20000,
+ "d": "Once per SSTORE operation if the zeroness changes from zero."
+ },
+ "sstoreResetGas": {
+ "v": 5000,
+ "d": "Once per SSTORE operation if the zeroness does not change from zero."
+ },
+ "sstoreRefundGas": {
+ "v": 15000,
+ "d": "Once per SSTORE operation if the zeroness changes to zero."
+ },
+ "jumpdestGas": {
+ "v": 1,
+ "d": "Refunded gas, once per SSTORE operation if the zeroness changes to zero."
+ },
+
+ "logGas": {
+ "v": 375,
+ "d": "Per LOG* operation."
+ },
+ "logDataGas": {
+ "v": 8,
+ "d": "Per byte in a LOG* operation's data."
+ },
+ "logTopicGas": {
+ "v": 375,
+ "d": "Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas."
+ },
+
+ "createGas": {
+ "v": 32000,
+ "d": "Once per CREATE operation & contract-creation transaction."
+ },
+
+ "callGas": {
+ "v": 40,
+ "d": "Once per CALL operation & message call transaction."
+ },
+ "callStipend": {
+ "v": 2300,
+ "d": "Free gas given at beginning of call."
+ },
+ "callValueTransferGas": {
+ "v": 9000,
+ "d": "Paid for CALL when the value transfor is non-zero."
+ },
+ "callNewAccountGas": {
+ "v": 25000,
+ "d": "Paid for CALL when the destination address didn't exist prior."
+ },
+
+ "suicideRefundGas": {
+ "v": 24000,
+ "d": "Refunded following a suicide operation."
+ },
+
+ "memoryGas": {
+ "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."
+ },
+
+ "createDataGas": {
+ "v": 200,
+ "d": ""
+ },
+ "txGas": {
+ "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"
+ },
+ "txDataZeroGas": {
+ "v": 4,
+ "d": "Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions."
+ },
+ "txDataNonZeroGas": {
+ "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."
+ },
+
+ "copyGas": {
+ "v": 3,
+ "d": "Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added."
+ },
+
+ "ecrecoverGas": {
+ "v": 3000,
+ "d": ""
+ },
+ "sha256Gas": {
+ "v": 60,
+ "d": ""
+ },
+ "sha256WordGas": {
+ "v": 12,
+ "d": ""
+ },
+ "ripemd160Gas": {
+ "v": 600,
+ "d": ""
+ },
+ "ripemd160WordGas": {
+ "v": 120,
+ "d": ""
+ },
+ "identityGas": {
+ "v": 15,
+ "d": ""
+ },
+ "identityWordGas": {
+ "v": 3,
+ "d": ""
+ },
+ "minerReward": {
+ "v": "5000000000000000000",
+ "d": "the amount a miner get rewarded for mining a block"
+ },
+ "ommerReward": {
+ "v": "625000000000000000",
+ "d": "The amount of wei a miner of an uncle block gets for being inculded in the blockchain"
+ },
+ "niblingReward": {
+ "v": "156250000000000000",
+ "d": "the amount a miner gets for inculding a uncle"
+ },
+ "homeSteadForkNumber": {
+ "v": 1150000,
+ "d": "the block that the Homestead fork started at"
+ },
+ "homesteadRepriceForkNumber": {
+ "v": 2463000,
+ "d": "the block that the Homestead Reprice (EIP150) fork started at"
+ },
+ "timebombPeriod": {
+ "v": 100000,
+ "d": "Exponential difficulty timebomb period"
+ },
+ "freeBlockPeriod": {
+ "v": 2
+ }
+}
+
+},{}],31:[function(require,module,exports){
+(function (Buffer){
+"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var ethUtil=require("ethereumjs-util"),fees=require("ethereum-common/params.json"),BN=ethUtil.BN,N_DIV_2=new BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),Transaction=function(){function e(t){_classCallCheck(this,e),t=t||{};var i=[{name:"nonce",length:32,allowLess:!0,default:new Buffer([])},{name:"gasPrice",length:32,allowLess:!0,default:new Buffer([])},{name:"gasLimit",alias:"gas",length:32,allowLess:!0,default:new Buffer([])},{name:"to",allowZero:!0,length:20,default:new Buffer([])},{name:"value",length:32,allowLess:!0,default:new Buffer([])},{name:"data",alias:"input",allowZero:!0,default:new Buffer([])},{name:"v",allowZero:!0,default:new Buffer([28])},{name:"r",length:32,allowZero:!0,allowLess:!0,default:new Buffer([])},{name:"s",length:32,allowZero:!0,allowLess:!0,default:new Buffer([])}];ethUtil.defineProperties(this,i,t),Object.defineProperty(this,"from",{enumerable:!0,configurable:!0,get:this.getSenderAddress.bind(this)});var r=ethUtil.bufferToInt(this.v),s=Math.floor((r-35)/2);s<0&&(s=0),this._chainId=s||t.chainId||0,this._homestead=!0}return e.prototype.toCreationAddress=function(){return""===this.to.toString("hex")},e.prototype.hash=function(e){void 0===e&&(e=!0);var t=void 0;if(e)t=this.raw;else if(this._chainId>0){var i=this.raw.slice();this.v=this._chainId,this.r=0,this.s=0,t=this.raw,this.raw=i}else t=this.raw.slice(0,6);return ethUtil.rlphash(t)},e.prototype.getChainId=function(){return this._chainId},e.prototype.getSenderAddress=function(){if(this._from)return this._from;var e=this.getSenderPublicKey();return this._from=ethUtil.publicToAddress(e),this._from},e.prototype.getSenderPublicKey=function(){if(!(this._senderPubKey&&this._senderPubKey.length||this.verifySignature()))throw new Error("Invalid Signature");return this._senderPubKey},e.prototype.verifySignature=function(){var e=this.hash(!1);if(this._homestead&&1===new BN(this.s).cmp(N_DIV_2))return!1;try{var t=ethUtil.bufferToInt(this.v);this._chainId>0&&(t-=2*this._chainId+8),this._senderPubKey=ethUtil.ecrecover(e,t,this.r,this.s)}catch(e){return!1}return!!this._senderPubKey},e.prototype.sign=function(e){var t=this.hash(!1),i=ethUtil.ecsign(t,e);this._chainId>0&&(i.v+=2*this._chainId+8),Object.assign(this,i)},e.prototype.getDataFee=function(){for(var e=this.raw[5],t=new BN(0),i=0;i<e.length;i++)0===e[i]?t.iaddn(fees.txDataZeroGas.v):t.iaddn(fees.txDataNonZeroGas.v);return t},e.prototype.getBaseFee=function(){var e=this.getDataFee().iaddn(fees.txGas.v);return this._homestead&&this.toCreationAddress()&&e.iaddn(fees.txCreation.v),e},e.prototype.getUpfrontCost=function(){return new BN(this.gasLimit).imul(new BN(this.gasPrice)).iadd(new BN(this.value))},e.prototype.validate=function(e){var t=[];return this.verifySignature()||t.push("Invalid Signature"),this.getBaseFee().cmp(new BN(this.gasLimit))>0&&t.push(["gas limit is too low. Need at least "+this.getBaseFee()]),void 0===e||!1===e?0===t.length:t.join(" ")},e}();module.exports=Transaction;
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":8,"ethereum-common/params.json":30,"ethereumjs-util":32}],32:[function(require,module,exports){
+(function (Buffer){
+"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},createKeccakHash=require("keccak"),secp256k1=require("secp256k1"),assert=require("assert"),rlp=require("rlp"),BN=require("bn.js"),createHash=require("create-hash");Object.assign(exports,require("ethjs-util")),exports.MAX_INTEGER=new BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),exports.TWO_POW256=new BN("10000000000000000000000000000000000000000000000000000000000000000",16),exports.SHA3_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",exports.SHA3_NULL=Buffer.from(exports.SHA3_NULL_S,"hex"),exports.SHA3_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",exports.SHA3_RLP_ARRAY=Buffer.from(exports.SHA3_RLP_ARRAY_S,"hex"),exports.SHA3_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",exports.SHA3_RLP=Buffer.from(exports.SHA3_RLP_S,"hex"),exports.BN=BN,exports.rlp=rlp,exports.secp256k1=secp256k1,exports.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)},exports.setLengthLeft=exports.setLength=function(e,r,t){var f=exports.zeros(r);return e=exports.toBuffer(e),t?e.length<r?(e.copy(f),f):e.slice(0,r):e.length<r?(e.copy(f,r-e.length),f):e.slice(-r)},exports.setLengthRight=function(e,r){return exports.setLength(e,r,!0)},exports.unpad=exports.stripZeros=function(e){for(var r=(e=exports.stripHexPrefix(e))[0];e.length>0&&"0"===r.toString();)r=(e=e.slice(1))[0];return e},exports.toBuffer=function(e){if(!Buffer.isBuffer(e))if(Array.isArray(e))e=Buffer.from(e);else if("string"==typeof e)e=exports.isHexString(e)?Buffer.from(exports.padToEven(exports.stripHexPrefix(e)),"hex"):Buffer.from(e);else if("number"==typeof e)e=exports.intToBuffer(e);else if(null===e||void 0===e)e=Buffer.allocUnsafe(0);else{if(!e.toArray)throw new Error("invalid type");e=Buffer.from(e.toArray())}return e},exports.bufferToInt=function(e){return new BN(exports.toBuffer(e)).toNumber()},exports.bufferToHex=function(e){return"0x"+(e=exports.toBuffer(e)).toString("hex")},exports.fromSigned=function(e){return new BN(e).fromTwos(256)},exports.toUnsigned=function(e){return Buffer.from(e.toTwos(256).toArray())},exports.sha3=function(e,r){return e=exports.toBuffer(e),r||(r=256),createKeccakHash("keccak"+r).update(e).digest()},exports.sha256=function(e){return e=exports.toBuffer(e),createHash("sha256").update(e).digest()},exports.ripemd160=function(e,r){e=exports.toBuffer(e);var t=createHash("rmd160").update(e).digest();return!0===r?exports.setLength(t,32):t},exports.rlphash=function(e){return exports.sha3(rlp.encode(e))},exports.isValidPrivate=function(e){return secp256k1.privateKeyVerify(e)},exports.isValidPublic=function(e,r){return 64===e.length?secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]),e])):!!r&&secp256k1.publicKeyVerify(e)},exports.pubToAddress=exports.publicToAddress=function(e,r){return e=exports.toBuffer(e),r&&64!==e.length&&(e=secp256k1.publicKeyConvert(e,!1).slice(1)),assert(64===e.length),exports.sha3(e).slice(-20)};var privateToPublic=exports.privateToPublic=function(e){return e=exports.toBuffer(e),secp256k1.publicKeyCreate(e,!1).slice(1)};exports.importPublic=function(e){return 64!==(e=exports.toBuffer(e)).length&&(e=secp256k1.publicKeyConvert(e,!1).slice(1)),e},exports.ecsign=function(e,r){var t=secp256k1.sign(e,r),f={};return f.r=t.signature.slice(0,32),f.s=t.signature.slice(32,64),f.v=t.recovery+27,f},exports.hashPersonalMessage=function(e){var r=exports.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return exports.sha3(Buffer.concat([r,e]))},exports.ecrecover=function(e,r,t,f){var o=Buffer.concat([exports.setLength(t,32),exports.setLength(f,32)],64),s=r-27;if(0!==s&&1!==s)throw new Error("Invalid signature v value");var n=secp256k1.recover(e,o,s);return secp256k1.publicKeyConvert(n,!1).slice(1)},exports.toRpcSig=function(e,r,t){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r,32),exports.setLengthLeft(t,32),exports.toBuffer(e-27)]))},exports.fromRpcSig=function(e){if(65!==(e=exports.toBuffer(e)).length)throw new Error("Invalid signature length");var r=e[64];return r<27&&(r+=27),{v:r,r:e.slice(0,32),s:e.slice(32,64)}},exports.privateToAddress=function(e){return exports.publicToAddress(privateToPublic(e))},exports.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/i.test(e)},exports.toChecksumAddress=function(e){e=exports.stripHexPrefix(e).toLowerCase();for(var r=exports.sha3(e).toString("hex"),t="0x",f=0;f<e.length;f++)parseInt(r[f],16)>=8?t+=e[f].toUpperCase():t+=e[f];return t},exports.isValidChecksumAddress=function(e){return exports.isValidAddress(e)&&exports.toChecksumAddress(e)===e},exports.generateAddress=function(e,r){return e=exports.toBuffer(e),r=new BN(r),r=r.isZero()?null:Buffer.from(r.toArray()),exports.rlphash([e,r]).slice(-20)},exports.isPrecompiled=function(e){var r=exports.unpad(e);return 1===r.length&&r[0]>0&&r[0]<5},exports.addHexPrefix=function(e){return"string"!=typeof e?e:exports.isHexPrefixed(e)?e:"0x"+e},exports.isValidSignature=function(e,r,t,f){var o=new BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),s=new BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===r.length&&32===t.length&&((27===e||28===e)&&(r=new BN(r),t=new BN(t),!(r.isZero()||r.gt(s)||t.isZero()||t.gt(s))&&(!1!==f||1!==new BN(t).cmp(o))))},exports.baToJSON=function(e){if(Buffer.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var r=[],t=0;t<e.length;t++)r.push(exports.baToJSON(e[t]));return r}},exports.defineProperties=function(e,r,t){if(e.raw=[],e._fields=[],e.toJSON=function(r){if(r){var t={};return e._fields.forEach(function(r){t[r]="0x"+e[r].toString("hex")}),t}return exports.baToJSON(this.raw)},e.serialize=function(){return rlp.encode(e.raw)},r.forEach(function(r,t){function f(){return e.raw[t]}function o(f){"00"!==(f=exports.toBuffer(f)).toString("hex")||r.allowZero||(f=Buffer.allocUnsafe(0)),r.allowLess&&r.length?(f=exports.stripZeros(f),assert(r.length>=f.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===f.length||!r.length||assert(r.length===f.length,"The field "+r.name+" must have byte length of "+r.length),e.raw[t]=f}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:f,set:o}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:o,get:f})}),t)if("string"==typeof t&&(t=Buffer.from(exports.stripHexPrefix(t),"hex")),Buffer.isBuffer(t)&&(t=rlp.decode(t)),Array.isArray(t)){if(t.length>e._fields.length)throw new Error("wrong number of fields in data");t.forEach(function(r,t){e[e._fields[t]]=exports.toBuffer(r)})}else{if("object"!==(void 0===t?"undefined":_typeof(t)))throw new Error("invalid data");var f=Object.keys(t);r.forEach(function(r){-1!==f.indexOf(r.name)&&(e[r.name]=t[r.name]),-1!==f.indexOf(r.alias)&&(e[r.alias]=t[r.alias])})}};
+
+}).call(this,require("buffer").Buffer)
+},{"assert":1,"bn.js":4,"buffer":8,"create-hash":11,"ethjs-util":34,"keccak":56,"rlp":81,"secp256k1":83}],33:[function(require,module,exports){
+(function (Buffer){
+const SHA3=require("keccakjs"),secp256k1=require("secp256k1"),assert=require("assert"),rlp=require("rlp"),BN=require("bn.js"),createHash=require("create-hash");exports.MAX_INTEGER=new BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),exports.TWO_POW256=new BN("10000000000000000000000000000000000000000000000000000000000000000",16),exports.SHA3_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",exports.SHA3_NULL=new Buffer(exports.SHA3_NULL_S,"hex"),exports.SHA3_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",exports.SHA3_RLP_ARRAY=new Buffer(exports.SHA3_RLP_ARRAY_S,"hex"),exports.SHA3_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",exports.SHA3_RLP=new Buffer(exports.SHA3_RLP_S,"hex"),exports.BN=BN,exports.rlp=rlp,exports.secp256k1=secp256k1,exports.zeros=function(e){var r=new Buffer(e);return r.fill(0),r},exports.setLengthLeft=exports.setLength=function(e,r,t){var f=exports.zeros(r);return e=exports.toBuffer(e),t?e.length<r?(e.copy(f),f):e.slice(0,r):e.length<r?(e.copy(f,r-e.length),f):e.slice(-r)},exports.setLengthRight=function(e,r){return exports.setLength(e,r,!0)},exports.unpad=exports.stripZeros=function(e){for(var r=(e=exports.stripHexPrefix(e))[0];e.length>0&&"0"===r.toString();)r=(e=e.slice(1))[0];return e},exports.toBuffer=function(e){if(!Buffer.isBuffer(e))if(Array.isArray(e))e=new Buffer(e);else if("string"==typeof e)e=exports.isHexPrefixed(e)?new Buffer(exports.padToEven(exports.stripHexPrefix(e)),"hex"):new Buffer(e);else if("number"==typeof e)e=exports.intToBuffer(e);else if(null===e||void 0===e)e=new Buffer([]);else{if(!e.toArray)throw new Error("invalid type");e=new Buffer(e.toArray())}return e},exports.intToHex=function(e){assert(e%1==0,"number is not a integer"),assert(e>=0,"number must be positive");var r=e.toString(16);return r.length%2&&(r="0"+r),"0x"+r},exports.intToBuffer=function(e){var r=exports.intToHex(e);return new Buffer(r.slice(2),"hex")},exports.bufferToInt=function(e){return parseInt(exports.bufferToHex(e),16)},exports.bufferToHex=function(e){return 0===(e=exports.toBuffer(e)).length?0:"0x"+e.toString("hex")},exports.fromSigned=function(e){return new BN(e).fromTwos(256)},exports.toUnsigned=function(e){return new Buffer(e.toTwos(256).toArray())},exports.sha3=function(e,r){e=exports.toBuffer(e),r||(r=256);var t=new SHA3(r);return e&&t.update(e),new Buffer(t.digest("hex"),"hex")},exports.sha256=function(e){return e=exports.toBuffer(e),createHash("sha256").update(e).digest()},exports.ripemd160=function(e,r){e=exports.toBuffer(e);var t=createHash("rmd160").update(e).digest();return!0===r?exports.setLength(t,32):t},exports.rlphash=function(e){return exports.sha3(rlp.encode(e))},exports.isValidPrivate=function(e){return secp256k1.privateKeyVerify(e)},exports.isValidPublic=function(e,r){return 64===e.length?secp256k1.publicKeyVerify(Buffer.concat([new Buffer([4]),e])):!!r&&secp256k1.publicKeyVerify(e)},exports.pubToAddress=exports.publicToAddress=function(e,r){return e=exports.toBuffer(e),r&&64!==e.length&&(e=secp256k1.publicKeyConvert(e,!1).slice(1)),assert(64===e.length),exports.sha3(e).slice(-20)};var privateToPublic=exports.privateToPublic=function(e){return e=exports.toBuffer(e),secp256k1.publicKeyCreate(e,!1).slice(1)};exports.importPublic=function(e){return 64!==(e=exports.toBuffer(e)).length&&(e=secp256k1.publicKeyConvert(e,!1).slice(1)),e},exports.ecsign=function(e,r){var t=secp256k1.sign(e,r),f={};return f.r=t.signature.slice(0,32),f.s=t.signature.slice(32,64),f.v=t.recovery+27,f},exports.ecrecover=function(e,r,t,f){var s=Buffer.concat([exports.setLength(t,32),exports.setLength(f,32)],64),o=exports.bufferToInt(r)-27;if(0!==o&&1!==o)throw new Error("Invalid signature v value");var n=secp256k1.recover(e,s,o);return secp256k1.publicKeyConvert(n,!1).slice(1)},exports.toRpcSig=function(e,r,t){return exports.bufferToHex(Buffer.concat([r,t,exports.toBuffer(e-27)]))},exports.fromRpcSig=function(e){var r=(e=exports.toBuffer(e))[64];return r<27&&(r+=27),{v:r,r:e.slice(0,32),s:e.slice(32,64)}},exports.privateToAddress=function(e){return exports.publicToAddress(privateToPublic(e))},exports.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/i.test(e)},exports.toChecksumAddress=function(e){e=exports.stripHexPrefix(e).toLowerCase();for(var r=exports.sha3(e).toString("hex"),t="0x",f=0;f<e.length;f++)parseInt(r[f],16)>=8?t+=e[f].toUpperCase():t+=e[f];return t},exports.isValidChecksumAddress=function(e){return exports.isValidAddress(e)&&exports.toChecksumAddress(e)===e},exports.generateAddress=function(e,r){return e=exports.toBuffer(e),r=new BN(r),r=r.isZero()?null:new Buffer(r.toArray()),exports.rlphash([e,r]).slice(-20)},exports.isPrecompiled=function(e){var r=exports.unpad(e);return 1===r.length&&r[0]>0&&r[0]<5},exports.isHexPrefixed=function(e){return"0x"===e.slice(0,2)},exports.stripHexPrefix=function(e){return"string"!=typeof e?e:exports.isHexPrefixed(e)?e.slice(2):e},exports.addHexPrefix=function(e){return"string"!=typeof e?e:exports.isHexPrefixed(e)?e:"0x"+e},exports.padToEven=function(e){return e.length%2&&(e="0"+e),e},exports.baToJSON=function(e){if(Buffer.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var r=[],t=0;t<e.length;t++)r.push(exports.baToJSON(e[t]));return r}},exports.defineProperties=function(e,r,t){if(e.raw=[],e._fields=[],e.toJSON=function(r){if(r){var t={};return e._fields.forEach(function(r){t[r]="0x"+e[r].toString("hex")}),t}return exports.baToJSON(this.raw)},e.serialize=function(){return rlp.encode(e.raw)},r.forEach(function(r,t){function f(){return e.raw[t]}function s(f){"00"!==(f=exports.toBuffer(f)).toString("hex")||r.allowZero||(f=new Buffer([])),r.allowLess&&r.length?(f=exports.stripZeros(f),assert(r.length>=f.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===f.length||!r.length||assert(r.length===f.length,"The field "+r.name+" must have byte length of "+r.length),e.raw[t]=f}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:f,set:s}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:s,get:f})}),t)if("string"==typeof t&&(t=new Buffer(exports.stripHexPrefix(t),"hex")),Buffer.isBuffer(t)&&(t=rlp.decode(t)),Array.isArray(t)){if(t.length>e._fields.length)throw new Error("wrong number of fields in data");t.forEach(function(r,t){e[e._fields[t]]=exports.toBuffer(r)})}else{if("object"!=typeof t)throw new Error("invalid data");for(var f in t)-1!==e._fields.indexOf(f)&&(e[f]=t[f])}};
+
+}).call(this,require("buffer").Buffer)
+},{"assert":1,"bn.js":4,"buffer":8,"create-hash":11,"keccakjs":62,"rlp":81,"secp256k1":83}],34:[function(require,module,exports){
+(function (Buffer){
+"use strict";function padToEven(r){var e=r;if("string"!=typeof e)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof e+", while padToEven.");return e.length%2&&(e="0"+e),e}function intToHex(r){return"0x"+padToEven(r.toString(16))}function intToBuffer(r){var e=intToHex(r);return new Buffer(e.slice(2),"hex")}function getBinarySize(r){if("string"!=typeof r)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof r+"'.");return Buffer.byteLength(r,"utf8")}function arrayContainsArray(r,e,t){if(!0!==Array.isArray(r))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof r+"'");if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof e+"'");return e[Boolean(t)&&"some"||"every"](function(e){return r.indexOf(e)>=0})}function toUtf8(r){return new Buffer(padToEven(stripHexPrefix(r).replace(/^0+|0+$/g,"")),"hex").toString("utf8")}function toAscii(r){var e="",t=0,i=r.length;for("0x"===r.substring(0,2)&&(t=2);t<i;t+=2){var n=parseInt(r.substr(t,2),16);e+=String.fromCharCode(n)}return e}function fromUtf8(r){return"0x"+padToEven(new Buffer(r,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}function fromAscii(r){for(var e="",t=0;t<r.length;t++){var i=r.charCodeAt(t).toString(16);e+=i.length<2?"0"+i:i}return"0x"+e}function getKeys(r,e,t){if(!Array.isArray(r))throw new Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof r+"'");if("string"!=typeof e)throw new Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof e+"'.");for(var i=[],n=0;n<r.length;n++){var o=r[n][e];if(t&&!o)o="";else if("string"!=typeof o)throw new Error("invalid abi");i.push(o)}return i}function isHexString(r,e){return!("string"!=typeof r||!r.match(/^0x[0-9A-Fa-f]*$/))&&(!e||r.length===2+2*e)}var isHexPrefixed=require("is-hex-prefixed"),stripHexPrefix=require("strip-hex-prefix");module.exports={arrayContainsArray:arrayContainsArray,intToBuffer:intToBuffer,getBinarySize:getBinarySize,isHexPrefixed:isHexPrefixed,stripHexPrefix:stripHexPrefix,padToEven:padToEven,intToHex:intToHex,fromAscii:fromAscii,fromUtf8:fromUtf8,toAscii:toAscii,toUtf8:toUtf8,getKeys:getKeys,isHexString:isHexString};
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":8,"is-hex-prefixed":53,"strip-hex-prefix":99}],35:[function(require,module,exports){
+function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isObject(e){return"object"==typeof e&&null!==e}function isUndefined(e){return void 0===e}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(e){if(!isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},EventEmitter.prototype.emit=function(e){var t,i,n,s,r,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i=this._events[e],isUndefined(i))return!1;if(isFunction(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),i.apply(this,s)}else if(isObject(i))for(s=Array.prototype.slice.call(arguments,1),n=(o=i.slice()).length,r=0;r<n;r++)o[r].apply(this,s);return!0},EventEmitter.prototype.addListener=function(e,t){var i;if(!isFunction(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,isFunction(t.listener)?t.listener:t),this._events[e]?isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,isObject(this._events[e])&&!this._events[e].warned&&(i=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(e,t){function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}if(!isFunction(t))throw TypeError("listener must be a function");var n=!1;return i.listener=t,this.on(e,i),this},EventEmitter.prototype.removeListener=function(e,t){var i,n,s,r;if(!isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=this._events[e],s=i.length,n=-1,i===t||isFunction(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(isObject(i)){for(r=s;r-- >0;)if(i[r]===t||i[r].listener&&i[r].listener===t){n=r;break}if(n<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},EventEmitter.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[e],isFunction(i))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},EventEmitter.prototype.listeners=function(e){return this._events&&this._events[e]?isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},EventEmitter.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(isFunction(t))return 1;if(t)return t.length}return 0},EventEmitter.listenerCount=function(e,t){return e.listenerCount(t)};
+
+},{}],36:[function(require,module,exports){
+(function (Buffer){
+"use strict";function HashBase(t){Transform.call(this),this._block=new Buffer(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var Transform=require("stream").Transform,inherits=require("inherits");inherits(HashBase,Transform),HashBase.prototype._transform=function(t,e,r){var s=null;try{"buffer"!==e&&(t=new Buffer(t,e)),this.update(t)}catch(t){s=t}r(s)},HashBase.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},HashBase.prototype.update=function(t,e){if(!Buffer.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");Buffer.isBuffer(t)||(t=new Buffer(t,e||"binary"));for(var r=this._block,s=0;this._blockOffset+t.length-s>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=t[s++];this._update(),this._blockOffset=0}for(;s<t.length;)r[this._blockOffset++]=t[s++];for(var o=0,a=8*t.length;a>0;++o)this._length[o]+=a,(a=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*a);return this},HashBase.prototype._update=function(t){throw new Error("_update is not implemented")},HashBase.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},HashBase.prototype._digest=function(){throw new Error("_digest is not implemented")},module.exports=HashBase;
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":8,"inherits":51,"stream":97}],37:[function(require,module,exports){
+var hash=exports;hash.utils=require("./hash/utils"),hash.common=require("./hash/common"),hash.sha=require("./hash/sha"),hash.ripemd=require("./hash/ripemd"),hash.hmac=require("./hash/hmac"),hash.sha1=hash.sha.sha1,hash.sha256=hash.sha.sha256,hash.sha224=hash.sha.sha224,hash.sha384=hash.sha.sha384,hash.sha512=hash.sha.sha512,hash.ripemd160=hash.ripemd.ripemd160;
+
+},{"./hash/common":38,"./hash/hmac":39,"./hash/ripemd":40,"./hash/sha":41,"./hash/utils":48}],38:[function(require,module,exports){
+"use strict";function BlockHash(){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}var utils=require("./utils"),assert=require("minimalistic-assert");exports.BlockHash=BlockHash,BlockHash.prototype.update=function(t,i){if(t=utils.toArray(t,i),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=utils.join32(t,0,t.length-n,this.endian);for(var s=0;s<t.length;s+=this._delta32)this._update(t,s,s+this._delta32)}return this},BlockHash.prototype.digest=function(t){return this.update(this._pad()),assert(null===this.pending),this._digest(t)},BlockHash.prototype._pad=function(){var t=this.pendingTotal,i=this._delta8,n=i-(t+this.padLength)%i,s=new Array(n+this.padLength);s[0]=128;for(var e=1;e<n;e++)s[e]=0;if(t<<=3,"big"===this.endian){for(var h=8;h<this.padLength;h++)s[e++]=0;s[e++]=0,s[e++]=0,s[e++]=0,s[e++]=0,s[e++]=t>>>24&255,s[e++]=t>>>16&255,s[e++]=t>>>8&255,s[e++]=255&t}else for(s[e++]=255&t,s[e++]=t>>>8&255,s[e++]=t>>>16&255,s[e++]=t>>>24&255,s[e++]=0,s[e++]=0,s[e++]=0,s[e++]=0,h=8;h<this.padLength;h++)s[e++]=0;return s};
+
+},{"./utils":48,"minimalistic-assert":63}],39:[function(require,module,exports){
+"use strict";function Hmac(t,i,e){if(!(this instanceof Hmac))return new Hmac(t,i,e);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(utils.toArray(i,e))}var utils=require("./utils"),assert=require("minimalistic-assert");module.exports=Hmac,Hmac.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),assert(t.length<=this.blockSize);for(var i=t.length;i<this.blockSize;i++)t.push(0);for(i=0;i<t.length;i++)t[i]^=54;for(this.inner=(new this.Hash).update(t),i=0;i<t.length;i++)t[i]^=106;this.outer=(new this.Hash).update(t)},Hmac.prototype.update=function(t,i){return this.inner.update(t,i),this},Hmac.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)};
+
+},{"./utils":48,"minimalistic-assert":63}],40:[function(require,module,exports){
+"use strict";function RIPEMD160(){if(!(this instanceof RIPEMD160))return new RIPEMD160;BlockHash.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(t,s,h,i){return t<=15?s^h^i:t<=31?s&h|~s&i:t<=47?(s|~h)^i:t<=63?s&i|h&~i:s^(h|~i)}function K(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function Kh(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var utils=require("./utils"),common=require("./common"),rotl32=utils.rotl32,sum32=utils.sum32,sum32_3=utils.sum32_3,sum32_4=utils.sum32_4,BlockHash=common.BlockHash;utils.inherits(RIPEMD160,BlockHash),exports.ripemd160=RIPEMD160,RIPEMD160.blockSize=512,RIPEMD160.outSize=160,RIPEMD160.hmacStrength=192,RIPEMD160.padLength=64,RIPEMD160.prototype._update=function(t,h){for(var i=this.h[0],u=this.h[1],o=this.h[2],e=this.h[3],l=this.h[4],n=i,m=u,c=o,a=e,_=l,D=0;D<80;D++){var E=sum32(rotl32(sum32_4(i,f(D,u,o,e),t[r[D]+h],K(D)),s[D]),l);i=l,l=e,e=rotl32(o,10),o=u,u=E,E=sum32(rotl32(sum32_4(n,f(79-D,m,c,a),t[rh[D]+h],Kh(D)),sh[D]),_),n=_,_=a,a=rotl32(c,10),c=m,m=E}E=sum32_3(this.h[1],o,a),this.h[1]=sum32_3(this.h[2],e,_),this.h[2]=sum32_3(this.h[3],l,n),this.h[3]=sum32_3(this.h[4],i,m),this.h[4]=sum32_3(this.h[0],u,c),this.h[0]=E},RIPEMD160.prototype._digest=function(t){return"hex"===t?utils.toHex32(this.h,"little"):utils.split32(this.h,"little")};var r=[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],rh=[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],s=[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],sh=[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];
+
+},{"./common":38,"./utils":48}],41:[function(require,module,exports){
+"use strict";exports.sha1=require("./sha/1"),exports.sha224=require("./sha/224"),exports.sha256=require("./sha/256"),exports.sha384=require("./sha/384"),exports.sha512=require("./sha/512");
+
+},{"./sha/1":42,"./sha/224":43,"./sha/256":44,"./sha/384":45,"./sha/512":46}],42:[function(require,module,exports){
+"use strict";function SHA1(){if(!(this instanceof SHA1))return new SHA1;BlockHash.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}var utils=require("../utils"),common=require("../common"),shaCommon=require("./common"),rotl32=utils.rotl32,sum32=utils.sum32,sum32_5=utils.sum32_5,ft_1=shaCommon.ft_1,BlockHash=common.BlockHash,sha1_K=[1518500249,1859775393,2400959708,3395469782];utils.inherits(SHA1,BlockHash),module.exports=SHA1,SHA1.blockSize=512,SHA1.outSize=160,SHA1.hmacStrength=80,SHA1.padLength=64,SHA1.prototype._update=function(t,h){for(var s=this.W,i=0;i<16;i++)s[i]=t[h+i];for(;i<s.length;i++)s[i]=rotl32(s[i-3]^s[i-8]^s[i-14]^s[i-16],1);var o=this.h[0],r=this.h[1],u=this.h[2],e=this.h[3],l=this.h[4];for(i=0;i<s.length;i++){var m=~~(i/20),n=sum32_5(rotl32(o,5),ft_1(m,r,u,e),l,s[i],sha1_K[m]);l=e,e=u,u=rotl32(r,30),r=o,o=n}this.h[0]=sum32(this.h[0],o),this.h[1]=sum32(this.h[1],r),this.h[2]=sum32(this.h[2],u),this.h[3]=sum32(this.h[3],e),this.h[4]=sum32(this.h[4],l)},SHA1.prototype._digest=function(t){return"hex"===t?utils.toHex32(this.h,"big"):utils.split32(this.h,"big")};
+
+},{"../common":38,"../utils":48,"./common":47}],43:[function(require,module,exports){
+"use strict";function SHA224(){if(!(this instanceof SHA224))return new SHA224;SHA256.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}var utils=require("../utils"),SHA256=require("./256");utils.inherits(SHA224,SHA256),module.exports=SHA224,SHA224.blockSize=512,SHA224.outSize=224,SHA224.hmacStrength=192,SHA224.padLength=64,SHA224.prototype._digest=function(t){return"hex"===t?utils.toHex32(this.h.slice(0,7),"big"):utils.split32(this.h.slice(0,7),"big")};
+
+},{"../utils":48,"./256":44}],44:[function(require,module,exports){
+"use strict";function SHA256(){if(!(this instanceof SHA256))return new SHA256;BlockHash.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sha256_K,this.W=new Array(64)}var utils=require("../utils"),common=require("../common"),shaCommon=require("./common"),assert=require("minimalistic-assert"),sum32=utils.sum32,sum32_4=utils.sum32_4,sum32_5=utils.sum32_5,ch32=shaCommon.ch32,maj32=shaCommon.maj32,s0_256=shaCommon.s0_256,s1_256=shaCommon.s1_256,g0_256=shaCommon.g0_256,g1_256=shaCommon.g1_256,BlockHash=common.BlockHash,sha256_K=[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];utils.inherits(SHA256,BlockHash),module.exports=SHA256,SHA256.blockSize=512,SHA256.outSize=256,SHA256.hmacStrength=192,SHA256.padLength=64,SHA256.prototype._update=function(s,h){for(var t=this.W,i=0;i<16;i++)t[i]=s[h+i];for(;i<t.length;i++)t[i]=sum32_4(g1_256(t[i-2]),t[i-7],g0_256(t[i-15]),t[i-16]);var m=this.h[0],o=this.h[1],u=this.h[2],e=this.h[3],n=this.h[4],a=this.h[5],r=this.h[6],l=this.h[7];for(assert(this.k.length===t.length),i=0;i<t.length;i++){var _=sum32_5(l,s1_256(n),ch32(n,a,r),this.k[i],t[i]),c=sum32(s0_256(m),maj32(m,o,u));l=r,r=a,a=n,n=sum32(e,_),e=u,u=o,o=m,m=sum32(_,c)}this.h[0]=sum32(this.h[0],m),this.h[1]=sum32(this.h[1],o),this.h[2]=sum32(this.h[2],u),this.h[3]=sum32(this.h[3],e),this.h[4]=sum32(this.h[4],n),this.h[5]=sum32(this.h[5],a),this.h[6]=sum32(this.h[6],r),this.h[7]=sum32(this.h[7],l)},SHA256.prototype._digest=function(s){return"hex"===s?utils.toHex32(this.h,"big"):utils.split32(this.h,"big")};
+
+},{"../common":38,"../utils":48,"./common":47,"minimalistic-assert":63}],45:[function(require,module,exports){
+"use strict";function SHA384(){if(!(this instanceof SHA384))return new SHA384;SHA512.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}var utils=require("../utils"),SHA512=require("./512");utils.inherits(SHA384,SHA512),module.exports=SHA384,SHA384.blockSize=1024,SHA384.outSize=384,SHA384.hmacStrength=192,SHA384.padLength=128,SHA384.prototype._digest=function(t){return"hex"===t?utils.toHex32(this.h.slice(0,12),"big"):utils.split32(this.h.slice(0,12),"big")};
+
+},{"../utils":48,"./512":46}],46:[function(require,module,exports){
+"use strict";function SHA512(){if(!(this instanceof SHA512))return new SHA512;BlockHash.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=sha512_K,this.W=new Array(160)}function ch64_hi(t,h,r,i,s){var _=t&r^~t&s;return _<0&&(_+=4294967296),_}function ch64_lo(t,h,r,i,s,_){var o=h&i^~h&_;return o<0&&(o+=4294967296),o}function maj64_hi(t,h,r,i,s){var _=t&r^t&s^r&s;return _<0&&(_+=4294967296),_}function maj64_lo(t,h,r,i,s,_){var o=h&i^h&_^i&_;return o<0&&(o+=4294967296),o}function s0_512_hi(t,h){var r=rotr64_hi(t,h,28)^rotr64_hi(h,t,2)^rotr64_hi(h,t,7);return r<0&&(r+=4294967296),r}function s0_512_lo(t,h){var r=rotr64_lo(t,h,28)^rotr64_lo(h,t,2)^rotr64_lo(h,t,7);return r<0&&(r+=4294967296),r}function s1_512_hi(t,h){var r=rotr64_hi(t,h,14)^rotr64_hi(t,h,18)^rotr64_hi(h,t,9);return r<0&&(r+=4294967296),r}function s1_512_lo(t,h){var r=rotr64_lo(t,h,14)^rotr64_lo(t,h,18)^rotr64_lo(h,t,9);return r<0&&(r+=4294967296),r}function g0_512_hi(t,h){var r=rotr64_hi(t,h,1)^rotr64_hi(t,h,8)^shr64_hi(t,h,7);return r<0&&(r+=4294967296),r}function g0_512_lo(t,h){var r=rotr64_lo(t,h,1)^rotr64_lo(t,h,8)^shr64_lo(t,h,7);return r<0&&(r+=4294967296),r}function g1_512_hi(t,h){var r=rotr64_hi(t,h,19)^rotr64_hi(h,t,29)^shr64_hi(t,h,6);return r<0&&(r+=4294967296),r}function g1_512_lo(t,h){var r=rotr64_lo(t,h,19)^rotr64_lo(h,t,29)^shr64_lo(t,h,6);return r<0&&(r+=4294967296),r}var utils=require("../utils"),common=require("../common"),assert=require("minimalistic-assert"),rotr64_hi=utils.rotr64_hi,rotr64_lo=utils.rotr64_lo,shr64_hi=utils.shr64_hi,shr64_lo=utils.shr64_lo,sum64=utils.sum64,sum64_hi=utils.sum64_hi,sum64_lo=utils.sum64_lo,sum64_4_hi=utils.sum64_4_hi,sum64_4_lo=utils.sum64_4_lo,sum64_5_hi=utils.sum64_5_hi,sum64_5_lo=utils.sum64_5_lo,BlockHash=common.BlockHash,sha512_K=[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];utils.inherits(SHA512,BlockHash),module.exports=SHA512,SHA512.blockSize=1024,SHA512.outSize=512,SHA512.hmacStrength=192,SHA512.padLength=128,SHA512.prototype._prepareBlock=function(t,h){for(var r=this.W,i=0;i<32;i++)r[i]=t[h+i];for(;i<r.length;i+=2){var s=g1_512_hi(r[i-4],r[i-3]),_=g1_512_lo(r[i-4],r[i-3]),o=r[i-14],u=r[i-13],l=g0_512_hi(r[i-30],r[i-29]),n=g0_512_lo(r[i-30],r[i-29]),e=r[i-32],m=r[i-31];r[i]=sum64_4_hi(s,_,o,u,l,n,e,m),r[i+1]=sum64_4_lo(s,_,o,u,l,n,e,m)}},SHA512.prototype._update=function(t,h){this._prepareBlock(t,h);var r=this.W,i=this.h[0],s=this.h[1],_=this.h[2],o=this.h[3],u=this.h[4],l=this.h[5],n=this.h[6],e=this.h[7],m=this.h[8],a=this.h[9],c=this.h[10],f=this.h[11],v=this.h[12],g=this.h[13],H=this.h[14],S=this.h[15];assert(this.k.length===r.length);for(var p=0;p<r.length;p+=2){var A=H,k=S,B=s1_512_hi(m,a),d=s1_512_lo(m,a),j=ch64_hi(m,a,c,f,v,g),y=ch64_lo(m,a,c,f,v,g),b=this.k[p],q=this.k[p+1],x=r[p],W=r[p+1],w=sum64_5_hi(A,k,B,d,j,y,b,q,x,W),z=sum64_5_lo(A,k,B,d,j,y,b,q,x,W);A=s0_512_hi(i,s),k=s0_512_lo(i,s),B=maj64_hi(i,s,_,o,u,l),d=maj64_lo(i,s,_,o,u,l);var K=sum64_hi(A,k,B,d),L=sum64_lo(A,k,B,d);H=v,S=g,v=c,g=f,c=m,f=a,m=sum64_hi(n,e,w,z),a=sum64_lo(e,e,w,z),n=u,e=l,u=_,l=o,_=i,o=s,i=sum64_hi(w,z,K,L),s=sum64_lo(w,z,K,L)}sum64(this.h,0,i,s),sum64(this.h,2,_,o),sum64(this.h,4,u,l),sum64(this.h,6,n,e),sum64(this.h,8,m,a),sum64(this.h,10,c,f),sum64(this.h,12,v,g),sum64(this.h,14,H,S)},SHA512.prototype._digest=function(t){return"hex"===t?utils.toHex32(this.h,"big"):utils.split32(this.h,"big")};
+
+},{"../common":38,"../utils":48,"minimalistic-assert":63}],47:[function(require,module,exports){
+"use strict";function ft_1(r,t,o,n){return 0===r?ch32(t,o,n):1===r||3===r?p32(t,o,n):2===r?maj32(t,o,n):void 0}function ch32(r,t,o){return r&t^~r&o}function maj32(r,t,o){return r&t^r&o^t&o}function p32(r,t,o){return r^t^o}function s0_256(r){return rotr32(r,2)^rotr32(r,13)^rotr32(r,22)}function s1_256(r){return rotr32(r,6)^rotr32(r,11)^rotr32(r,25)}function g0_256(r){return rotr32(r,7)^rotr32(r,18)^r>>>3}function g1_256(r){return rotr32(r,17)^rotr32(r,19)^r>>>10}var utils=require("../utils"),rotr32=utils.rotr32;exports.ft_1=ft_1,exports.ch32=ch32,exports.maj32=maj32,exports.p32=p32,exports.s0_256=s0_256,exports.s1_256=s1_256,exports.g0_256=g0_256,exports.g1_256=g1_256;
+
+},{"../utils":48}],48:[function(require,module,exports){
+"use strict";function toArray(r,t){if(Array.isArray(r))return r.slice();if(!r)return[];var o=[];if("string"==typeof r)if(t){if("hex"===t)for((r=r.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(r="0"+r),n=0;n<r.length;n+=2)o.push(parseInt(r[n]+r[n+1],16))}else for(var n=0;n<r.length;n++){var e=r.charCodeAt(n),s=e>>8,u=255&e;s?o.push(s,u):o.push(u)}else for(n=0;n<r.length;n++)o[n]=0|r[n];return o}function toHex(r){for(var t="",o=0;o<r.length;o++)t+=zero2(r[o].toString(16));return t}function htonl(r){return(r>>>24|r>>>8&65280|r<<8&16711680|(255&r)<<24)>>>0}function toHex32(r,t){for(var o="",n=0;n<r.length;n++){var e=r[n];"little"===t&&(e=htonl(e)),o+=zero8(e.toString(16))}return o}function zero2(r){return 1===r.length?"0"+r:r}function zero8(r){return 7===r.length?"0"+r:6===r.length?"00"+r:5===r.length?"000"+r:4===r.length?"0000"+r:3===r.length?"00000"+r:2===r.length?"000000"+r:1===r.length?"0000000"+r:r}function join32(r,t,o,n){var e=o-t;assert(e%4==0);for(var s=new Array(e/4),u=0,i=t;u<s.length;u++,i+=4){var h;h="big"===n?r[i]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3]:r[i+3]<<24|r[i+2]<<16|r[i+1]<<8|r[i],s[u]=h>>>0}return s}function split32(r,t){for(var o=new Array(4*r.length),n=0,e=0;n<r.length;n++,e+=4){var s=r[n];"big"===t?(o[e]=s>>>24,o[e+1]=s>>>16&255,o[e+2]=s>>>8&255,o[e+3]=255&s):(o[e+3]=s>>>24,o[e+2]=s>>>16&255,o[e+1]=s>>>8&255,o[e]=255&s)}return o}function rotr32(r,t){return r>>>t|r<<32-t}function rotl32(r,t){return r<<t|r>>>32-t}function sum32(r,t){return r+t>>>0}function sum32_3(r,t,o){return r+t+o>>>0}function sum32_4(r,t,o,n){return r+t+o+n>>>0}function sum32_5(r,t,o,n,e){return r+t+o+n+e>>>0}function sum64(r,t,o,n){var e=r[t],s=n+r[t+1]>>>0,u=(s<n?1:0)+o+e;r[t]=u>>>0,r[t+1]=s}function sum64_hi(r,t,o,n){return(t+n>>>0<t?1:0)+r+o>>>0}function sum64_lo(r,t,o,n){return t+n>>>0}function sum64_4_hi(r,t,o,n,e,s,u,i){var h=0,_=t;return h+=(_=_+n>>>0)<t?1:0,h+=(_=_+s>>>0)<s?1:0,r+o+e+u+(h+=(_=_+i>>>0)<i?1:0)>>>0}function sum64_4_lo(r,t,o,n,e,s,u,i){return t+n+s+i>>>0}function sum64_5_hi(r,t,o,n,e,s,u,i,h,_){var l=0,f=t;return l+=(f=f+n>>>0)<t?1:0,l+=(f=f+s>>>0)<s?1:0,l+=(f=f+i>>>0)<i?1:0,r+o+e+u+h+(l+=(f=f+_>>>0)<_?1:0)>>>0}function sum64_5_lo(r,t,o,n,e,s,u,i,h,_){return t+n+s+i+_>>>0}function rotr64_hi(r,t,o){return(t<<32-o|r>>>o)>>>0}function rotr64_lo(r,t,o){return(r<<32-o|t>>>o)>>>0}function shr64_hi(r,t,o){return r>>>o}function shr64_lo(r,t,o){return(r<<32-o|t>>>o)>>>0}var assert=require("minimalistic-assert"),inherits=require("inherits");exports.inherits=inherits,exports.toArray=toArray,exports.toHex=toHex,exports.htonl=htonl,exports.toHex32=toHex32,exports.zero2=zero2,exports.zero8=zero8,exports.join32=join32,exports.split32=split32,exports.rotr32=rotr32,exports.rotl32=rotl32,exports.sum32=sum32,exports.sum32_3=sum32_3,exports.sum32_4=sum32_4,exports.sum32_5=sum32_5,exports.sum64=sum64,exports.sum64_hi=sum64_hi,exports.sum64_lo=sum64_lo,exports.sum64_4_hi=sum64_4_hi,exports.sum64_4_lo=sum64_4_lo,exports.sum64_5_hi=sum64_5_hi,exports.sum64_5_lo=sum64_5_lo,exports.rotr64_hi=rotr64_hi,exports.rotr64_lo=rotr64_lo,exports.shr64_hi=shr64_hi,exports.shr64_lo=shr64_lo;
+
+},{"inherits":51,"minimalistic-assert":63}],49:[function(require,module,exports){
+"use strict";function HmacDRBG(t){if(!(this instanceof HmacDRBG))return new HmacDRBG(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=utils.toArray(t.entropy,t.entropyEnc||"hex"),i=utils.toArray(t.nonce,t.nonceEnc||"hex"),s=utils.toArray(t.pers,t.persEnc||"hex");assert(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,i,s)}var hash=require("hash.js"),utils=require("minimalistic-crypto-utils"),assert=require("minimalistic-assert");module.exports=HmacDRBG,HmacDRBG.prototype._init=function(t,e,i){var s=t.concat(e).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var h=0;h<this.V.length;h++)this.K[h]=0,this.V[h]=1;this._update(s),this._reseed=1,this.reseedInterval=281474976710656},HmacDRBG.prototype._hmac=function(){return new hash.hmac(this.hash,this.K)},HmacDRBG.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},HmacDRBG.prototype.reseed=function(t,e,i,s){"string"!=typeof e&&(s=i,i=e,e=null),t=utils.toArray(t,e),i=utils.toArray(i,s),assert(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1},HmacDRBG.prototype.generate=function(t,e,i,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(s=i,i=e,e=null),i&&(i=utils.toArray(i,s||"hex"),this._update(i));for(var h=[];h.length<t;)this.V=this._hmac().update(this.V).digest(),h=h.concat(this.V);var r=h.slice(0,t);return this._update(i),this._reseed++,utils.encode(r,e)};
+
+},{"hash.js":37,"minimalistic-assert":63,"minimalistic-crypto-utils":64}],50:[function(require,module,exports){
+exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
+
+},{}],51:[function(require,module,exports){
+"function"==typeof Object.create?module.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(t,e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t};
+
+},{}],52:[function(require,module,exports){
+function isBuffer(f){return!!f.constructor&&"function"==typeof f.constructor.isBuffer&&f.constructor.isBuffer(f)}function isSlowBuffer(f){return"function"==typeof f.readFloatLE&&"function"==typeof f.slice&&isBuffer(f.slice(0,0))}module.exports=function(f){return null!=f&&(isBuffer(f)||isSlowBuffer(f)||!!f._isBuffer)};
+
+},{}],53:[function(require,module,exports){
+module.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)};
+
+},{}],54:[function(require,module,exports){
+var toString={}.toString;module.exports=Array.isArray||function(r){return"[object Array]"==toString.call(r)};
+
+},{}],55:[function(require,module,exports){
+(function (global){
+!function(r,e){"use strict";var n="undefined"!=typeof module;n&&(r=global).JS_SHA3_TEST&&(r.navigator={userAgent:"Chrome"});var t=(r.JS_SHA3_TEST||!n)&&-1!=navigator.userAgent.indexOf("Chrome"),o="0123456789abcdef".split(""),a=[1,256,65536,16777216],c=[6,1536,393216,100663296],f=[0,8,16,24],u=[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],i=[],_=[],s=function(r){return v(r,224,a)},k=function(r){return v(r,256,a)},h=function(r){return v(r,384,a)},d=function(r){return v(r,224,c)},l=function(r){return v(r,256,c)},A=function(r){return v(r,384,c)},S=function(r){return v(r,512,c)},v=function(e,n,c){var s="string"!=typeof e;s&&e.constructor==r.ArrayBuffer&&(e=new Uint8Array(e)),void 0===n&&(n=512,c=a);var k,h,d,l,A,S,v,g,T,m,p,y,C,E,H,J,b,w,x,B,O,U,j,q,z,D,F,G,I,K,L,M,N,P,Q,R,V,W,X,Y,Z,$,rr,er,nr,tr,or,ar,cr,fr,ur,ir,_r,sr,kr,hr,dr,lr,Ar,Sr,vr,gr,Tr,mr,pr,yr,Cr=!1,Er=0,Hr=0,Jr=e.length,br=(1600-2*n)/32,wr=4*br;for(l=0;l<50;++l)_[l]=0;k=0;do{for(i[0]=k,l=1;l<br+1;++l)i[l]=0;if(s)for(l=Hr;Er<Jr&&l<wr;++Er)i[l>>2]|=e[Er]<<f[3&l++];else for(l=Hr;Er<Jr&&l<wr;++Er)(h=e.charCodeAt(Er))<128?i[l>>2]|=h<<f[3&l++]:h<2048?(i[l>>2]|=(192|h>>6)<<f[3&l++],i[l>>2]|=(128|63&h)<<f[3&l++]):h<55296||h>=57344?(i[l>>2]|=(224|h>>12)<<f[3&l++],i[l>>2]|=(128|h>>6&63)<<f[3&l++],i[l>>2]|=(128|63&h)<<f[3&l++]):(h=65536+((1023&h)<<10|1023&e.charCodeAt(++Er)),i[l>>2]|=(240|h>>18)<<f[3&l++],i[l>>2]|=(128|h>>12&63)<<f[3&l++],i[l>>2]|=(128|h>>6&63)<<f[3&l++],i[l>>2]|=(128|63&h)<<f[3&l++]);for(Hr=l-wr,Er==Jr&&(i[l>>2]|=c[3&l],++Er),k=i[br],Er>Jr&&l<wr&&(i[br-1]|=2147483648,Cr=!0),l=0;l<br;++l)_[l]^=i[l];for(d=0;d<48;d+=2)v=_[0]^_[10]^_[20]^_[30]^_[40],g=_[1]^_[11]^_[21]^_[31]^_[41],T=_[2]^_[12]^_[22]^_[32]^_[42],m=_[3]^_[13]^_[23]^_[33]^_[43],p=_[4]^_[14]^_[24]^_[34]^_[44],y=_[5]^_[15]^_[25]^_[35]^_[45],C=_[6]^_[16]^_[26]^_[36]^_[46],E=_[7]^_[17]^_[27]^_[37]^_[47],A=(H=_[8]^_[18]^_[28]^_[38]^_[48])^(T<<1|m>>>31),S=(J=_[9]^_[19]^_[29]^_[39]^_[49])^(m<<1|T>>>31),_[0]^=A,_[1]^=S,_[10]^=A,_[11]^=S,_[20]^=A,_[21]^=S,_[30]^=A,_[31]^=S,_[40]^=A,_[41]^=S,A=v^(p<<1|y>>>31),S=g^(y<<1|p>>>31),_[2]^=A,_[3]^=S,_[12]^=A,_[13]^=S,_[22]^=A,_[23]^=S,_[32]^=A,_[33]^=S,_[42]^=A,_[43]^=S,A=T^(C<<1|E>>>31),S=m^(E<<1|C>>>31),_[4]^=A,_[5]^=S,_[14]^=A,_[15]^=S,_[24]^=A,_[25]^=S,_[34]^=A,_[35]^=S,_[44]^=A,_[45]^=S,A=p^(H<<1|J>>>31),S=y^(J<<1|H>>>31),_[6]^=A,_[7]^=S,_[16]^=A,_[17]^=S,_[26]^=A,_[27]^=S,_[36]^=A,_[37]^=S,_[46]^=A,_[47]^=S,A=C^(v<<1|g>>>31),S=E^(g<<1|v>>>31),_[8]^=A,_[9]^=S,_[18]^=A,_[19]^=S,_[28]^=A,_[29]^=S,_[38]^=A,_[39]^=S,_[48]^=A,_[49]^=S,b=_[0],w=_[1],cr=_[11]<<4|_[10]>>>28,fr=_[10]<<4|_[11]>>>28,L=_[20]<<3|_[21]>>>29,M=_[21]<<3|_[20]>>>29,Tr=_[31]<<9|_[30]>>>23,mr=_[30]<<9|_[31]>>>23,nr=_[40]<<18|_[41]>>>14,tr=_[41]<<18|_[40]>>>14,V=_[2]<<1|_[3]>>>31,W=_[3]<<1|_[2]>>>31,x=_[13]<<12|_[12]>>>20,B=_[12]<<12|_[13]>>>20,ur=_[22]<<10|_[23]>>>22,ir=_[23]<<10|_[22]>>>22,N=_[33]<<13|_[32]>>>19,P=_[32]<<13|_[33]>>>19,pr=_[42]<<2|_[43]>>>30,yr=_[43]<<2|_[42]>>>30,dr=_[5]<<30|_[4]>>>2,lr=_[4]<<30|_[5]>>>2,X=_[14]<<6|_[15]>>>26,Y=_[15]<<6|_[14]>>>26,O=_[25]<<11|_[24]>>>21,U=_[24]<<11|_[25]>>>21,_r=_[34]<<15|_[35]>>>17,sr=_[35]<<15|_[34]>>>17,Q=_[45]<<29|_[44]>>>3,R=_[44]<<29|_[45]>>>3,F=_[6]<<28|_[7]>>>4,G=_[7]<<28|_[6]>>>4,Ar=_[17]<<23|_[16]>>>9,Sr=_[16]<<23|_[17]>>>9,Z=_[26]<<25|_[27]>>>7,$=_[27]<<25|_[26]>>>7,j=_[36]<<21|_[37]>>>11,q=_[37]<<21|_[36]>>>11,kr=_[47]<<24|_[46]>>>8,hr=_[46]<<24|_[47]>>>8,or=_[8]<<27|_[9]>>>5,ar=_[9]<<27|_[8]>>>5,I=_[18]<<20|_[19]>>>12,K=_[19]<<20|_[18]>>>12,vr=_[29]<<7|_[28]>>>25,gr=_[28]<<7|_[29]>>>25,rr=_[38]<<8|_[39]>>>24,er=_[39]<<8|_[38]>>>24,z=_[48]<<14|_[49]>>>18,D=_[49]<<14|_[48]>>>18,_[0]=b^~x&O,_[1]=w^~B&U,_[10]=F^~I&L,_[11]=G^~K&M,_[20]=V^~X&Z,_[21]=W^~Y&$,_[30]=or^~cr&ur,_[31]=ar^~fr&ir,_[40]=dr^~Ar&vr,_[41]=lr^~Sr&gr,_[2]=x^~O&j,_[3]=B^~U&q,_[12]=I^~L&N,_[13]=K^~M&P,_[22]=X^~Z&rr,_[23]=Y^~$&er,_[32]=cr^~ur&_r,_[33]=fr^~ir&sr,_[42]=Ar^~vr&Tr,_[43]=Sr^~gr&mr,_[4]=O^~j&z,_[5]=U^~q&D,_[14]=L^~N&Q,_[15]=M^~P&R,_[24]=Z^~rr&nr,_[25]=$^~er&tr,_[34]=ur^~_r&kr,_[35]=ir^~sr&hr,_[44]=vr^~Tr&pr,_[45]=gr^~mr&yr,_[6]=j^~z&b,_[7]=q^~D&w,_[16]=N^~Q&F,_[17]=P^~R&G,_[26]=rr^~nr&V,_[27]=er^~tr&W,_[36]=_r^~kr&or,_[37]=sr^~hr&ar,_[46]=Tr^~pr&dr,_[47]=mr^~yr&lr,_[8]=z^~b&x,_[9]=D^~w&B,_[18]=Q^~F&I,_[19]=R^~G&K,_[28]=nr^~V&X,_[29]=tr^~W&Y,_[38]=kr^~or&cr,_[39]=hr^~ar&fr,_[48]=pr^~dr&Ar,_[49]=yr^~lr&Sr,_[0]^=u[d],_[1]^=u[d+1]}while(!Cr);var xr="";if(t)b=_[0],w=_[1],x=_[2],B=_[3],O=_[4],U=_[5],j=_[6],q=_[7],z=_[8],D=_[9],F=_[10],G=_[11],I=_[12],K=_[13],L=_[14],M=_[15],xr+=o[b>>4&15]+o[15&b]+o[b>>12&15]+o[b>>8&15]+o[b>>20&15]+o[b>>16&15]+o[b>>28&15]+o[b>>24&15]+o[w>>4&15]+o[15&w]+o[w>>12&15]+o[w>>8&15]+o[w>>20&15]+o[w>>16&15]+o[w>>28&15]+o[w>>24&15]+o[x>>4&15]+o[15&x]+o[x>>12&15]+o[x>>8&15]+o[x>>20&15]+o[x>>16&15]+o[x>>28&15]+o[x>>24&15]+o[B>>4&15]+o[15&B]+o[B>>12&15]+o[B>>8&15]+o[B>>20&15]+o[B>>16&15]+o[B>>28&15]+o[B>>24&15]+o[O>>4&15]+o[15&O]+o[O>>12&15]+o[O>>8&15]+o[O>>20&15]+o[O>>16&15]+o[O>>28&15]+o[O>>24&15]+o[U>>4&15]+o[15&U]+o[U>>12&15]+o[U>>8&15]+o[U>>20&15]+o[U>>16&15]+o[U>>28&15]+o[U>>24&15]+o[j>>4&15]+o[15&j]+o[j>>12&15]+o[j>>8&15]+o[j>>20&15]+o[j>>16&15]+o[j>>28&15]+o[j>>24&15],n>=256&&(xr+=o[q>>4&15]+o[15&q]+o[q>>12&15]+o[q>>8&15]+o[q>>20&15]+o[q>>16&15]+o[q>>28&15]+o[q>>24&15]),n>=384&&(xr+=o[z>>4&15]+o[15&z]+o[z>>12&15]+o[z>>8&15]+o[z>>20&15]+o[z>>16&15]+o[z>>28&15]+o[z>>24&15]+o[D>>4&15]+o[15&D]+o[D>>12&15]+o[D>>8&15]+o[D>>20&15]+o[D>>16&15]+o[D>>28&15]+o[D>>24&15]+o[F>>4&15]+o[15&F]+o[F>>12&15]+o[F>>8&15]+o[F>>20&15]+o[F>>16&15]+o[F>>28&15]+o[F>>24&15]+o[G>>4&15]+o[15&G]+o[G>>12&15]+o[G>>8&15]+o[G>>20&15]+o[G>>16&15]+o[G>>28&15]+o[G>>24&15]),512==n&&(xr+=o[I>>4&15]+o[15&I]+o[I>>12&15]+o[I>>8&15]+o[I>>20&15]+o[I>>16&15]+o[I>>28&15]+o[I>>24&15]+o[K>>4&15]+o[15&K]+o[K>>12&15]+o[K>>8&15]+o[K>>20&15]+o[K>>16&15]+o[K>>28&15]+o[K>>24&15]+o[L>>4&15]+o[15&L]+o[L>>12&15]+o[L>>8&15]+o[L>>20&15]+o[L>>16&15]+o[L>>28&15]+o[L>>24&15]+o[M>>4&15]+o[15&M]+o[M>>12&15]+o[M>>8&15]+o[M>>20&15]+o[M>>16&15]+o[M>>28&15]+o[M>>24&15]);else for(l=0,d=n/32;l<d;++l)A=_[l],xr+=o[A>>4&15]+o[15&A]+o[A>>12&15]+o[A>>8&15]+o[A>>20&15]+o[A>>16&15]+o[A>>28&15]+o[A>>24&15];return xr};!r.JS_SHA3_TEST&&n?module.exports={sha3_512:S,sha3_384:A,sha3_256:l,sha3_224:d,keccak_512:v,keccak_384:h,keccak_256:k,keccak_224:s}:r&&(r.sha3_512=S,r.sha3_384=A,r.sha3_256=l,r.sha3_224=d,r.keccak_512=v,r.keccak_384=h,r.keccak_256=k,r.keccak_224=s)}(this);
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],56:[function(require,module,exports){
+"use strict";module.exports=require("./lib/api")(require("./lib/keccak"));
+
+},{"./lib/api":57,"./lib/keccak":61}],57:[function(require,module,exports){
+"use strict";var createKeccak=require("./keccak"),createShake=require("./shake");module.exports=function(e){var r=createKeccak(e),a=createShake(e);return function(e,c){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new r(1152,448,null,224,c);case"keccak256":return new r(1088,512,null,256,c);case"keccak384":return new r(832,768,null,384,c);case"keccak512":return new r(576,1024,null,512,c);case"sha3-224":return new r(1152,448,6,224,c);case"sha3-256":return new r(1088,512,6,256,c);case"sha3-384":return new r(832,768,6,384,c);case"sha3-512":return new r(576,1024,6,512,c);case"shake128":return new a(1344,256,31,c);case"shake256":return new a(1088,512,31,c);default:throw new Error("Invald algorithm: "+e)}}};
+
+},{"./keccak":58,"./shake":59}],58:[function(require,module,exports){
+"use strict";var Buffer=require("safe-buffer").Buffer,Transform=require("stream").Transform,inherits=require("inherits");module.exports=function(t){function i(i,e,r,s,a){Transform.call(this,a),this._rate=i,this._capacity=e,this._delimitedSuffix=r,this._hashBitLength=s,this._options=a,this._state=new t,this._state.initialize(i,e),this._finalized=!1}return inherits(i,Transform),i.prototype._transform=function(t,i,e){var r=null;try{this.update(t,i)}catch(t){r=t}e(r)},i.prototype._flush=function(t){var i=null;try{this.push(this.digest())}catch(t){i=t}t(i)},i.prototype.update=function(t,i){if(!Buffer.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");return Buffer.isBuffer(t)||(t=Buffer.from(t,i)),this._state.absorb(t),this},i.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);var i=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(i=i.toString(t)),this._resetState(),i},i.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},i.prototype._clone=function(){var t=new i(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t},i};
+
+},{"inherits":51,"safe-buffer":82,"stream":97}],59:[function(require,module,exports){
+"use strict";var Buffer=require("safe-buffer").Buffer,Transform=require("stream").Transform,inherits=require("inherits");module.exports=function(t){function i(i,e,r,s){Transform.call(this,s),this._rate=i,this._capacity=e,this._delimitedSuffix=r,this._options=s,this._state=new t,this._state.initialize(i,e),this._finalized=!1}return inherits(i,Transform),i.prototype._transform=function(t,i,e){var r=null;try{this.update(t,i)}catch(t){r=t}e(r)},i.prototype._flush=function(){},i.prototype._read=function(t){this.push(this.squeeze(t))},i.prototype.update=function(t,i){if(!Buffer.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(t)||(t=Buffer.from(t,i)),this._state.absorb(t),this},i.prototype.squeeze=function(t,i){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));var e=this._state.squeeze(t);return void 0!==i&&(e=e.toString(i)),e},i.prototype._resetState=function(){return this._state.initialize(this._rate,this._capacity),this},i.prototype._clone=function(){var t=new i(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t},i};
+
+},{"inherits":51,"safe-buffer":82,"stream":97}],60:[function(require,module,exports){
+"use strict";var P1600_ROUND_CONSTANTS=[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];exports.p1600=function(r){for(var N=0;N<24;++N){var a=r[0]^r[10]^r[20]^r[30]^r[40],v=r[1]^r[11]^r[21]^r[31]^r[41],O=r[2]^r[12]^r[22]^r[32]^r[42],S=r[3]^r[13]^r[23]^r[33]^r[43],T=r[4]^r[14]^r[24]^r[34]^r[44],_=r[5]^r[15]^r[25]^r[35]^r[45],t=r[6]^r[16]^r[26]^r[36]^r[46],o=r[7]^r[17]^r[27]^r[37]^r[47],s=r[8]^r[18]^r[28]^r[38]^r[48],A=r[9]^r[19]^r[29]^r[39]^r[49],C=s^(O<<1|S>>>31),D=A^(S<<1|O>>>31),P=r[0]^C,R=r[1]^D,U=r[10]^C,c=r[11]^D,e=r[20]^C,f=r[21]^D,i=r[30]^C,n=r[31]^D,p=r[40]^C,u=r[41]^D;C=a^(T<<1|_>>>31),D=v^(_<<1|T>>>31);var x=r[2]^C,b=r[3]^D,d=r[12]^C,g=r[13]^D,h=r[22]^C,j=r[23]^D,k=r[32]^C,l=r[33]^D,m=r[42]^C,q=r[43]^D;C=O^(t<<1|o>>>31),D=S^(o<<1|t>>>31);var w=r[4]^C,y=r[5]^D,z=r[14]^C,B=r[15]^D,E=r[24]^C,F=r[25]^D,G=r[34]^C,H=r[35]^D,I=r[44]^C,J=r[45]^D;C=T^(s<<1|A>>>31),D=_^(A<<1|s>>>31);var K=r[6]^C,L=r[7]^D,M=r[16]^C,Q=r[17]^D,V=r[26]^C,W=r[27]^D,X=r[36]^C,Y=r[37]^D,Z=r[46]^C,$=r[47]^D;C=t^(a<<1|v>>>31),D=o^(v<<1|a>>>31);var rr=r[8]^C,Nr=r[9]^D,ar=r[18]^C,vr=r[19]^D,Or=r[28]^C,Sr=r[29]^D,Tr=r[38]^C,_r=r[39]^D,tr=r[48]^C,or=r[49]^D,sr=P,Ar=R,Cr=c<<4|U>>>28,Dr=U<<4|c>>>28,Pr=e<<3|f>>>29,Rr=f<<3|e>>>29,Ur=n<<9|i>>>23,cr=i<<9|n>>>23,er=p<<18|u>>>14,fr=u<<18|p>>>14,ir=x<<1|b>>>31,nr=b<<1|x>>>31,pr=g<<12|d>>>20,ur=d<<12|g>>>20,xr=h<<10|j>>>22,br=j<<10|h>>>22,dr=l<<13|k>>>19,gr=k<<13|l>>>19,hr=m<<2|q>>>30,jr=q<<2|m>>>30,kr=y<<30|w>>>2,lr=w<<30|y>>>2,mr=z<<6|B>>>26,qr=B<<6|z>>>26,wr=F<<11|E>>>21,yr=E<<11|F>>>21,zr=G<<15|H>>>17,Br=H<<15|G>>>17,Er=J<<29|I>>>3,Fr=I<<29|J>>>3,Gr=K<<28|L>>>4,Hr=L<<28|K>>>4,Ir=Q<<23|M>>>9,Jr=M<<23|Q>>>9,Kr=V<<25|W>>>7,Lr=W<<25|V>>>7,Mr=X<<21|Y>>>11,Qr=Y<<21|X>>>11,Vr=$<<24|Z>>>8,Wr=Z<<24|$>>>8,Xr=rr<<27|Nr>>>5,Yr=Nr<<27|rr>>>5,Zr=ar<<20|vr>>>12,$r=vr<<20|ar>>>12,rN=Sr<<7|Or>>>25,NN=Or<<7|Sr>>>25,aN=Tr<<8|_r>>>24,vN=_r<<8|Tr>>>24,ON=tr<<14|or>>>18,SN=or<<14|tr>>>18;r[0]=sr^~pr&wr,r[1]=Ar^~ur&yr,r[10]=Gr^~Zr&Pr,r[11]=Hr^~$r&Rr,r[20]=ir^~mr&Kr,r[21]=nr^~qr&Lr,r[30]=Xr^~Cr&xr,r[31]=Yr^~Dr&br,r[40]=kr^~Ir&rN,r[41]=lr^~Jr&NN,r[2]=pr^~wr&Mr,r[3]=ur^~yr&Qr,r[12]=Zr^~Pr&dr,r[13]=$r^~Rr&gr,r[22]=mr^~Kr&aN,r[23]=qr^~Lr&vN,r[32]=Cr^~xr&zr,r[33]=Dr^~br&Br,r[42]=Ir^~rN&Ur,r[43]=Jr^~NN&cr,r[4]=wr^~Mr&ON,r[5]=yr^~Qr&SN,r[14]=Pr^~dr&Er,r[15]=Rr^~gr&Fr,r[24]=Kr^~aN&er,r[25]=Lr^~vN&fr,r[34]=xr^~zr&Vr,r[35]=br^~Br&Wr,r[44]=rN^~Ur&hr,r[45]=NN^~cr&jr,r[6]=Mr^~ON&sr,r[7]=Qr^~SN&Ar,r[16]=dr^~Er&Gr,r[17]=gr^~Fr&Hr,r[26]=aN^~er&ir,r[27]=vN^~fr&nr,r[36]=zr^~Vr&Xr,r[37]=Br^~Wr&Yr,r[46]=Ur^~hr&kr,r[47]=cr^~jr&lr,r[8]=ON^~sr&pr,r[9]=SN^~Ar&ur,r[18]=Er^~Gr&Zr,r[19]=Fr^~Hr&$r,r[28]=er^~ir&mr,r[29]=fr^~nr&qr,r[38]=Vr^~Xr&Cr,r[39]=Wr^~Yr&Dr,r[48]=hr^~kr&Ir,r[49]=jr^~lr&Jr,r[0]^=P1600_ROUND_CONSTANTS[2*N],r[1]^=P1600_ROUND_CONSTANTS[2*N+1]}};
+
+},{}],61:[function(require,module,exports){
+"use strict";function Keccak(){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}var Buffer=require("safe-buffer").Buffer,keccakState=require("./keccak-state-unroll");Keccak.prototype.initialize=function(t,e){for(var s=0;s<50;++s)this.state[s]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},Keccak.prototype.absorb=function(t){for(var e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(keccakState.p1600(this.state),this.count=0)},Keccak.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!=(128&t)&&this.count===this.blockSize-1&&keccakState.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,keccakState.p1600(this.state),this.count=0,this.squeezing=!0},Keccak.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);for(var e=Buffer.alloc(t),s=0;s<t;++s)e[s]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(keccakState.p1600(this.state),this.count=0);return e},Keccak.prototype.copy=function(t){for(var e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},module.exports=Keccak;
+
+},{"./keccak-state-unroll":60,"safe-buffer":82}],62:[function(require,module,exports){
+module.exports=require("browserify-sha3").SHA3Hash;
+
+},{"browserify-sha3":7}],63:[function(require,module,exports){
+function assert(r,e){if(!r)throw new Error(e||"Assertion failed")}module.exports=assert,assert.equal=function(r,e,s){if(r!=e)throw new Error(s||"Assertion failed: "+r+" != "+e)};
+
+},{}],64:[function(require,module,exports){
+"use strict";function toArray(r,t){if(Array.isArray(r))return r.slice();if(!r)return[];var e=[];if("string"!=typeof r){for(n=0;n<r.length;n++)e[n]=0|r[n];return e}if("hex"===t){(r=r.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(r="0"+r);for(n=0;n<r.length;n+=2)e.push(parseInt(r[n]+r[n+1],16))}else for(var n=0;n<r.length;n++){var o=r.charCodeAt(n),u=o>>8,i=255&o;u?e.push(u,i):e.push(i)}return e}function zero2(r){return 1===r.length?"0"+r:r}function toHex(r){for(var t="",e=0;e<r.length;e++)t+=zero2(r[e].toString(16));return t}var utils=exports;utils.toArray=toArray,utils.zero2=zero2,utils.toHex=toHex,utils.encode=function(r,t){return"hex"===t?toHex(r):r};
+
+},{}],65:[function(require,module,exports){
+(function (process){
+"use strict";function nextTick(e,n,c,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,t,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,n)});case 3:return process.nextTick(function(){e.call(null,n,c)});case 4:return process.nextTick(function(){e.call(null,n,c,r)});default:for(s=new Array(o-1),t=0;t<s.length;)s[t++]=arguments[t];return process.nextTick(function(){e.apply(null,s)})}}!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?module.exports=nextTick:module.exports=process.nextTick;
+
+}).call(this,require('_process'))
+},{"_process":66}],66:[function(require,module,exports){
+function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}var process=module.exports={},cachedSetTimeout,cachedClearTimeout;!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var queue=[],draining=!1,currentQueue,queueIndex=-1;process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(e){return[]},process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};
+
+},{}],67:[function(require,module,exports){
+module.exports=require("./lib/_stream_duplex.js");
+
+},{"./lib/_stream_duplex.js":68}],68:[function(require,module,exports){
+"use strict";function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);Readable.call(this,e),Writable.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",onend)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(e){e.end()}function forEach(e,t){for(var r=0,i=e.length;r<i;r++)t(e[r],r)}var processNextTick=require("process-nextick-args"),objectKeys=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};module.exports=Duplex;var util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Duplex.prototype._destroy=function(e,t){this.push(null),this.end(),processNextTick(t,e)};
+
+},{"./_stream_readable":70,"./_stream_writable":72,"core-util-is":10,"inherits":51,"process-nextick-args":65}],69:[function(require,module,exports){
+"use strict";function PassThrough(r){if(!(this instanceof PassThrough))return new PassThrough(r);Transform.call(this,r)}module.exports=PassThrough;var Transform=require("./_stream_transform"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(r,s,i){i(null,r)};
+
+},{"./_stream_transform":71,"core-util-is":10,"inherits":51}],70:[function(require,module,exports){
+(function (process,global){
+"use strict";function _uint8ArrayToBuffer(e){return Buffer.from(e)}function _isUint8Array(e){return Buffer.isBuffer(e)||e instanceof OurUint8Array}function prependListener(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function ReadableState(e,t){Duplex=Duplex||require("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,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&&(StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(e.encoding),this.encoding=e.encoding)}function Readable(e){if(Duplex=Duplex||require("./_stream_duplex"),!(this instanceof Readable))return new Readable(e);this._readableState=new ReadableState(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),Stream.call(this)}function readableAddChunk(e,t,r,n,a){var i=e._readableState;if(null===t)i.reading=!1,onEofChunk(e,i);else{var d;a||(d=chunkInvalid(i,t)),d?e.emit("error",d):i.objectMode||t&&t.length>0?("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===Buffer.prototype||(t=_uint8ArrayToBuffer(t)),n?i.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):addChunk(e,i,t,!0):i.ended?e.emit("error",new Error("stream.push() after EOF")):(i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?addChunk(e,i,t,!1):maybeReadMore(e,i)):addChunk(e,i,t,!1))):n||(i.reading=!1)}return needMoreData(i)}function addChunk(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&emitReadable(e)),maybeReadMore(e,t)}function chunkInvalid(e,t){var r;return _isUint8Array(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function computeNewHighWaterMark(e){return e>=MAX_HWM?e=MAX_HWM:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function howMuchToRead(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=computeNewHighWaterMark(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function onEofChunk(e,t){if(!t.ended){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,emitReadable(e)}}function emitReadable(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(debug("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?processNextTick(emitReadable_,e):emitReadable_(e))}function emitReadable_(e){debug("emit readable"),e.emit("readable"),flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,processNextTick(maybeReadMore_,e,t))}function maybeReadMore_(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(debug("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function pipeOnDrain(e){return function(){var t=e._readableState;debug("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&EElistenerCount(e,"data")&&(t.flowing=!0,flow(e))}}function nReadingNextTick(e){debug("readable nexttick read 0"),e.read(0)}function resume(e,t){t.resumeScheduled||(t.resumeScheduled=!0,processNextTick(resume_,e,t))}function resume_(e,t){t.reading||(debug("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),flow(e),t.flowing&&!t.reading&&e.read(0)}function flow(e){var t=e._readableState;for(debug("flow",t.flowing);t.flowing&&null!==e.read(););}function fromList(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=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=fromListPartial(e,t.buffer,t.decoder),r}function fromListPartial(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?copyFromBufferString(e,t):copyFromBuffer(e,t),n}function copyFromBufferString(e,t){var r=t.head,n=1,a=r.data;for(e-=a.length;r=r.next;){var i=r.data,d=e>i.length?i.length:e;if(d===i.length?a+=i:a+=i.slice(0,e),0===(e-=d)){d===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(d));break}++n}return t.length-=n,a}function copyFromBuffer(e,t){var r=Buffer.allocUnsafe(e),n=t.head,a=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var i=n.data,d=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,d),0===(e-=d)){d===i.length?(++a,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(d));break}++a}return t.length-=a,r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,processNextTick(endReadableNT,t,e))}function endReadableNT(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function forEach(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}function indexOf(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}var processNextTick=require("process-nextick-args");module.exports=Readable;var isArray=require("isarray"),Duplex;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter,EElistenerCount=function(e,t){return e.listeners(t).length},Stream=require("./internal/streams/stream"),Buffer=require("safe-buffer").Buffer,OurUint8Array=global.Uint8Array||function(){},util=require("core-util-is");util.inherits=require("inherits");var debugUtil=require("util"),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var BufferList=require("./internal/streams/BufferList"),destroyImpl=require("./internal/streams/destroy"),StringDecoder;util.inherits(Readable,Stream);var kProxyEvents=["error","close","destroy","pause","resume"];Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),Readable.prototype.destroy=destroyImpl.destroy,Readable.prototype._undestroy=destroyImpl.undestroy,Readable.prototype._destroy=function(e,t){this.push(null),t(e)},Readable.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=Buffer.from(e,t),t=""),r=!0),readableAddChunk(this,e,t,!1,r)},Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(e){return StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this._readableState.decoder=new StringDecoder(e),this._readableState.encoding=e,this};var MAX_HWM=8388608;Readable.prototype.read=function(e){debug("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return debug("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?endReadable(this):emitReadable(this),null;if(0===(e=howMuchToRead(e,t))&&t.ended)return 0===t.length&&endReadable(this),null;var n=t.needReadable;debug("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&debug("length less than watermark",n=!0),t.ended||t.reading?debug("reading or ended",n=!1):n&&(debug("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=howMuchToRead(r,t)));var a;return null===(a=e>0?fromList(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&endReadable(this)),null!==a&&this.emit("data",a),a},Readable.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(e,t){function r(e,t){debug("onunpipe"),e===l&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,a())}function n(){debug("onend"),e.end()}function a(){debug("cleanup"),e.removeListener("close",o),e.removeListener("finish",u),e.removeListener("drain",p),e.removeListener("error",d),e.removeListener("unpipe",r),l.removeListener("end",n),l.removeListener("end",s),l.removeListener("data",i),c=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||p()}function i(t){debug("ondata"),b=!1,!1!==e.write(t)||b||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&-1!==indexOf(h.pipes,e))&&!c&&(debug("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,b=!0),l.pause())}function d(t){debug("onerror",t),s(),e.removeListener("error",d),0===EElistenerCount(e,"error")&&e.emit("error",t)}function o(){e.removeListener("finish",u),s()}function u(){debug("onfinish"),e.removeListener("close",o),s()}function s(){debug("unpipe"),l.unpipe(e)}var l=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,debug("pipe count=%d opts=%j",h.pipesCount,t);var f=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?n:s;h.endEmitted?processNextTick(f):l.once("end",f),e.on("unpipe",r);var p=pipeOnDrain(l);e.on("drain",p);var c=!1,b=!1;return l.on("data",i),prependListener(e,"error",d),e.once("close",o),e.once("finish",u),e.emit("pipe",l),h.flowing||(debug("pipe resume"),l.resume()),e},Readable.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?this:(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,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<a;i++)n[i].emit("unpipe",this,r);return this}var d=indexOf(t.pipes,e);return-1===d?this:(t.pipes.splice(d,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},Readable.prototype.on=function(e,t){var r=Stream.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&emitReadable(this):processNextTick(nReadingNextTick,this))}return r},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var e=this._readableState;return e.flowing||(debug("resume"),e.flowing=!0,resume(this,e)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(debug("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(a){debug("wrapped data"),t.decoder&&(a=t.decoder.write(a)),(!t.objectMode||null!==a&&void 0!==a)&&(t.objectMode||a&&a.length)&&(n.push(a)||(r=!0,e.pause()))});for(var a in e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var i=0;i<kProxyEvents.length;i++)e.on(kProxyEvents[i],n.emit.bind(n,kProxyEvents[i]));return n._read=function(t){debug("wrapped _read",t),r&&(r=!1,e.resume())},n},Readable._fromList=fromList;
+
+}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"./_stream_duplex":68,"./internal/streams/BufferList":73,"./internal/streams/destroy":74,"./internal/streams/stream":75,"_process":66,"core-util-is":10,"events":35,"inherits":51,"isarray":54,"process-nextick-args":65,"safe-buffer":82,"string_decoder/":98,"util":6}],71:[function(require,module,exports){
+"use strict";function TransformState(r){this.afterTransform=function(t,n){return afterTransform(r,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(r,t,n){var e=r._transformState;e.transforming=!1;var i=e.writecb;if(!i)return r.emit("error",new Error("write callback called multiple times"));e.writechunk=null,e.writecb=null,null!==n&&void 0!==n&&r.push(n),i(t);var a=r._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&r._read(a.highWaterMark)}function Transform(r){if(!(this instanceof Transform))return new Transform(r);Duplex.call(this,r),this._transformState=new TransformState(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,r&&("function"==typeof r.transform&&(this._transform=r.transform),"function"==typeof r.flush&&(this._flush=r.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(r,n){done(t,r,n)}):done(t)})}function done(r,t,n){if(t)return r.emit("error",t);null!==n&&void 0!==n&&r.push(n);var e=r._writableState,i=r._transformState;if(e.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return r.push(null)}module.exports=Transform;var Duplex=require("./_stream_duplex"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(Transform,Duplex),Transform.prototype.push=function(r,t){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,r,t)},Transform.prototype._transform=function(r,t,n){throw new Error("_transform() is not implemented")},Transform.prototype._write=function(r,t,n){var e=this._transformState;if(e.writecb=n,e.writechunk=r,e.writeencoding=t,!e.transforming){var i=this._readableState;(e.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Transform.prototype._read=function(r){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},Transform.prototype._destroy=function(r,t){var n=this;Duplex.prototype._destroy.call(this,r,function(r){t(r),n.emit("close")})};
+
+},{"./_stream_duplex":68,"core-util-is":10,"inherits":51}],72:[function(require,module,exports){
+(function (process,global){
+"use strict";function WriteReq(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function CorkedRequest(e){var t=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(t,e)}}function _uint8ArrayToBuffer(e){return Buffer.from(e)}function _isUint8Array(e){return Buffer.isBuffer(e)||e instanceof OurUint8Array}function nop(){}function WritableState(e,t){Duplex=Duplex||require("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,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 n=!1===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){onwrite(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 CorkedRequest(this)}function Writable(e){if(Duplex=Duplex||require("./_stream_duplex"),!(realHasInstance.call(Writable,this)||this instanceof Duplex))return new Writable(e);this._writableState=new WritableState(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)),Stream.call(this)}function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r),processNextTick(t,r)}function validChunk(e,t,r,i){var n=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),processNextTick(i,o),n=!1),n}function decodeChunk(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=Buffer.from(t,r)),t}function writeOrBuffer(e,t,r,i,n,o){if(!r){var s=decodeChunk(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var a=t.objectMode?1:i.length;t.length+=a;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else doWrite(e,t,!1,a,i,n,o);return f}function doWrite(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function onwriteError(e,t,r,i,n){--t.pendingcb,r?(processNextTick(n,i),processNextTick(finishMaybe,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),finishMaybe(e,t))}function onwriteStateUpdate(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function onwrite(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(onwriteStateUpdate(r),t)onwriteError(e,r,i,t,n);else{var o=needFinish(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||clearBuffer(e,r),i?asyncWrite(afterWrite,e,r,o,n):afterWrite(e,r,o,n)}}function afterWrite(e,t,r,i){r||onwriteDrain(e,t),t.pendingcb--,i(),finishMaybe(e,t)}function onwriteDrain(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function clearBuffer(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var s=0,a=!0;r;)n[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;n.allBuffers=a,doWrite(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new CorkedRequest(t)}else{for(;r;){var f=r.chunk,u=r.encoding,l=r.callback;if(doWrite(e,t,!1,t.objectMode?1:f.length,f,u,l),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function needFinish(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function callFinal(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),finishMaybe(e,t)})}function prefinish(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,processNextTick(callFinal,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function finishMaybe(e,t){var r=needFinish(t);return r&&(prefinish(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}function endWritable(e,t,r){t.ending=!0,finishMaybe(e,t),r&&(t.finished?processNextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function onCorkedFinish(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}var processNextTick=require("process-nextick-args");module.exports=Writable;var asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick,Duplex;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")},Stream=require("./internal/streams/stream"),Buffer=require("safe-buffer").Buffer,OurUint8Array=global.Uint8Array||function(){},destroyImpl=require("./internal/streams/destroy");util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){return!!realHasInstance.call(this,e)||e&&e._writableState instanceof WritableState}})):realHasInstance=function(e){return e instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(e,t,r){var i=this._writableState,n=!1,o=_isUint8Array(e)&&!i.objectMode;return o&&!Buffer.isBuffer(e)&&(e=_uint8ArrayToBuffer(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=nop),i.ended?writeAfterEnd(this,r):(o||validChunk(this,i,e,r))&&(i.pendingcb++,n=writeOrBuffer(this,i,o,e,t,r)),n},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||clearBuffer(this,e))},Writable.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Writable.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||endWritable(this,i,r)},Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(e,t){this.end(),t(e)};
+
+}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"./_stream_duplex":68,"./internal/streams/destroy":74,"./internal/streams/stream":75,"_process":66,"core-util-is":10,"inherits":51,"process-nextick-args":65,"safe-buffer":82,"util-deprecate":100}],73:[function(require,module,exports){
+"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function copyBuffer(t,e,h){t.copy(e,h)}var Buffer=require("safe-buffer").Buffer;module.exports=function(){function t(){_classCallCheck(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,h=""+e.data;e=e.next;)h+=t+e.data;return h},t.prototype.concat=function(t){if(0===this.length)return Buffer.alloc(0);if(1===this.length)return this.head.data;for(var e=Buffer.allocUnsafe(t>>>0),h=this.head,n=0;h;)copyBuffer(h.data,e,n),n+=h.data.length,h=h.next;return e},t}();
+
+},{"safe-buffer":82}],74:[function(require,module,exports){
+"use strict";function destroy(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;i||a?e?e(t):!t||this._writableState&&this._writableState.errorEmitted||processNextTick(emitErrorNT,this,t):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(processNextTick(emitErrorNT,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}))}function undestroy(){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)}function emitErrorNT(t,e){t.emit("error",e)}var processNextTick=require("process-nextick-args");module.exports={destroy:destroy,undestroy:undestroy};
+
+},{"process-nextick-args":65}],75:[function(require,module,exports){
+module.exports=require("events").EventEmitter;
+
+},{"events":35}],76:[function(require,module,exports){
+module.exports=require("./readable").PassThrough;
+
+},{"./readable":77}],77:[function(require,module,exports){
+exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=exports,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js");
+
+},{"./lib/_stream_duplex.js":68,"./lib/_stream_passthrough.js":69,"./lib/_stream_readable.js":70,"./lib/_stream_transform.js":71,"./lib/_stream_writable.js":72}],78:[function(require,module,exports){
+module.exports=require("./readable").Transform;
+
+},{"./readable":77}],79:[function(require,module,exports){
+module.exports=require("./lib/_stream_writable.js");
+
+},{"./lib/_stream_writable.js":72}],80:[function(require,module,exports){
+(function (Buffer){
+"use strict";function RIPEMD160(){HashBase.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function rotl(t,r){return t<<r|t>>>32-r}function fn1(t,r,n,o,f,l,i,s){return rotl(t+(r^n^o)+l+i|0,s)+f|0}function fn2(t,r,n,o,f,l,i,s){return rotl(t+(r&n|~r&o)+l+i|0,s)+f|0}function fn3(t,r,n,o,f,l,i,s){return rotl(t+((r|~n)^o)+l+i|0,s)+f|0}function fn4(t,r,n,o,f,l,i,s){return rotl(t+(r&o|n&~o)+l+i|0,s)+f|0}function fn5(t,r,n,o,f,l,i,s){return rotl(t+(r^(n|~o))+l+i|0,s)+f|0}var inherits=require("inherits"),HashBase=require("hash-base");inherits(RIPEMD160,HashBase),RIPEMD160.prototype._update=function(){for(var t=new Array(16),r=0;r<16;++r)t[r]=this._block.readInt32LE(4*r);var n=this._a,o=this._b,f=this._c,l=this._d,i=this._e;i=fn1(i,n=fn1(n,o,f,l,i,t[0],0,11),o,f=rotl(f,10),l,t[1],0,14),o=fn1(o=rotl(o,10),f=fn1(f,l=fn1(l,i,n,o,f,t[2],0,15),i,n=rotl(n,10),o,t[3],0,12),l,i=rotl(i,10),n,t[4],0,5),l=fn1(l=rotl(l,10),i=fn1(i,n=fn1(n,o,f,l,i,t[5],0,8),o,f=rotl(f,10),l,t[6],0,7),n,o=rotl(o,10),f,t[7],0,9),n=fn1(n=rotl(n,10),o=fn1(o,f=fn1(f,l,i,n,o,t[8],0,11),l,i=rotl(i,10),n,t[9],0,13),f,l=rotl(l,10),i,t[10],0,14),f=fn1(f=rotl(f,10),l=fn1(l,i=fn1(i,n,o,f,l,t[11],0,15),n,o=rotl(o,10),f,t[12],0,6),i,n=rotl(n,10),o,t[13],0,7),i=fn2(i=rotl(i,10),n=fn1(n,o=fn1(o,f,l,i,n,t[14],0,9),f,l=rotl(l,10),i,t[15],0,8),o,f=rotl(f,10),l,t[7],1518500249,7),o=fn2(o=rotl(o,10),f=fn2(f,l=fn2(l,i,n,o,f,t[4],1518500249,6),i,n=rotl(n,10),o,t[13],1518500249,8),l,i=rotl(i,10),n,t[1],1518500249,13),l=fn2(l=rotl(l,10),i=fn2(i,n=fn2(n,o,f,l,i,t[10],1518500249,11),o,f=rotl(f,10),l,t[6],1518500249,9),n,o=rotl(o,10),f,t[15],1518500249,7),n=fn2(n=rotl(n,10),o=fn2(o,f=fn2(f,l,i,n,o,t[3],1518500249,15),l,i=rotl(i,10),n,t[12],1518500249,7),f,l=rotl(l,10),i,t[0],1518500249,12),f=fn2(f=rotl(f,10),l=fn2(l,i=fn2(i,n,o,f,l,t[9],1518500249,15),n,o=rotl(o,10),f,t[5],1518500249,9),i,n=rotl(n,10),o,t[2],1518500249,11),i=fn2(i=rotl(i,10),n=fn2(n,o=fn2(o,f,l,i,n,t[14],1518500249,7),f,l=rotl(l,10),i,t[11],1518500249,13),o,f=rotl(f,10),l,t[8],1518500249,12),o=fn3(o=rotl(o,10),f=fn3(f,l=fn3(l,i,n,o,f,t[3],1859775393,11),i,n=rotl(n,10),o,t[10],1859775393,13),l,i=rotl(i,10),n,t[14],1859775393,6),l=fn3(l=rotl(l,10),i=fn3(i,n=fn3(n,o,f,l,i,t[4],1859775393,7),o,f=rotl(f,10),l,t[9],1859775393,14),n,o=rotl(o,10),f,t[15],1859775393,9),n=fn3(n=rotl(n,10),o=fn3(o,f=fn3(f,l,i,n,o,t[8],1859775393,13),l,i=rotl(i,10),n,t[1],1859775393,15),f,l=rotl(l,10),i,t[2],1859775393,14),f=fn3(f=rotl(f,10),l=fn3(l,i=fn3(i,n,o,f,l,t[7],1859775393,8),n,o=rotl(o,10),f,t[0],1859775393,13),i,n=rotl(n,10),o,t[6],1859775393,6),i=fn3(i=rotl(i,10),n=fn3(n,o=fn3(o,f,l,i,n,t[13],1859775393,5),f,l=rotl(l,10),i,t[11],1859775393,12),o,f=rotl(f,10),l,t[5],1859775393,7),o=fn4(o=rotl(o,10),f=fn4(f,l=fn3(l,i,n,o,f,t[12],1859775393,5),i,n=rotl(n,10),o,t[1],2400959708,11),l,i=rotl(i,10),n,t[9],2400959708,12),l=fn4(l=rotl(l,10),i=fn4(i,n=fn4(n,o,f,l,i,t[11],2400959708,14),o,f=rotl(f,10),l,t[10],2400959708,15),n,o=rotl(o,10),f,t[0],2400959708,14),n=fn4(n=rotl(n,10),o=fn4(o,f=fn4(f,l,i,n,o,t[8],2400959708,15),l,i=rotl(i,10),n,t[12],2400959708,9),f,l=rotl(l,10),i,t[4],2400959708,8),f=fn4(f=rotl(f,10),l=fn4(l,i=fn4(i,n,o,f,l,t[13],2400959708,9),n,o=rotl(o,10),f,t[3],2400959708,14),i,n=rotl(n,10),o,t[7],2400959708,5),i=fn4(i=rotl(i,10),n=fn4(n,o=fn4(o,f,l,i,n,t[15],2400959708,6),f,l=rotl(l,10),i,t[14],2400959708,8),o,f=rotl(f,10),l,t[5],2400959708,6),o=fn5(o=rotl(o,10),f=fn4(f,l=fn4(l,i,n,o,f,t[6],2400959708,5),i,n=rotl(n,10),o,t[2],2400959708,12),l,i=rotl(i,10),n,t[4],2840853838,9),l=fn5(l=rotl(l,10),i=fn5(i,n=fn5(n,o,f,l,i,t[0],2840853838,15),o,f=rotl(f,10),l,t[5],2840853838,5),n,o=rotl(o,10),f,t[9],2840853838,11),n=fn5(n=rotl(n,10),o=fn5(o,f=fn5(f,l,i,n,o,t[7],2840853838,6),l,i=rotl(i,10),n,t[12],2840853838,8),f,l=rotl(l,10),i,t[2],2840853838,13),f=fn5(f=rotl(f,10),l=fn5(l,i=fn5(i,n,o,f,l,t[10],2840853838,12),n,o=rotl(o,10),f,t[14],2840853838,5),i,n=rotl(n,10),o,t[1],2840853838,12),i=fn5(i=rotl(i,10),n=fn5(n,o=fn5(o,f,l,i,n,t[3],2840853838,13),f,l=rotl(l,10),i,t[8],2840853838,14),o,f=rotl(f,10),l,t[11],2840853838,11),o=fn5(o=rotl(o,10),f=fn5(f,l=fn5(l,i,n,o,f,t[6],2840853838,8),i,n=rotl(n,10),o,t[15],2840853838,5),l,i=rotl(i,10),n,t[13],2840853838,6),l=rotl(l,10);var s=this._a,h=this._b,e=this._c,_=this._d,c=this._e;c=fn5(c,s=fn5(s,h,e,_,c,t[5],1352829926,8),h,e=rotl(e,10),_,t[14],1352829926,9),h=fn5(h=rotl(h,10),e=fn5(e,_=fn5(_,c,s,h,e,t[7],1352829926,9),c,s=rotl(s,10),h,t[0],1352829926,11),_,c=rotl(c,10),s,t[9],1352829926,13),_=fn5(_=rotl(_,10),c=fn5(c,s=fn5(s,h,e,_,c,t[2],1352829926,15),h,e=rotl(e,10),_,t[11],1352829926,15),s,h=rotl(h,10),e,t[4],1352829926,5),s=fn5(s=rotl(s,10),h=fn5(h,e=fn5(e,_,c,s,h,t[13],1352829926,7),_,c=rotl(c,10),s,t[6],1352829926,7),e,_=rotl(_,10),c,t[15],1352829926,8),e=fn5(e=rotl(e,10),_=fn5(_,c=fn5(c,s,h,e,_,t[8],1352829926,11),s,h=rotl(h,10),e,t[1],1352829926,14),c,s=rotl(s,10),h,t[10],1352829926,14),c=fn4(c=rotl(c,10),s=fn5(s,h=fn5(h,e,_,c,s,t[3],1352829926,12),e,_=rotl(_,10),c,t[12],1352829926,6),h,e=rotl(e,10),_,t[6],1548603684,9),h=fn4(h=rotl(h,10),e=fn4(e,_=fn4(_,c,s,h,e,t[11],1548603684,13),c,s=rotl(s,10),h,t[3],1548603684,15),_,c=rotl(c,10),s,t[7],1548603684,7),_=fn4(_=rotl(_,10),c=fn4(c,s=fn4(s,h,e,_,c,t[0],1548603684,12),h,e=rotl(e,10),_,t[13],1548603684,8),s,h=rotl(h,10),e,t[5],1548603684,9),s=fn4(s=rotl(s,10),h=fn4(h,e=fn4(e,_,c,s,h,t[10],1548603684,11),_,c=rotl(c,10),s,t[14],1548603684,7),e,_=rotl(_,10),c,t[15],1548603684,7),e=fn4(e=rotl(e,10),_=fn4(_,c=fn4(c,s,h,e,_,t[8],1548603684,12),s,h=rotl(h,10),e,t[12],1548603684,7),c,s=rotl(s,10),h,t[4],1548603684,6),c=fn4(c=rotl(c,10),s=fn4(s,h=fn4(h,e,_,c,s,t[9],1548603684,15),e,_=rotl(_,10),c,t[1],1548603684,13),h,e=rotl(e,10),_,t[2],1548603684,11),h=fn3(h=rotl(h,10),e=fn3(e,_=fn3(_,c,s,h,e,t[15],1836072691,9),c,s=rotl(s,10),h,t[5],1836072691,7),_,c=rotl(c,10),s,t[1],1836072691,15),_=fn3(_=rotl(_,10),c=fn3(c,s=fn3(s,h,e,_,c,t[3],1836072691,11),h,e=rotl(e,10),_,t[7],1836072691,8),s,h=rotl(h,10),e,t[14],1836072691,6),s=fn3(s=rotl(s,10),h=fn3(h,e=fn3(e,_,c,s,h,t[6],1836072691,6),_,c=rotl(c,10),s,t[9],1836072691,14),e,_=rotl(_,10),c,t[11],1836072691,12),e=fn3(e=rotl(e,10),_=fn3(_,c=fn3(c,s,h,e,_,t[8],1836072691,13),s,h=rotl(h,10),e,t[12],1836072691,5),c,s=rotl(s,10),h,t[2],1836072691,14),c=fn3(c=rotl(c,10),s=fn3(s,h=fn3(h,e,_,c,s,t[10],1836072691,13),e,_=rotl(_,10),c,t[0],1836072691,13),h,e=rotl(e,10),_,t[4],1836072691,7),h=fn2(h=rotl(h,10),e=fn2(e,_=fn3(_,c,s,h,e,t[13],1836072691,5),c,s=rotl(s,10),h,t[8],2053994217,15),_,c=rotl(c,10),s,t[6],2053994217,5),_=fn2(_=rotl(_,10),c=fn2(c,s=fn2(s,h,e,_,c,t[4],2053994217,8),h,e=rotl(e,10),_,t[1],2053994217,11),s,h=rotl(h,10),e,t[3],2053994217,14),s=fn2(s=rotl(s,10),h=fn2(h,e=fn2(e,_,c,s,h,t[11],2053994217,14),_,c=rotl(c,10),s,t[15],2053994217,6),e,_=rotl(_,10),c,t[0],2053994217,14),e=fn2(e=rotl(e,10),_=fn2(_,c=fn2(c,s,h,e,_,t[5],2053994217,6),s,h=rotl(h,10),e,t[12],2053994217,9),c,s=rotl(s,10),h,t[2],2053994217,12),c=fn2(c=rotl(c,10),s=fn2(s,h=fn2(h,e,_,c,s,t[13],2053994217,9),e,_=rotl(_,10),c,t[9],2053994217,12),h,e=rotl(e,10),_,t[7],2053994217,5),h=fn1(h=rotl(h,10),e=fn2(e,_=fn2(_,c,s,h,e,t[10],2053994217,15),c,s=rotl(s,10),h,t[14],2053994217,8),_,c=rotl(c,10),s,t[12],0,8),_=fn1(_=rotl(_,10),c=fn1(c,s=fn1(s,h,e,_,c,t[15],0,5),h,e=rotl(e,10),_,t[10],0,12),s,h=rotl(h,10),e,t[4],0,9),s=fn1(s=rotl(s,10),h=fn1(h,e=fn1(e,_,c,s,h,t[1],0,12),_,c=rotl(c,10),s,t[5],0,5),e,_=rotl(_,10),c,t[8],0,14),e=fn1(e=rotl(e,10),_=fn1(_,c=fn1(c,s,h,e,_,t[7],0,6),s,h=rotl(h,10),e,t[6],0,8),c,s=rotl(s,10),h,t[2],0,13),c=fn1(c=rotl(c,10),s=fn1(s,h=fn1(h,e,_,c,s,t[13],0,6),e,_=rotl(_,10),c,t[14],0,5),h,e=rotl(e,10),_,t[0],0,15),h=fn1(h=rotl(h,10),e=fn1(e,_=fn1(_,c,s,h,e,t[3],0,13),c,s=rotl(s,10),h,t[9],0,11),_,c=rotl(c,10),s,t[11],0,11),_=rotl(_,10);var a=this._b+f+_|0;this._b=this._c+l+c|0,this._c=this._d+i+s|0,this._d=this._e+n+h|0,this._e=this._a+o+e|0,this._a=a},RIPEMD160.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 Buffer(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},module.exports=RIPEMD160;
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":8,"hash-base":36,"inherits":51}],81:[function(require,module,exports){
+(function (Buffer){
+function safeParseInt(e,r){if("00"===e.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(e,r)}function encodeLength(e,r){if(e<56)return new Buffer([e+r]);var n=intToHex(e),t=intToHex(r+55+n.length/2);return new Buffer(t+n,"hex")}function _decode(e){var r,n,t,i,f,a=[],o=e[0];if(o<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(o<=183){if(r=o-127,t=128===o?new Buffer([]):e.slice(1,r),2===r&&t[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:t,remainder:e.slice(r)}}if(o<=191){if(n=o-182,r=safeParseInt(e.slice(1,n).toString("hex"),16),(t=e.slice(n,r+n)).length<r)throw new Error("invalid RLP");return{data:t,remainder:e.slice(r+n)}}if(o<=247){for(r=o-191,i=e.slice(1,r);i.length;)f=_decode(i),a.push(f.data),i=f.remainder;return{data:a,remainder:e.slice(r)}}var u=(n=o-246)+(r=safeParseInt(e.slice(1,n).toString("hex"),16));if(u>e.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(i=e.slice(n,u)).length)throw new Error("invalid rlp, List has a invalid length");for(;i.length;)f=_decode(i),a.push(f.data),i=f.remainder;return{data:a,remainder:e.slice(u)}}function isHexPrefixed(e){return"0x"===e.slice(0,2)}function stripHexPrefix(e){return"string"!=typeof e?e:isHexPrefixed(e)?e.slice(2):e}function intToHex(e){var r=e.toString(16);return r.length%2&&(r="0"+r),r}function padToEven(e){return e.length%2&&(e="0"+e),e}function intToBuffer(e){var r=intToHex(e);return new Buffer(r,"hex")}function toBuffer(e){if(!Buffer.isBuffer(e))if("string"==typeof e)e=isHexPrefixed(e)?new Buffer(padToEven(stripHexPrefix(e)),"hex"):new Buffer(e);else if("number"==typeof e)e=e?intToBuffer(e):new Buffer([]);else if(null===e||void 0===e)e=new Buffer([]);else{if(!e.toArray)throw new Error("invalid type");e=new Buffer(e.toArray())}return e}const assert=require("assert");exports.encode=function(e){if(e instanceof Array){for(var r=[],n=0;n<e.length;n++)r.push(exports.encode(e[n]));var t=Buffer.concat(r);return Buffer.concat([encodeLength(t.length,192),t])}return 1===(e=toBuffer(e)).length&&e[0]<128?e:Buffer.concat([encodeLength(e.length,128),e])},exports.decode=function(e,r){if(!e||0===e.length)return new Buffer([]);var n=_decode(e=toBuffer(e));return r?n:(assert.equal(n.remainder.length,0,"invalid remainder"),n.data)},exports.getLength=function(e){if(!e||0===e.length)return new Buffer([]);var r=(e=toBuffer(e))[0];if(r<=127)return e.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;var n=r-246;return n+safeParseInt(e.slice(1,n).toString("hex"),16)};
+
+}).call(this,require("buffer").Buffer)
+},{"assert":1,"buffer":8}],82:[function(require,module,exports){
+function copyProps(f,r){for(var e in f)r[e]=f[e]}function SafeBuffer(f,r,e){return Buffer(f,r,e)}var buffer=require("buffer"),Buffer=buffer.Buffer;Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(f,r,e){if("number"==typeof f)throw new TypeError("Argument must not be a number");return Buffer(f,r,e)},SafeBuffer.alloc=function(f,r,e){if("number"!=typeof f)throw new TypeError("Argument must be a number");var u=Buffer(f);return void 0!==r?"string"==typeof e?u.fill(r,e):u.fill(r):u.fill(0),u},SafeBuffer.allocUnsafe=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return Buffer(f)},SafeBuffer.allocUnsafeSlow=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(f)};
+
+},{"buffer":8}],83:[function(require,module,exports){
+"use strict";module.exports=require("./lib")(require("./lib/elliptic"));
+
+},{"./lib":87,"./lib/elliptic":86}],84:[function(require,module,exports){
+(function (Buffer){
+"use strict";var toString=Object.prototype.toString;exports.isArray=function(r,t){if(!Array.isArray(r))throw TypeError(t)},exports.isBoolean=function(r,t){if("[object Boolean]"!==toString.call(r))throw TypeError(t)},exports.isBuffer=function(r,t){if(!Buffer.isBuffer(r))throw TypeError(t)},exports.isFunction=function(r,t){if("[object Function]"!==toString.call(r))throw TypeError(t)},exports.isNumber=function(r,t){if("[object Number]"!==toString.call(r))throw TypeError(t)},exports.isObject=function(r,t){if("[object Object]"!==toString.call(r))throw TypeError(t)},exports.isBufferLength=function(r,t,o){if(r.length!==t)throw RangeError(o)},exports.isBufferLength2=function(r,t,o,e){if(r.length!==t&&r.length!==o)throw RangeError(e)},exports.isLengthGTZero=function(r,t){if(0===r.length)throw RangeError(t)},exports.isNumberInInterval=function(r,t,o,e){if(r<=t||r>=o)throw RangeError(e)};
+
+}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
+},{"../../is-buffer/index.js":52}],85:[function(require,module,exports){
+"use strict";var Buffer=require("safe-buffer").Buffer,bip66=require("bip66"),EC_PRIVKEY_EXPORT_DER_COMPRESSED=Buffer.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED=Buffer.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),ZERO_BUFFER_32=Buffer.from([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);exports.privateKeyExport=function(r,f,e){var o=Buffer.from(e?EC_PRIVKEY_EXPORT_DER_COMPRESSED:EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED);return r.copy(o,e?8:9),f.copy(o,e?181:214),o},exports.privateKeyImport=function(r){var f=r.length,e=0;if(!(f<e+1||48!==r[e])&&(e+=1,!(f<e+1)&&128&r[e])){var o=127&r[e];if(e+=1,!(o<1||o>2||f<e+o)){var t=r[e+o-1]|(o>1?r[e+o-2]<<8:0);if(e+=o,!(f<e+t||f<e+3||2!==r[e]||1!==r[e+1]||1!==r[e+2]||(e+=3,f<e+2||4!==r[e]||r[e+1]>32||f<e+2+r[e+1])))return r.slice(e+2,e+2+r[e+1])}}},exports.signatureExport=function(r){for(var f=Buffer.concat([Buffer.from([0]),r.r]),e=33,o=0;e>1&&0===f[o]&&!(128&f[o+1]);--e,++o);for(var t=Buffer.concat([Buffer.from([0]),r.s]),i=33,n=0;i>1&&0===t[n]&&!(128&t[n+1]);--i,++n);return bip66.encode(f.slice(o),t.slice(n))},exports.signatureImport=function(r){var f=Buffer.from(ZERO_BUFFER_32),e=Buffer.from(ZERO_BUFFER_32);try{var o=bip66.decode(r);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(r){return}return o.r.copy(f,32-o.r.length),o.s.copy(e,32-o.s.length),{r:f,s:e}},exports.signatureImportLax=function(r){var f=Buffer.from(ZERO_BUFFER_32),e=Buffer.from(ZERO_BUFFER_32),o=r.length,t=0;if(48===r[t++]){var i=r[t++];if(!(128&i&&(t+=i-128)>o)&&2===r[t++]){var n=r[t++];if(128&n){if(i=n-128,t+i>o)return;for(;i>0&&0===r[t];t+=1,i-=1);for(n=0;i>0;t+=1,i-=1)n=(n<<8)+r[t]}if(!(n>o-t)){var E=t;if(t+=n,2===r[t++]){var u=r[t++];if(128&u){if(i=u-128,t+i>o)return;for(;i>0&&0===r[t];t+=1,i-=1);for(u=0;i>0;t+=1,i-=1)u=(u<<8)+r[t]}if(!(u>o-t)){var s=t;for(t+=u;n>0&&0===r[E];n-=1,E+=1);if(!(n>32)){var a=r.slice(E,E+n);for(a.copy(f,32-a.length);u>0&&0===r[s];u-=1,s+=1);if(!(u>32)){var c=r.slice(s,s+u);return c.copy(e,32-c.length),{r:f,s:e}}}}}}}}};
+
+},{"bip66":3,"safe-buffer":82}],86:[function(require,module,exports){
+"use strict";function loadCompressedPublicKey(e,r){var n=new BN(r);if(n.cmp(ecparams.p)>=0)return null;var s=(n=n.toRed(ecparams.red)).redSqr().redIMul(n).redIAdd(ecparams.b).redSqrt();return 3===e!==s.isOdd()&&(s=s.redNeg()),ec.keyPair({pub:{x:n,y:s}})}function loadUncompressedPublicKey(e,r,n){var s=new BN(r),a=new BN(n);if(s.cmp(ecparams.p)>=0||a.cmp(ecparams.p)>=0)return null;if(s=s.toRed(ecparams.red),a=a.toRed(ecparams.red),(6===e||7===e)&&a.isOdd()!==(7===e))return null;var c=s.redSqr().redIMul(s);return a.redSqr().redISub(c.redIAdd(ecparams.b)).isZero()?ec.keyPair({pub:{x:s,y:a}}):null}function loadPublicKey(e){var r=e[0];switch(r){case 2:case 3:return 33!==e.length?null:loadCompressedPublicKey(r,e.slice(1,33));case 4:case 6:case 7:return 65!==e.length?null:loadUncompressedPublicKey(r,e.slice(1,33),e.slice(33,65));default:return null}}var Buffer=require("safe-buffer").Buffer,createHash=require("create-hash"),BN=require("bn.js"),EC=require("elliptic").ec,messages=require("../messages.json"),ec=new EC("secp256k1"),ecparams=ec.curve;exports.privateKeyVerify=function(e){var r=new BN(e);return r.cmp(ecparams.n)<0&&!r.isZero()},exports.privateKeyExport=function(e,r){var n=new BN(e);if(n.cmp(ecparams.n)>=0||n.isZero())throw new Error(messages.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return Buffer.from(ec.keyFromPrivate(e).getPublic(r,!0))},exports.privateKeyTweakAdd=function(e,r){var n=new BN(r);if(n.cmp(ecparams.n)>=0)throw new Error(messages.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(n.iadd(new BN(e)),n.cmp(ecparams.n)>=0&&n.isub(ecparams.n),n.isZero())throw new Error(messages.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return n.toArrayLike(Buffer,"be",32)},exports.privateKeyTweakMul=function(e,r){var n=new BN(r);if(n.cmp(ecparams.n)>=0||n.isZero())throw new Error(messages.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);return n.imul(new BN(e)),n.cmp(ecparams.n)&&(n=n.umod(ecparams.n)),n.toArrayLike(Buffer,"be",32)},exports.publicKeyCreate=function(e,r){var n=new BN(e);if(n.cmp(ecparams.n)>=0||n.isZero())throw new Error(messages.EC_PUBLIC_KEY_CREATE_FAIL);return Buffer.from(ec.keyFromPrivate(e).getPublic(r,!0))},exports.publicKeyConvert=function(e,r){var n=loadPublicKey(e);if(null===n)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);return Buffer.from(n.getPublic(r,!0))},exports.publicKeyVerify=function(e){return null!==loadPublicKey(e)},exports.publicKeyTweakAdd=function(e,r,n){var s=loadPublicKey(e);if(null===s)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);if((r=new BN(r)).cmp(ecparams.n)>=0)throw new Error(messages.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return Buffer.from(ecparams.g.mul(r).add(s.pub).encode(!0,n))},exports.publicKeyTweakMul=function(e,r,n){var s=loadPublicKey(e);if(null===s)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);if((r=new BN(r)).cmp(ecparams.n)>=0||r.isZero())throw new Error(messages.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return Buffer.from(s.pub.mul(r).encode(!0,n))},exports.publicKeyCombine=function(e,r){for(var n=new Array(e.length),s=0;s<e.length;++s)if(n[s]=loadPublicKey(e[s]),null===n[s])throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);for(var a=n[0].pub,c=1;c<n.length;++c)a=a.add(n[c].pub);if(a.isInfinity())throw new Error(messages.EC_PUBLIC_KEY_COMBINE_FAIL);return Buffer.from(a.encode(!0,r))},exports.signatureNormalize=function(e){var r=new BN(e.slice(0,32)),n=new BN(e.slice(32,64));if(r.cmp(ecparams.n)>=0||n.cmp(ecparams.n)>=0)throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL);var s=Buffer.from(e);return 1===n.cmp(ec.nh)&&ecparams.n.sub(n).toArrayLike(Buffer,"be",32).copy(s,32),s},exports.signatureExport=function(e){var r=e.slice(0,32),n=e.slice(32,64);if(new BN(r).cmp(ecparams.n)>=0||new BN(n).cmp(ecparams.n)>=0)throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL);return{r:r,s:n}},exports.signatureImport=function(e){var r=new BN(e.r);r.cmp(ecparams.n)>=0&&(r=new BN(0));var n=new BN(e.s);return n.cmp(ecparams.n)>=0&&(n=new BN(0)),Buffer.concat([r.toArrayLike(Buffer,"be",32),n.toArrayLike(Buffer,"be",32)])},exports.sign=function(e,r,n,s){if("function"==typeof n){var a=n;n=function(n){var c=a(e,r,null,s,n);if(!Buffer.isBuffer(c)||32!==c.length)throw new Error(messages.ECDSA_SIGN_FAIL);return new BN(c)}}var c=new BN(r);if(c.cmp(ecparams.n)>=0||c.isZero())throw new Error(messages.ECDSA_SIGN_FAIL);var o=ec.sign(e,r,{canonical:!0,k:n,pers:s});return{signature:Buffer.concat([o.r.toArrayLike(Buffer,"be",32),o.s.toArrayLike(Buffer,"be",32)]),recovery:o.recoveryParam}},exports.verify=function(e,r,n){var s={r:r.slice(0,32),s:r.slice(32,64)},a=new BN(s.r),c=new BN(s.s);if(a.cmp(ecparams.n)>=0||c.cmp(ecparams.n)>=0)throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL);if(1===c.cmp(ec.nh)||a.isZero()||c.isZero())return!1;var o=loadPublicKey(n);if(null===o)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);return ec.verify(e,s,{x:o.pub.x,y:o.pub.y})},exports.recover=function(e,r,n,s){var a={r:r.slice(0,32),s:r.slice(32,64)},c=new BN(a.r),o=new BN(a.s);if(c.cmp(ecparams.n)>=0||o.cmp(ecparams.n)>=0)throw new Error(messages.ECDSA_SIGNATURE_PARSE_FAIL);try{if(c.isZero()||o.isZero())throw new Error;var u=ec.recoverPubKey(e,a,n);return Buffer.from(u.encode(!0,s))}catch(e){throw new Error(messages.ECDSA_RECOVER_FAIL)}},exports.ecdh=function(e,r){var n=exports.ecdhUnsafe(e,r,!0);return createHash("sha256").update(n).digest()},exports.ecdhUnsafe=function(e,r,n){var s=loadPublicKey(e);if(null===s)throw new Error(messages.EC_PUBLIC_KEY_PARSE_FAIL);var a=new BN(r);if(a.cmp(ecparams.n)>=0||a.isZero())throw new Error(messages.ECDH_FAIL);return Buffer.from(s.pub.mul(a).encode(!0,n))};
+
+},{"../messages.json":88,"bn.js":4,"create-hash":11,"elliptic":14,"safe-buffer":82}],87:[function(require,module,exports){
+"use strict";function initCompressedValue(e,s){return void 0===e?s:(assert.isBoolean(e,messages.COMPRESSED_TYPE_INVALID),e)}var assert=require("./assert"),der=require("./der"),messages=require("./messages.json");module.exports=function(e){return{privateKeyVerify:function(s){return assert.isBuffer(s,messages.EC_PRIVATE_KEY_TYPE_INVALID),32===s.length&&e.privateKeyVerify(s)},privateKeyExport:function(s,r){assert.isBuffer(s,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(s,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),r=initCompressedValue(r,!0);var _=e.privateKeyExport(s,r);return der.privateKeyExport(s,_,r)},privateKeyImport:function(s){if(assert.isBuffer(s,messages.EC_PRIVATE_KEY_TYPE_INVALID),(s=der.privateKeyImport(s))&&32===s.length&&e.privateKeyVerify(s))return s;throw new Error(messages.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyTweakAdd:function(s,r){return assert.isBuffer(s,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(s,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),assert.isBuffer(r,messages.TWEAK_TYPE_INVALID),assert.isBufferLength(r,32,messages.TWEAK_LENGTH_INVALID),e.privateKeyTweakAdd(s,r)},privateKeyTweakMul:function(s,r){return assert.isBuffer(s,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(s,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),assert.isBuffer(r,messages.TWEAK_TYPE_INVALID),assert.isBufferLength(r,32,messages.TWEAK_LENGTH_INVALID),e.privateKeyTweakMul(s,r)},publicKeyCreate:function(s,r){return assert.isBuffer(s,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(s,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),r=initCompressedValue(r,!0),e.publicKeyCreate(s,r)},publicKeyConvert:function(s,r){return assert.isBuffer(s,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(s,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),r=initCompressedValue(r,!0),e.publicKeyConvert(s,r)},publicKeyVerify:function(s){return assert.isBuffer(s,messages.EC_PUBLIC_KEY_TYPE_INVALID),e.publicKeyVerify(s)},publicKeyTweakAdd:function(s,r,_){return assert.isBuffer(s,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(s,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),assert.isBuffer(r,messages.TWEAK_TYPE_INVALID),assert.isBufferLength(r,32,messages.TWEAK_LENGTH_INVALID),_=initCompressedValue(_,!0),e.publicKeyTweakAdd(s,r,_)},publicKeyTweakMul:function(s,r,_){return assert.isBuffer(s,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(s,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),assert.isBuffer(r,messages.TWEAK_TYPE_INVALID),assert.isBufferLength(r,32,messages.TWEAK_LENGTH_INVALID),_=initCompressedValue(_,!0),e.publicKeyTweakMul(s,r,_)},publicKeyCombine:function(s,r){assert.isArray(s,messages.EC_PUBLIC_KEYS_TYPE_INVALID),assert.isLengthGTZero(s,messages.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var _=0;_<s.length;++_)assert.isBuffer(s[_],messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(s[_],33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID);return r=initCompressedValue(r,!0),e.publicKeyCombine(s,r)},signatureNormalize:function(s){return assert.isBuffer(s,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isBufferLength(s,64,messages.ECDSA_SIGNATURE_LENGTH_INVALID),e.signatureNormalize(s)},signatureExport:function(s){assert.isBuffer(s,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isBufferLength(s,64,messages.ECDSA_SIGNATURE_LENGTH_INVALID);var r=e.signatureExport(s);return der.signatureExport(r)},signatureImport:function(s){assert.isBuffer(s,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isLengthGTZero(s,messages.ECDSA_SIGNATURE_LENGTH_INVALID);var r=der.signatureImport(s);if(r)return e.signatureImport(r);throw new Error(messages.ECDSA_SIGNATURE_PARSE_DER_FAIL)},signatureImportLax:function(s){assert.isBuffer(s,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isLengthGTZero(s,messages.ECDSA_SIGNATURE_LENGTH_INVALID);var r=der.signatureImportLax(s);if(r)return e.signatureImport(r);throw new Error(messages.ECDSA_SIGNATURE_PARSE_DER_FAIL)},sign:function(s,r,_){assert.isBuffer(s,messages.MSG32_TYPE_INVALID),assert.isBufferLength(s,32,messages.MSG32_LENGTH_INVALID),assert.isBuffer(r,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(r,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID);var E=null,t=null;return void 0!==_&&(assert.isObject(_,messages.OPTIONS_TYPE_INVALID),void 0!==_.data&&(assert.isBuffer(_.data,messages.OPTIONS_DATA_TYPE_INVALID),assert.isBufferLength(_.data,32,messages.OPTIONS_DATA_LENGTH_INVALID),E=_.data),void 0!==_.noncefn&&(assert.isFunction(_.noncefn,messages.OPTIONS_NONCEFN_TYPE_INVALID),t=_.noncefn)),e.sign(s,r,t,E)},verify:function(s,r,_){return assert.isBuffer(s,messages.MSG32_TYPE_INVALID),assert.isBufferLength(s,32,messages.MSG32_LENGTH_INVALID),assert.isBuffer(r,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isBufferLength(r,64,messages.ECDSA_SIGNATURE_LENGTH_INVALID),assert.isBuffer(_,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(_,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),e.verify(s,r,_)},recover:function(s,r,_,E){return assert.isBuffer(s,messages.MSG32_TYPE_INVALID),assert.isBufferLength(s,32,messages.MSG32_LENGTH_INVALID),assert.isBuffer(r,messages.ECDSA_SIGNATURE_TYPE_INVALID),assert.isBufferLength(r,64,messages.ECDSA_SIGNATURE_LENGTH_INVALID),assert.isNumber(_,messages.RECOVERY_ID_TYPE_INVALID),assert.isNumberInInterval(_,-1,4,messages.RECOVERY_ID_VALUE_INVALID),E=initCompressedValue(E,!0),e.recover(s,r,_,E)},ecdh:function(s,r){return assert.isBuffer(s,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(s,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),assert.isBuffer(r,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(r,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),e.ecdh(s,r)},ecdhUnsafe:function(s,r,_){return assert.isBuffer(s,messages.EC_PUBLIC_KEY_TYPE_INVALID),assert.isBufferLength2(s,33,65,messages.EC_PUBLIC_KEY_LENGTH_INVALID),assert.isBuffer(r,messages.EC_PRIVATE_KEY_TYPE_INVALID),assert.isBufferLength(r,32,messages.EC_PRIVATE_KEY_LENGTH_INVALID),_=initCompressedValue(_,!0),e.ecdhUnsafe(s,r,_)}}};
+
+},{"./assert":84,"./der":85,"./messages.json":88}],88:[function(require,module,exports){
+module.exports={
+ "COMPRESSED_TYPE_INVALID": "compressed should be a boolean",
+ "EC_PRIVATE_KEY_TYPE_INVALID": "private key should be a Buffer",
+ "EC_PRIVATE_KEY_LENGTH_INVALID": "private key length is invalid",
+ "EC_PRIVATE_KEY_TWEAK_ADD_FAIL": "tweak out of range or resulting private key is invalid",
+ "EC_PRIVATE_KEY_TWEAK_MUL_FAIL": "tweak out of range",
+ "EC_PRIVATE_KEY_EXPORT_DER_FAIL": "couldn't export to DER format",
+ "EC_PRIVATE_KEY_IMPORT_DER_FAIL": "couldn't import from DER format",
+ "EC_PUBLIC_KEYS_TYPE_INVALID": "public keys should be an Array",
+ "EC_PUBLIC_KEYS_LENGTH_INVALID": "public keys Array should have at least 1 element",
+ "EC_PUBLIC_KEY_TYPE_INVALID": "public key should be a Buffer",
+ "EC_PUBLIC_KEY_LENGTH_INVALID": "public key length is invalid",
+ "EC_PUBLIC_KEY_PARSE_FAIL": "the public key could not be parsed or is invalid",
+ "EC_PUBLIC_KEY_CREATE_FAIL": "private was invalid, try again",
+ "EC_PUBLIC_KEY_TWEAK_ADD_FAIL": "tweak out of range or resulting public key is invalid",
+ "EC_PUBLIC_KEY_TWEAK_MUL_FAIL": "tweak out of range",
+ "EC_PUBLIC_KEY_COMBINE_FAIL": "the sum of the public keys is not valid",
+ "ECDH_FAIL": "scalar was invalid (zero or overflow)",
+ "ECDSA_SIGNATURE_TYPE_INVALID": "signature should be a Buffer",
+ "ECDSA_SIGNATURE_LENGTH_INVALID": "signature length is invalid",
+ "ECDSA_SIGNATURE_PARSE_FAIL": "couldn't parse signature",
+ "ECDSA_SIGNATURE_PARSE_DER_FAIL": "couldn't parse DER signature",
+ "ECDSA_SIGNATURE_SERIALIZE_DER_FAIL": "couldn't serialize signature to DER format",
+ "ECDSA_SIGN_FAIL": "nonce generation function failed or private key is invalid",
+ "ECDSA_RECOVER_FAIL": "couldn't recover public key from signature",
+ "MSG32_TYPE_INVALID": "message should be a Buffer",
+ "MSG32_LENGTH_INVALID": "message length is invalid",
+ "OPTIONS_TYPE_INVALID": "options should be an Object",
+ "OPTIONS_DATA_TYPE_INVALID": "options.data should be a Buffer",
+ "OPTIONS_DATA_LENGTH_INVALID": "options.data length is invalid",
+ "OPTIONS_NONCEFN_TYPE_INVALID": "options.noncefn should be a Function",
+ "RECOVERY_ID_TYPE_INVALID": "recovery should be a Number",
+ "RECOVERY_ID_VALUE_INVALID": "recovery should have value between -1 and 4",
+ "TWEAK_TYPE_INVALID": "tweak should be a Buffer",
+ "TWEAK_LENGTH_INVALID": "tweak length is invalid"
+}
+
+},{}],89:[function(require,module,exports){
+function Hash(t,i){this._block=Buffer.alloc(t),this._finalSize=i,this._blockSize=t,this._len=0}var Buffer=require("safe-buffer").Buffer;Hash.prototype.update=function(t,i){"string"==typeof t&&(i=i||"utf8",t=Buffer.from(t,i));for(var e=this._block,s=this._blockSize,h=t.length,o=this._len,l=0;l<h;){for(var r=o%s,_=Math.min(h-l,s-r),n=0;n<_;n++)e[r+n]=t[l+n];l+=_,(o+=_)%s==0&&this._update(e)}return this._len+=h,this},Hash.prototype.digest=function(t){var i=this._len%this._blockSize;this._block[i]=128,this._block.fill(0,i+1),i>=this._finalSize&&(this._update(this._block),this._block.fill(0));var e=8*this._len;if(e<=4294967295)this._block.writeUInt32BE(e,this._blockSize-4);else{var s=4294967295&e,h=(e-s)/4294967296;this._block.writeUInt32BE(h,this._blockSize-8),this._block.writeUInt32BE(s,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},Hash.prototype._update=function(){throw new Error("_update must be implemented by subclass")},module.exports=Hash;
+
+},{"safe-buffer":82}],90:[function(require,module,exports){
+var exports=module.exports=function(e){e=e.toLowerCase();var r=exports[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};exports.sha=require("./sha"),exports.sha1=require("./sha1"),exports.sha224=require("./sha224"),exports.sha256=require("./sha256"),exports.sha384=require("./sha384"),exports.sha512=require("./sha512");
+
+},{"./sha":91,"./sha1":92,"./sha224":93,"./sha256":94,"./sha384":95,"./sha512":96}],91:[function(require,module,exports){
+function Sha(){this.init(),this._w=W,Hash.call(this,64,56)}function rotl5(t){return t<<5|t>>>27}function rotl30(t){return t<<30|t>>>2}function ft(t,i,r,h){return 0===t?i&r|~i&h:2===t?i&r|i&h|r&h:i^r^h}var inherits=require("inherits"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,K=[1518500249,1859775393,-1894007588,-899497514],W=new Array(80);inherits(Sha,Hash),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(t){for(var i=this._w,r=0|this._a,h=0|this._b,s=0|this._c,e=0|this._d,n=0|this._e,_=0;_<16;++_)i[_]=t.readInt32BE(4*_);for(;_<80;++_)i[_]=i[_-3]^i[_-8]^i[_-14]^i[_-16];for(var a=0;a<80;++a){var o=~~(a/20),f=rotl5(r)+ft(o,h,s,e)+n+i[a]+K[o]|0;n=e,e=s,s=rotl30(h),h=r,r=f}this._a=r+this._a|0,this._b=h+this._b|0,this._c=s+this._c|0,this._d=e+this._d|0,this._e=n+this._e|0},Sha.prototype._hash=function(){var t=Buffer.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},module.exports=Sha;
+
+},{"./hash":89,"inherits":51,"safe-buffer":82}],92:[function(require,module,exports){
+function Sha1(){this.init(),this._w=W,Hash.call(this,64,56)}function rotl1(t){return t<<1|t>>>31}function rotl5(t){return t<<5|t>>>27}function rotl30(t){return t<<30|t>>>2}function ft(t,i,r,h){return 0===t?i&r|~i&h:2===t?i&r|i&h|r&h:i^r^h}var inherits=require("inherits"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,K=[1518500249,1859775393,-1894007588,-899497514],W=new Array(80);inherits(Sha1,Hash),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(t){for(var i=this._w,r=0|this._a,h=0|this._b,s=0|this._c,e=0|this._d,n=0|this._e,_=0;_<16;++_)i[_]=t.readInt32BE(4*_);for(;_<80;++_)i[_]=rotl1(i[_-3]^i[_-8]^i[_-14]^i[_-16]);for(var a=0;a<80;++a){var o=~~(a/20),f=rotl5(r)+ft(o,h,s,e)+n+i[a]+K[o]|0;n=e,e=s,s=rotl30(h),h=r,r=f}this._a=r+this._a|0,this._b=h+this._b|0,this._c=s+this._c|0,this._d=e+this._d|0,this._e=n+this._e|0},Sha1.prototype._hash=function(){var t=Buffer.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},module.exports=Sha1;
+
+},{"./hash":89,"inherits":51,"safe-buffer":82}],93:[function(require,module,exports){
+function Sha224(){this.init(),this._w=W,Hash.call(this,64,56)}var inherits=require("inherits"),Sha256=require("./sha256"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,W=new Array(64);inherits(Sha224,Sha256),Sha224.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},Sha224.prototype._hash=function(){var t=Buffer.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},module.exports=Sha224;
+
+},{"./hash":89,"./sha256":94,"inherits":51,"safe-buffer":82}],94:[function(require,module,exports){
+function Sha256(){this.init(),this._w=W,Hash.call(this,64,56)}function ch(t,i,h){return h^t&(i^h)}function maj(t,i,h){return t&i|h&(t|i)}function sigma0(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function sigma1(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function gamma0(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function gamma1(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}var inherits=require("inherits"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,K=[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],W=new Array(64);inherits(Sha256,Hash),Sha256.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},Sha256.prototype._update=function(t){for(var i=this._w,h=0|this._a,s=0|this._b,r=0|this._c,e=0|this._d,n=0|this._e,_=0|this._f,a=0|this._g,f=0|this._h,u=0;u<16;++u)i[u]=t.readInt32BE(4*u);for(;u<64;++u)i[u]=gamma1(i[u-2])+i[u-7]+gamma0(i[u-15])+i[u-16]|0;for(var o=0;o<64;++o){var c=f+sigma1(n)+ch(n,_,a)+K[o]+i[o]|0,m=sigma0(h)+maj(h,s,r)|0;f=a,a=_,_=n,n=e+c|0,e=r,r=s,s=h,h=c+m|0}this._a=h+this._a|0,this._b=s+this._b|0,this._c=r+this._c|0,this._d=e+this._d|0,this._e=n+this._e|0,this._f=_+this._f|0,this._g=a+this._g|0,this._h=f+this._h|0},Sha256.prototype._hash=function(){var t=Buffer.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},module.exports=Sha256;
+
+},{"./hash":89,"inherits":51,"safe-buffer":82}],95:[function(require,module,exports){
+function Sha384(){this.init(),this._w=W,Hash.call(this,128,112)}var inherits=require("inherits"),SHA512=require("./sha512"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,W=new Array(160);inherits(Sha384,SHA512),Sha384.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},Sha384.prototype._hash=function(){function h(h,t,s){i.writeInt32BE(h,s),i.writeInt32BE(t,s+4)}var i=Buffer.allocUnsafe(48);return h(this._ah,this._al,0),h(this._bh,this._bl,8),h(this._ch,this._cl,16),h(this._dh,this._dl,24),h(this._eh,this._el,32),h(this._fh,this._fl,40),i},module.exports=Sha384;
+
+},{"./hash":89,"./sha512":96,"inherits":51,"safe-buffer":82}],96:[function(require,module,exports){
+function Sha512(){this.init(),this._w=W,Hash.call(this,128,112)}function Ch(h,t,i){return i^h&(t^i)}function maj(h,t,i){return h&t|i&(h|t)}function sigma0(h,t){return(h>>>28|t<<4)^(t>>>2|h<<30)^(t>>>7|h<<25)}function sigma1(h,t){return(h>>>14|t<<18)^(h>>>18|t<<14)^(t>>>9|h<<23)}function Gamma0(h,t){return(h>>>1|t<<31)^(h>>>8|t<<24)^h>>>7}function Gamma0l(h,t){return(h>>>1|t<<31)^(h>>>8|t<<24)^(h>>>7|t<<25)}function Gamma1(h,t){return(h>>>19|t<<13)^(t>>>29|h<<3)^h>>>6}function Gamma1l(h,t){return(h>>>19|t<<13)^(t>>>29|h<<3)^(h>>>6|t<<26)}function getCarry(h,t){return h>>>0<t>>>0?1:0}var inherits=require("inherits"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,K=[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],W=new Array(160);inherits(Sha512,Hash),Sha512.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},Sha512.prototype._update=function(h){for(var t=this._w,i=0|this._ah,s=0|this._bh,r=0|this._ch,_=0|this._dh,a=0|this._eh,e=0|this._fh,l=0|this._gh,n=0|this._hh,f=0|this._al,g=0|this._bl,u=0|this._cl,c=0|this._dl,m=0|this._el,o=0|this._fl,y=0|this._gl,C=0|this._hl,d=0;d<32;d+=2)t[d]=h.readInt32BE(4*d),t[d+1]=h.readInt32BE(4*d+4);for(;d<160;d+=2){var b=t[d-30],p=t[d-30+1],G=Gamma0(b,p),v=Gamma0l(p,b),B=Gamma1(b=t[d-4],p=t[d-4+1]),S=Gamma1l(p,b),w=t[d-14],E=t[d-14+1],I=t[d-32],j=t[d-32+1],q=v+E|0,H=G+w+getCarry(q,v)|0;H=(H=H+B+getCarry(q=q+S|0,S)|0)+I+getCarry(q=q+j|0,j)|0,t[d]=H,t[d+1]=q}for(var W=0;W<160;W+=2){H=t[W],q=t[W+1];var x=maj(i,s,r),A=maj(f,g,u),U=sigma0(i,f),k=sigma0(f,i),z=sigma1(a,m),D=sigma1(m,a),F=K[W],J=K[W+1],L=Ch(a,e,l),M=Ch(m,o,y),N=C+D|0,O=n+z+getCarry(N,C)|0;O=(O=(O=O+L+getCarry(N=N+M|0,M)|0)+F+getCarry(N=N+J|0,J)|0)+H+getCarry(N=N+q|0,q)|0;var P=k+A|0,Q=U+x+getCarry(P,k)|0;n=l,C=y,l=e,y=o,e=a,o=m,a=_+O+getCarry(m=c+N|0,c)|0,_=r,c=u,r=s,u=g,s=i,g=f,i=O+Q+getCarry(f=N+P|0,N)|0}this._al=this._al+f|0,this._bl=this._bl+g|0,this._cl=this._cl+u|0,this._dl=this._dl+c|0,this._el=this._el+m|0,this._fl=this._fl+o|0,this._gl=this._gl+y|0,this._hl=this._hl+C|0,this._ah=this._ah+i+getCarry(this._al,f)|0,this._bh=this._bh+s+getCarry(this._bl,g)|0,this._ch=this._ch+r+getCarry(this._cl,u)|0,this._dh=this._dh+_+getCarry(this._dl,c)|0,this._eh=this._eh+a+getCarry(this._el,m)|0,this._fh=this._fh+e+getCarry(this._fl,o)|0,this._gh=this._gh+l+getCarry(this._gl,y)|0,this._hh=this._hh+n+getCarry(this._hl,C)|0},Sha512.prototype._hash=function(){function h(h,i,s){t.writeInt32BE(h,s),t.writeInt32BE(i,s+4)}var t=Buffer.allocUnsafe(64);return h(this._ah,this._al,0),h(this._bh,this._bl,8),h(this._ch,this._cl,16),h(this._dh,this._dl,24),h(this._eh,this._el,32),h(this._fh,this._fl,40),h(this._gh,this._gl,48),h(this._hh,this._hl,56),t},module.exports=Sha512;
+
+},{"./hash":89,"inherits":51,"safe-buffer":82}],97:[function(require,module,exports){
+function Stream(){EE.call(this)}module.exports=Stream;var EE=require("events").EventEmitter,inherits=require("inherits");inherits(Stream,EE),Stream.Readable=require("readable-stream/readable.js"),Stream.Writable=require("readable-stream/writable.js"),Stream.Duplex=require("readable-stream/duplex.js"),Stream.Transform=require("readable-stream/transform.js"),Stream.PassThrough=require("readable-stream/passthrough.js"),Stream.Stream=Stream,Stream.prototype.pipe=function(e,r){function t(r){e.writable&&!1===e.write(r)&&m.pause&&m.pause()}function n(){m.readable&&m.resume&&m.resume()}function a(){u||(u=!0,e.end())}function o(){u||(u=!0,"function"==typeof e.destroy&&e.destroy())}function i(e){if(s(),0===EE.listenerCount(this,"error"))throw e}function s(){m.removeListener("data",t),e.removeListener("drain",n),m.removeListener("end",a),m.removeListener("close",o),m.removeListener("error",i),e.removeListener("error",i),m.removeListener("end",s),m.removeListener("close",s),e.removeListener("close",s)}var m=this;m.on("data",t),e.on("drain",n),e._isStdio||r&&!1===r.end||(m.on("end",a),m.on("close",o));var u=!1;return m.on("error",i),e.on("error",i),m.on("end",s),m.on("close",s),e.on("close",s),e.emit("pipe",m),e};
+
+},{"events":35,"inherits":51,"readable-stream/duplex.js":67,"readable-stream/passthrough.js":76,"readable-stream/readable.js":77,"readable-stream/transform.js":78,"readable-stream/writable.js":79}],98:[function(require,module,exports){
+"use strict";function _normalizeEncoding(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}}function normalizeEncoding(t){var e=_normalizeEncoding(t);if("string"!=typeof e&&(Buffer.isEncoding===isEncoding||!isEncoding(t)))throw new Error("Unknown encoding: "+t);return e||t}function StringDecoder(t){this.encoding=normalizeEncoding(t);var e;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,e=4;break;case"utf8":this.fillLast=utf8FillLast,e=4;break;case"base64":this.text=base64Text,this.end=base64End,e=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(e)}function utf8CheckByte(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function utf8CheckIncomplete(t,e,s){var i=e.length-1;if(i<s)return 0;var a=utf8CheckByte(e[i]);return a>=0?(a>0&&(t.lastNeed=a-1),a):--i<s?0:(a=utf8CheckByte(e[i]))>=0?(a>0&&(t.lastNeed=a-2),a):--i<s?0:(a=utf8CheckByte(e[i]))>=0?(a>0&&(2===a?a=0:t.lastNeed=a-3),a):0}function utf8CheckExtraBytes(t,e,s){if(128!=(192&e[0]))return t.lastNeed=0,"�".repeat(s);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�".repeat(s+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�".repeat(s+2)}}function utf8FillLast(t){var e=this.lastTotal-this.lastNeed,s=utf8CheckExtraBytes(this,t,e);return void 0!==s?s: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 utf8Text(t,e){var s=utf8CheckIncomplete(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=s;var i=t.length-(s-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function utf8End(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�".repeat(this.lastTotal-this.lastNeed):e}function utf16Text(t,e){if((t.length-e)%2==0){var s=t.toString("utf16le",e);if(s){var i=s.charCodeAt(s.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function utf16End(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,s)}return e}function base64Text(t,e){var s=(t.length-e)%3;return 0===s?t.toString("base64",e):(this.lastNeed=3-s,this.lastTotal=3,1===s?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-s))}function base64End(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function simpleWrite(t){return t.toString(this.encoding)}function simpleEnd(t){return t&&t.length?this.write(t):""}var Buffer=require("safe-buffer").Buffer,isEncoding=Buffer.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}};exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(t){if(0===t.length)return"";var e,s;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";s=this.lastNeed,this.lastNeed=0}else s=0;return s<t.length?e?e+this.text(t,s):this.text(t,s):e||""},StringDecoder.prototype.end=utf8End,StringDecoder.prototype.text=utf8Text,StringDecoder.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":82}],99:[function(require,module,exports){
+var isHexPrefixed=require("is-hex-prefixed");module.exports=function(e){return"string"!=typeof e?e:isHexPrefixed(e)?e.slice(2):e};
+
+},{"is-hex-prefixed":53}],100:[function(require,module,exports){
+(function (global){
+function deprecate(r,e){if(config("noDeprecation"))return r;var o=!1;return function(){if(!o){if(config("throwDeprecation"))throw new Error(e);config("traceDeprecation")?console.trace(e):console.warn(e),o=!0}return r.apply(this,arguments)}}function config(r){try{if(!global.localStorage)return!1}catch(r){return!1}var e=global.localStorage[r];return null!=e&&"true"===String(e).toLowerCase()}module.exports=deprecate;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],101:[function(require,module,exports){
+"function"==typeof Object.create?module.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(t,e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t};
+
+},{}],102:[function(require,module,exports){
+module.exports=function(o){return o&&"object"==typeof o&&"function"==typeof o.copy&&"function"==typeof o.fill&&"function"==typeof o.readUInt8};
+
+},{}],103:[function(require,module,exports){
+(function (process,global){
+function inspect(e,r){var t={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?"["+inspect.colors[t][0]+"m"+e+"["+inspect.colors[t][1]+"m":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var c="",a=!1,l=["{","}"];if(isArray(r)&&(a=!0,l=["[","]"]),isFunction(r)&&(c=" [Function"+(r.name?": "+r.name:"")+"]"),isRegExp(r)&&(c=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(c=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(c=" "+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(t<0)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var p;return p=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(p,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize("undefined","undefined");if(isString(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return isNumber(r)?e.stylize(""+r,"number"):isBoolean(r)?e.stylize(""+r,"boolean"):isNull(r)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s<u;++s)hasOwnProperty(r,String(s))?o.push(formatProperty(e,r,t,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(formatProperty(e,r,t,n,i,!0))}),o}function formatProperty(e,r,t,n,i,o){var s,u,c;if((c=Object.getOwnPropertyDescriptor(r,i)||{value:r[i]}).get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),hasOwnProperty(n,i)||(s="["+i+"]"),u||(e.seen.indexOf(c.value)<0?(u=isNull(t)?formatValue(e,c.value,null):formatValue(e,c.value,t-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),isUndefined(s)){if(o&&i.match(/^\d+$/))return u;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function reduceToSingleString(e,r,t){var n=0;return e.reduce(function(e,r){return n++,r.indexOf("\n")>=0&&n++,e+r.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?t[0]+(""===r?"":r+"\n ")+" "+e.join(",\n ")+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],r].join(" ")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(inspect(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,i=n.length,o=String(e).replace(formatRegExp,function(e){if("%%"===e)return"%";if(t>=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(e){return"[Circular]"}default:return e}}),s=n[t];t<i;s=n[++t])isNull(s)||!isObject(s)?o+=" "+s:o+=" "+inspect(s);return o},exports.deprecate=function(e,r){if(isUndefined(global.process))return function(){return exports.deprecate(e,r).apply(this,arguments)};if(!0===process.noDeprecation)return e;var t=!1;return function(){if(!t){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),t=!0}return e.apply(this,arguments)}};var debugs={},debugEnviron;exports.debuglog=function(e){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!debugs[e])if(new RegExp("\\b"+e+"\\b","i").test(debugEnviron)){var r=process.pid;debugs[e]=function(){var t=exports.format.apply(exports,arguments);console.error("%s %d: %s",e,r,t)}}else debugs[e]=function(){};return debugs[e]},exports.inspect=inspect,inspect.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]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(e,r){if(!r||!isObject(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e};
+
+}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"./support/isBuffer":102,"_process":66,"inherits":101}],104:[function(require,module,exports){
+"use strict";module.exports={Buffer:require("buffer"),BN:require("ethereumjs-util").BN,RLP:require("ethereumjs-util").rlp,Tx:require("ethereumjs-tx"),Util:require("ethereumjs-util")};
+
+},{"buffer":8,"ethereumjs-tx":31,"ethereumjs-util":33}]},{},[104])(104)
+}); \ No newline at end of file
diff --git a/test/e2e/send-eth-with-private-key-test/index.html b/test/e2e/send-eth-with-private-key-test/index.html
new file mode 100644
index 000000000..01ec42157
--- /dev/null
+++ b/test/e2e/send-eth-with-private-key-test/index.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>E2E Test Dapp</title>
+</head>
+<body>
+ <div id="success"></div>
+ <input id="address" />
+ <button id="send">Send with private key</button>
+
+
+ <script src="web3js.js"></script>
+ <script src="ethereumjs-tx.js"></script>
+ <script src="send-eth-with-private-key.js"></script>
+</body>
+
+</html> \ No newline at end of file
diff --git a/test/e2e/send-eth-with-private-key-test/send-eth-with-private-key.js b/test/e2e/send-eth-with-private-key-test/send-eth-with-private-key.js
new file mode 100644
index 000000000..5f7291950
--- /dev/null
+++ b/test/e2e/send-eth-with-private-key-test/send-eth-with-private-key.js
@@ -0,0 +1,28 @@
+/* eslint-disable */
+var Tx = ethereumjs.Tx
+var privateKey = ethereumjs.Buffer.Buffer.from('53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9', 'hex')
+
+const web3 = new Web3(new Web3.providers.HttpProvider(`http://localhost:8545`))
+
+const sendButton = document.getElementById('send')
+
+sendButton.addEventListener('click', function () {
+ var rawTx = {
+ nonce: '0x00',
+ gasPrice: '0x09184e72a000',
+ gasLimit: '0x22710',
+ value: '0xde0b6b3a7640000',
+ r: '0x25a1bc499cd8799a2ece0fcba0df6e666e54a6e2b4e18c09838e2b621c10db71',
+ s: '0x6cf83e6e8f6e82a0a1d7bd10bc343fc0ae4b096c1701aa54e6389d447f98ac6f',
+ v: '0x2d46',
+ to: document.getElementById('address').value,
+ }
+ var tx = new Tx(rawTx);
+ tx.sign(privateKey);
+
+ var serializedTx = tx.serialize();
+
+ web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex')).on('receipt', (transactionResult) => {
+ document.getElementById('success').innerHTML = `Successfully sent transaction: ${transactionResult.transactionHash}`
+ })
+})
diff --git a/test/e2e/send-eth-with-private-key-test/web3js.js b/test/e2e/send-eth-with-private-key-test/web3js.js
new file mode 100644
index 000000000..29d266567
--- /dev/null
+++ b/test/e2e/send-eth-with-private-key-test/web3js.js
@@ -0,0 +1,2 @@
+/* eslint-disable */
+"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<n.length;a++)i(n[a]);return i}}()({1:[function(t,e,r){var n=r;n.bignum=t("bn.js"),n.define=t("./asn1/api").define,n.base=t("./asn1/base"),n.constants=t("./asn1/constants"),n.decoders=t("./asn1/decoders"),n.encoders=t("./asn1/encoders")},{"./asn1/api":2,"./asn1/base":4,"./asn1/constants":8,"./asn1/decoders":10,"./asn1/encoders":13,"bn.js":"BN"}],2:[function(t,e,r){var n=t("../asn1"),i=t("inherits");function o(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}r.define=function(t,e){return new o(t,e)},o.prototype._createNamed=function(e){var r;try{r=t("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){r=function(t){this._initNamed(t)}}return i(r,e),r.prototype._initNamed=function(t){e.call(this,t)},new r(this)},o.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},o.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},{"../asn1":1,inherits:101,vm:161}],3:[function(t,e,r){var n=t("inherits"),i=t("../base").Reporter,o=t("buffer").Buffer;function a(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function s(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(t){return t instanceof s||(t=new s(t,e)),this.length+=t.length,t},this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+(void 0===t?"undefined":_typeof(t)));this.value=t,this.length=t.length}}n(a,i),r.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(t){var e=new a(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},a.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},a.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},r.EncoderBuffer=s,s.prototype.join=function(t,e){return t||(t=new o(this.length)),e||(e=0),0===this.length?t:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(t,e),e+=r.length}):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length),t)}},{"../base":4,buffer:47,inherits:101}],4:[function(t,e,r){var n=r;n.Reporter=t("./reporter").Reporter,n.DecoderBuffer=t("./buffer").DecoderBuffer,n.EncoderBuffer=t("./buffer").EncoderBuffer,n.Node=t("./node")},{"./buffer":3,"./node":5,"./reporter":6}],5:[function(t,e,r){var n=t("../base").Reporter,i=t("../base").EncoderBuffer,o=t("../base").DecoderBuffer,a=t("minimalistic-assert"),s=["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(s);function f(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=f;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){var t=this._baseState,e={};c.forEach(function(r){e[r]=t[r]});var r=new this.constructor(e.parent);return r._baseState=e,r},f.prototype._wrap=function(){var t=this._baseState;u.forEach(function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}},this)},f.prototype._init=function(t){var e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter(function(t){return t._baseState.parent===this},this),a.equal(e.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(t){var e=this._baseState,r=t.filter(function(t){return t instanceof this.constructor},this);t=t.filter(function(t){return!(t instanceof this.constructor)},this),0!==r.length&&(a(null===e.children),e.children=r,r.forEach(function(t){t._baseState.parent=this},this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map(function(t){if("object"!==(void 0===t?"undefined":_typeof(t))||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach(function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r}),e}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(t){f.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),s.forEach(function(t){f.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(r),this}}),f.prototype.use=function(t){a(t);var e=this._baseState;return a(null===e.use),e.use=t,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(t){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},f.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},f.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},f.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},f.prototype.key=function(t){var e=this._baseState;return a(null===e.key),e.key=t,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(t){var e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},f.prototype.contains=function(t){var e=this._baseState;return a(null===e.use),e.contains=t,this},f.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=t.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(a=this._peekTag(t,u,r.any),t.isError(a))return a}else{var f=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(f)}}if(r.obj&&a&&(n=t.enterObject()),a){if(null!==r.explicit){var c=this._decodeTag(t,r.explicit);if(t.isError(c))return c;t=c}var h=t.offset;if(null===r.use&&null===r.choice){if(r.any)f=t.save();var d=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(d))return d;r.any?i=t.raw(f):t=d}if(e&&e.track&&null!==r.tag&&e.track(t.path(),h,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(t,e)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var l=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(l,e)}}return r.obj&&a&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,r.key,i),i},f.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},f.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),a(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},f.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var a=t.save(),s=r.choice[o];try{var u=s._decode(t,e);if(t.isError(u))return!1;n={type:o,value:u},i=!0}catch(e){return t.restore(a),!1}return!0},this),i?n:t.error("Choice not matched")},f.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},f.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},f.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)a=this._getUse(i.contains,r)._encode(t,e),s=!0;else if(i.children)a=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var n=e.enterKey(r._baseState.key);if("object"!==(void 0===t?"undefined":_typeof(t)))return e.error("Child expected, but input is not object");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i},this).filter(function(t){return t}),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(t.map(function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)},u))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(a=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){var f=null!==i.implicit?i.implicit:i.tag,c=null===i.implicit?"universal":"context";null===f?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(f,s,c,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},f.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},f.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},f.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},f.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},{"../base":4,"minimalistic-assert":107}],6:[function(t,e,r){var n=t("inherits");function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}r.Reporter=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map(function(t){return"["+JSON.stringify(t)+"]"}).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},{inherits:101}],7:[function(t,e,r){var n=t("../constants");r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.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"},r.tagByName=n._reverse(r.tag)},{"../constants":8}],8:[function(t,e,r){var n=r;n._reverse=function(t){var e={};return Object.keys(t).forEach(function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r}),e},n.der=t("./der")},{"./der":7}],9:[function(t,e,r){var n=t("inherits"),i=t("../../asn1"),o=i.base,a=i.bignum,s=i.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new f,this.tree._init(t.body)}function f(t){o.Node.call(this,"der",t)}function c(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=s.tagClass[r>>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<i;o++){n<<=8;var a=t.readUInt8(r);if(t.isError(a))return a;n|=a}return n}e.exports=u,u.prototype.decode=function(t,e){return t instanceof o.DecoderBuffer||(t=new o.DecoderBuffer(t,e)),this.tree._decode(t,e)},n(f,o.Node),f.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var n=t.save(),i=c(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},f.prototype._decodeTag=function(t,e,r){var n=c(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;var i=h(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var o=t.save(),a=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(a)?a:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},f.prototype._skipUntilEnd=function(t,e){for(;;){var r=c(t,e);if(t.isError(r))return r;var n,i=h(t,r.primitive,e);if(t.isError(i))return i;if(n=r.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===r.tagStr)break}},f.prototype._decodeList=function(t,e,r,n){for(var i=[];!t.isEmpty();){var o=this._peekTag(t,"end");if(t.isError(o))return o;var a=r.decode(t,"der",n);if(t.isError(a)&&o)break;i.push(a)}return i},f.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var n=t.raw();if(n.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if("numstr"===e){var a=t.raw().toString("ascii");return this._isNumstr(a)?a:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var s=t.raw().toString("ascii");return this._isPrintstr(s)?s:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},f.prototype._decodeObjid=function(t,e,r){for(var n,i=[],o=0;!t.isEmpty();){var a=t.readUInt8();o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0)}128&a&&i.push(o);var s=i[0]/40|0,u=i[0]%40;if(n=r?i:[s,u].concat(i.slice(1)),e){var f=e[n.join(" ")];void 0===f&&(f=e[n.join(".")]),void 0!==f&&(n=f)}return n},f.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),u=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,s,u,0)},f.prototype._decodeNull=function(t){return null},f.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},f.prototype._decodeInt=function(t,e){var r=t.raw(),n=new a(r);return e&&(n=e[n.toString(10)]||n),n},f.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},{"../../asn1":1,inherits:101}],10:[function(t,e,r){var n=r;n.der=t("./der"),n.pem=t("./pem")},{"./der":9,"./pem":11}],11:[function(t,e,r){var n=t("inherits"),i=t("buffer").Buffer,o=t("./der");function a(t){o.call(this,t),this.enc="pem"}n(a,o),e.exports=a,a.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,u=-1,f=0;f<r.length;f++){var c=r[f].match(a);if(null!==c&&c[2]===n){if(-1!==s){if("END"!==c[1])break;u=f;break}if("BEGIN"!==c[1])break;s=f}}if(-1===s||-1===u)throw new Error("PEM section not found for: "+n);var h=r.slice(s+1,u).join("");h.replace(/[^a-z0-9\+\/=]+/gi,"");var d=new i(h,"base64");return o.prototype.decode.call(this,d,e)}},{"./der":9,buffer:47,inherits:101}],12:[function(t,e,r){var n=t("inherits"),i=t("buffer").Buffer,o=t("../../asn1"),a=o.base,s=o.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new f,this.tree._init(t.body)}function f(t){a.Node.call(this,"der",t)}function c(t){return t<10?"0"+t:t}e.exports=u,u.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(f,a.Node),f.prototype._encodeComposite=function(t,e,r,n){var o,a=function(t,e,r,n){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(s.tagByName.hasOwnProperty(t))i=s.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}if(i>=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<t.length;n++)r.writeUInt16BE(t.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)?this._createEncoderBuffer(t):"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},f.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(n=0;n<t.length;n++)t[n]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=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<t.length;n++){var a=t[n];for(o++;a>=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;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},{"../../asn1":1,buffer:47,inherits:101}],13:[function(t,e,r){var n=r;n.der=t("./der"),n.pem=t("./pem")},{"./der":12,"./pem":14}],14:[function(t,e,r){var n=t("inherits"),i=t("./der");function o(t){i.call(this,t),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(t,e){for(var r=i.prototype.encode.call(this,t).toString("base64"),n=["-----BEGIN "+e.label+"-----"],o=0;o<r.length;o+=64)n.push(r.slice(o,o+64));return n.push("-----END "+e.label+"-----"),n.join("\n")}},{"./der":12,inherits:101}],15:[function(t,e,r){r.byteLength=function(t){return 3*t.length/4-f(t)},r.toByteArray=function(t){var e,r,n,a,s,u=t.length;a=f(t),s=new o(3*u/4-a),r=a>0?u-4:u;var c=0;for(e=0;e<r;e+=4)n=i[t.charCodeAt(e)]<<18|i[t.charCodeAt(e+1)]<<12|i[t.charCodeAt(e+2)]<<6|i[t.charCodeAt(e+3)],s[c++]=n>>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;s<u;s+=16383)a.push(c(t,s,s+16383>u?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;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function f(t){var e=t.length;if(e%4>0)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<r;s+=3)i=(t[s]<<16)+(t[s+1]<<8)+t[s+2],a.push(n[(o=i)>>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<e.length;r++)e[r]=this.rand.getByte();return e},"object"===("undefined"==typeof self?"undefined":_typeof(self)))self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"===("undefined"==typeof window?"undefined":_typeof(window))&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=t("crypto");if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},{crypto:17}],17:[function(t,e,r){},{}],18:[function(t,e,r){var n=t("safe-buffer").Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function a(t,e,r,n,i){for(var o,a,s,u,f=r[0],c=r[1],h=r[2],d=r[3],l=t[0]^e[0],p=t[1]^e[1],b=t[2]^e[2],m=t[3]^e[3],y=4,v=1;v<i;v++)o=f[l>>>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<e;o++)i[o]=t[o];for(o=e;o<n;o++){var a=i[o-1];o%e==0?(a=a<<8|a>>>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<n;c++){var h=n-c,d=i[h-(c%4?0:4)];f[c]=c<4||h<=4?d:u.INV_SUB_MIX[0][u.SBOX[d>>>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;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},c.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},c.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},e.exports=c},{"./aes":18,"./ghash":23,"./incr32":24,"buffer-xor":46,"cipher-base":48,inherits:101,"safe-buffer":147}],20:[function(t,e,r){var n=t("./encrypter"),i=t("./decrypter"),o=t("./modes/list.json");r.createCipher=r.Cipher=n.createCipher,r.createCipheriv=r.Cipheriv=n.createCipheriv,r.createDecipher=r.Decipher=i.createDecipher,r.createDecipheriv=r.Decipheriv=i.createDecipheriv,r.listCiphers=r.getCiphers=function(){return Object.keys(o)}},{"./decrypter":21,"./encrypter":22,"./modes/list.json":32}],21:[function(t,e,r){var n=t("./authCipher"),i=t("safe-buffer").Buffer,o=t("./modes"),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 h,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function d(t,e,r){var s=o[t.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 e&&(e=i.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===s.type?new a(s.module,e,r,!0):"auth"===s.type?new n(s.module,e,r,!0):new c(s.module,e,r)}t("inherits")(c,s),c.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15],r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=i.concat([this.cache,t])},h.prototype.get=function(t){var e;if(t){if(this.cache.length>16)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<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},r.createCipheriv=l,r.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=f(e,!1,r.key,r.iv);return l(t,i.key,i.iv)}},{"./aes":18,"./authCipher":19,"./modes":31,"./streamCipher":34,"cipher-base":48,evp_bytestokey:84,inherits:101,"safe-buffer":147}],23:[function(t,e,r){var n=t("safe-buffer").Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>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;++e<t.length;)this.state[e]^=t[e];this._multiply()},a.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),e=3;e>0;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<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}r.encrypt=function(t,e,r){for(var o=e.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(t,e[s],r);return a}},{"safe-buffer":147}],28:[function(t,e,r){var n=t("safe-buffer").Buffer;r.encrypt=function(t,e,r){for(var i,o,a,s,u=e.length,f=n.allocUnsafe(u),c=-1;++c<u;)f[c]=(i=t,o=e[c],a=r,void 0,s=i._cipher.encryptBlock(i._prev)[0]^o,i._prev=n.concat([i._prev.slice(1),n.from([a?o:s])]),s);return f}},{"safe-buffer":147}],29:[function(t,e,r){var n=t("buffer-xor"),i=t("safe-buffer").Buffer,o=t("../incr32");r.encrypt=function(t,e){var r,a,s=Math.ceil(e.length/16),u=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*s)]);for(var f=0;f<s;f++){var c=(void 0,a=(r=t)._cipher.encryptBlockRaw(r._prev),o(r._prev),a),h=u+16*f;t._cache.writeUInt32BE(c[0],h+0),t._cache.writeUInt32BE(c[1],h+4),t._cache.writeUInt32BE(c[2],h+8),t._cache.writeUInt32BE(c[3],h+12)}var d=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,d)}},{"../incr32":24,"buffer-xor":46,"safe-buffer":147}],30:[function(t,e,r){r.encrypt=function(t,e){return t._cipher.encryptBlock(e)},r.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},{}],31:[function(t,e,r){var n={ECB:t("./ecb"),CBC:t("./cbc"),CFB:t("./cfb"),CFB8:t("./cfb8"),CFB1:t("./cfb1"),OFB:t("./ofb"),CTR:t("./ctr"),GCM:t("./ctr")},i=t("./list.json");for(var o in i)i[o].module=n[i[o].mode];e.exports=i},{"./cbc":25,"./cfb":26,"./cfb1":27,"./cfb8":28,"./ctr":29,"./ecb":30,"./list.json":32,"./ofb":33}],32:[function(t,e,r){e.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],33:[function(t,e,r){(function(e){var n=t("buffer-xor");r.encrypt=function(t,r){for(;t._cache.length<r.length;)t._cache=e.concat([t._cache,(i=t,i._prev=i._cipher.encryptBlock(i._prev),i._prev)]);var i,o=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),n(r,o)}}).call(this,t("buffer").Buffer)},{buffer:47,"buffer-xor":46}],34:[function(t,e,r){var n=t("./aes"),i=t("safe-buffer").Buffer,o=t("cipher-base");function a(t,e,r,a){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=t}t("inherits")(a,o),a.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},e.exports=a},{"./aes":18,"cipher-base":48,inherits:101,"safe-buffer":147}],35:[function(t,e,r){var n=t("evp_bytestokey"),i=t("browserify-aes/browser"),o=t("browserify-des"),a=t("browserify-des/modes"),s=t("browserify-aes/modes");function u(t,e,r){if(t=t.toLowerCase(),s[t])return i.createCipheriv(t,e,r);if(a[t])return new o({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function f(t,e,r){if(t=t.toLowerCase(),s[t])return i.createDecipheriv(t,e,r);if(a[t])return new o({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}r.createCipher=r.Cipher=function(t,e){var r,i;if(t=t.toLowerCase(),s[t])r=s[t].key,i=s[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");r=8*a[t].key,i=a[t].iv}var o=n(e,!1,r,i);return u(t,o.key,o.iv)},r.createCipheriv=r.Cipheriv=u,r.createDecipher=r.Decipher=function(t,e){var r,i;if(t=t.toLowerCase(),s[t])r=s[t].key,i=s[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");r=8*a[t].key,i=a[t].iv}var o=n(e,!1,r,i);return f(t,o.key,o.iv)},r.createDecipheriv=r.Decipheriv=f,r.listCiphers=r.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},{"browserify-aes/browser":20,"browserify-aes/modes":31,"browserify-des":36,"browserify-des/modes":37,evp_bytestokey:84}],36:[function(t,e,r){(function(r){var n=t("cipher-base"),i=t("des.js"),o=t("inherits"),a={"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 s(t){n.call(this);var e,i=t.mode.toLowerCase(),o=a[i];e=t.decrypt?"decrypt":"encrypt";var s=t.key;"des-ede"!==i&&"des-ede-cbc"!==i||(s=r.concat([s,s.slice(0,8)]));var u=t.iv;this._des=o.create({key:s,iv:u,type:e})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=s,o(s,n),s.prototype._update=function(t){return new r(this._des.update(t))},s.prototype._final=function(){return new r(this._des.final())}}).call(this,t("buffer").Buffer)},{buffer:47,"cipher-base":48,"des.js":57,inherits:101}],37:[function(t,e,r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},{}],38:[function(t,e,r){(function(r){var n=t("bn.js"),i=t("randombytes");function o(t,e){var i,o,s={blinder:(o=a(i=e)).toRed(n.mont(i.modulus)).redPow(new n(i.publicExponent)).fromRed(),unblinder:o.invm(i.modulus)},u=e.modulus.byteLength(),f=(n.mont(e.modulus),new n(t).mul(s.blinder).umod(e.modulus)),c=f.toRed(n.mont(e.prime1)),h=f.toRed(n.mont(e.prime2)),d=e.coefficient,l=e.prime1,p=e.prime2,b=c.redPow(e.exponent1),m=h.redPow(e.exponent2);b=b.fromRed(),m=m.fromRed();var y=b.isub(m).imul(d).umod(l);return y.imul(p),m.iadd(y),new r(m.imul(s.unblinder).umod(e.modulus).toArray(!1,u))}function a(t){for(var e=t.modulus.byteLength(),r=new n(i(e));r.cmp(t.modulus)>=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())).length<e.byteLength()){var a=new r(e.byteLength()-t.length);a.fill(0),t=r.concat([a,t])}var s=i.length,u=function(t,e){t=(t=c(t,e)).mod(e);var n=new r(t.toArray());if(n.length<e.byteLength()){var i=new r(e.byteLength()-n.length);i.fill(0),n=r.concat([i,n])}return n}(i,e),f=new r(s);f.fill(1);var h=new r(s);return h.fill(0),h=n(o,h).update(f).update(new r([0])).update(t).update(u).digest(),f=n(o,h).update(f).digest(),{k:h=n(o,h).update(f).update(new r([1])).update(t).update(u).digest(),v:f=n(o,h).update(f).digest()}}function c(t,e){var r=new a(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function h(t,e,i){var o,a;do{for(o=new r(0);8*o.length<t.bitLength();)e.v=n(i,e.k).update(e.v).digest(),o=r.concat([o,e.v]);a=c(o,t),e.k=n(i,e.k).update(e.v).update(new r([0])).digest(),e.v=n(i,e.k).update(e.v).digest()}while(-1!==a.cmp(t));return a}e.exports=function(t,e,n,d,l){var p=s(e);if(p.curve){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");return function(t,e){var n=u[e.curve.join(".")];if(!n)throw new Error("unknown curve "+e.curve.join("."));var i=new o(n).keyFromPrivate(e.privateKey).sign(t);return new r(i.toDER())}(t,p)}if("dsa"===p.type){if("dsa"!==d)throw new Error("wrong private key type");return function(t,e,n){for(var i,o,s,u,d=e.params.priv_key,l=e.params.p,p=e.params.q,b=e.params.g,m=new a(0),y=c(t,p).mod(p),v=!1,g=f(d,p,t,n);!1===v;)i=h(p,g,n),o=i,s=l,u=p,m=b.toRed(a.mont(s)).redPow(o).fromRed().mod(u),0===(v=i.invm(p).imul(y.add(d.mul(m))).mod(p)).cmpn(0)&&(v=!1,m=new a(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t)),128&e[0]&&(e=[0].concat(e));var n=[48,t.length+e.length+4,2,t.length];return n=n.concat(t,[2,e.length],e),new r(n)}(m,v)}(t,p,n)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");t=r.concat([l,t]);for(var b=p.modulus.byteLength(),m=[0,1];t.length+m.length+1<b;)m.push(255);m.push(0);for(var y=-1;++y<t.length;)m.push(t[y]);return i(m,p)},e.exports.getKey=f,e.exports.makeKey=h}).call(this,t("buffer").Buffer)},{"./curves.json":41,"bn.js":"BN","browserify-rsa":38,buffer:47,"create-hmac":54,elliptic:67,"parse-asn1":113}],44:[function(t,e,r){(function(r){var n=t("bn.js"),i=t("elliptic").ec,o=t("parse-asn1"),a=t("./curves.json");function s(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=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<d;)l.push(255),p++;l.push(0);for(var b=-1;++b<e.length;)l.push(e[b]);l=new r(l);var m=n.mont(h.modulus);t=(t=new n(t).toRed(m)).redPow(new n(h.publicExponent)),t=new r(t.fromRed().toArray());var y=p<8?1:0;for(d=Math.min(t.length,l.length),t.length!==l.length&&(y=1),b=-1;++b<d;)y|=t[b]^l[b];return 0===y}}).call(this,t("buffer").Buffer)},{"./curves.json":41,"bn.js":"BN",buffer:47,elliptic:67,"parse-asn1":113}],45:[function(t,e,r){arguments[4][17][0].apply(r,arguments)},{dup:17}],46:[function(t,e,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;o<n;++o)i[o]=e[o]^r[o];return i}}).call(this,t("buffer").Buffer)},{buffer:47}],47:[function(t,e,r){var n=t("base64-js"),i=t("ieee754");r.Buffer=s,r.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function a(t){if(t>o)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<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=s.prototype,n}(t,e,r):"string"==typeof t?function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|l(t,e),n=a(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e):function(t){if(s.isBuffer(t)){var e=0|d(t.length),r=a(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(t){if(L(t)||"length"in t)return"number"!=typeof t.length||F(t.length)?a(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t){return f(t),a(t<0?0:0|d(t))}function h(t){for(var e=t.length<0?0:0|d(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function d(t){if(t>=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;o<s;o++)if(f(t,o)===f(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var h=!0,d=0;d<u;d++)if(f(t,o+d)!==f(e,d)){h=!1;break}if(h)return o}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(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;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(F(s))return a;t[r+a]=s}return a}function v(t,e,r,n){return O(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function g(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function w(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,f=t[i],c=null,h=f>239?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(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=_));return r}(n)}r.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(t,e,r){return u(t,e,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(t,e,r){return i=e,o=r,f(n=t),n<=0?a(n):void 0!==i?"string"==typeof o?a(n).fill(i,o):a(n).fill(i):a(n);var n,i,o},s.allocUnsafe=function(t){return c(t)},s.allocUnsafeSlow=function(t){return c(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},s.byteLength=l,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)p(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)p(this,e,e+3),p(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?w(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return 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+=" ... ")),"<Buffer "+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<u;++h)if(f[h]!==c[h]){o=f[h],a=c[h];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=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<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>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;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=C(t[o]);return i}function S(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function E(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)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||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.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<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUIntBE=function(t,e,r){t>>>=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<e&&(i*=256);)n+=this[t+o]*i;return n>=(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<r&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUIntBE=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=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<r&&(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.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<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=s.isBuffer(t)?t:new s(t,n),u=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%u]}return this};var T=/[^+/0-9A-Za-z-_]/g;function C(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&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<n&&!(i+r>=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<n){var o=new r(n-i.length);o.fill(0),i=r.concat([o,i])}return e?i.toString(e):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},a.prototype.computeSecret=function(t,e,n){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),s(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},a.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),s(r,t)},a.prototype.getPrivateKey=function(t){return s(this.keys.getPrivate(),t)},a.prototype.setPublicKey=function(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this.keys._importPublic(t),this},a.prototype.setPrivateKey=function(t,e){e=e||"utf8",r.isBuffer(t)||(t=new r(t,e));var n=new i(t);return n=n.toString(16),this.keys._importPrivate(n),this}}).call(this,t("buffer").Buffer)},{"bn.js":"BN",buffer:47,elliptic:67}],51:[function(t,e,r){(function(r){var n=t("inherits"),i=t("./md5"),o=t("ripemd160"),a=t("sha.js"),s=t("cipher-base");function u(t){s.call(this,"digest"),this._hash=t,this.buffers=[]}function f(t){s.call(this,"digest"),this._hash=t}n(u,s),u.prototype._update=function(t){this.buffers.push(t)},u.prototype._final=function(){var t=r.concat(this.buffers),e=this._hash(t);return this.buffers=null,e},n(f,s),f.prototype._update=function(t){this._hash.update(t)},f.prototype._final=function(){return this._hash.digest()},e.exports=function(t){return"md5"===(t=t.toLowerCase())?new u(i):new f("rmd160"===t||"ripemd160"===t?new o:a(t))}}).call(this,t("buffer").Buffer)},{"./md5":53,buffer:47,"cipher-base":48,inherits:101,ripemd160:146,"sha.js":149}],52:[function(t,e,r){(function(t){var r=4,n=new t(r);n.fill(0);e.exports=function(e,i){var o=i(function(e){if(e.length%r!=0){var i=e.length+(r-e.length%r);e=t.concat([e,n],i)}for(var o=new Array(e.length>>>2),a=0,s=0;a<e.length;a+=r,s++)o[s]=e.readInt32LE(a);return o}(e),8*e.length);e=new t(16);for(var a=0;a<o.length;a++)e.writeInt32LE(o[a],a<<2,!0);return e}}).call(this,t("buffer").Buffer)},{buffer:47}],53:[function(t,e,r){var n=t("./make-hash");function i(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,h=0;h<t.length;h+=16){var d=r,l=n,p=i,b=o;n=f(n=f(n=f(n=f(n=u(n=u(n=u(n=u(n=s(n=s(n=s(n=s(n=a(n=a(n=a(n=a(n,i=a(i,o=a(o,r=a(r,n,i,o,t[h+0],7,-680876936),n,i,t[h+1],12,-389564586),r,n,t[h+2],17,606105819),o,r,t[h+3],22,-1044525330),i=a(i,o=a(o,r=a(r,n,i,o,t[h+4],7,-176418897),n,i,t[h+5],12,1200080426),r,n,t[h+6],17,-1473231341),o,r,t[h+7],22,-45705983),i=a(i,o=a(o,r=a(r,n,i,o,t[h+8],7,1770035416),n,i,t[h+9],12,-1958414417),r,n,t[h+10],17,-42063),o,r,t[h+11],22,-1990404162),i=a(i,o=a(o,r=a(r,n,i,o,t[h+12],7,1804603682),n,i,t[h+13],12,-40341101),r,n,t[h+14],17,-1502002290),o,r,t[h+15],22,1236535329),i=s(i,o=s(o,r=s(r,n,i,o,t[h+1],5,-165796510),n,i,t[h+6],9,-1069501632),r,n,t[h+11],14,643717713),o,r,t[h+0],20,-373897302),i=s(i,o=s(o,r=s(r,n,i,o,t[h+5],5,-701558691),n,i,t[h+10],9,38016083),r,n,t[h+15],14,-660478335),o,r,t[h+4],20,-405537848),i=s(i,o=s(o,r=s(r,n,i,o,t[h+9],5,568446438),n,i,t[h+14],9,-1019803690),r,n,t[h+3],14,-187363961),o,r,t[h+8],20,1163531501),i=s(i,o=s(o,r=s(r,n,i,o,t[h+13],5,-1444681467),n,i,t[h+2],9,-51403784),r,n,t[h+7],14,1735328473),o,r,t[h+12],20,-1926607734),i=u(i,o=u(o,r=u(r,n,i,o,t[h+5],4,-378558),n,i,t[h+8],11,-2022574463),r,n,t[h+11],16,1839030562),o,r,t[h+14],23,-35309556),i=u(i,o=u(o,r=u(r,n,i,o,t[h+1],4,-1530992060),n,i,t[h+4],11,1272893353),r,n,t[h+7],16,-155497632),o,r,t[h+10],23,-1094730640),i=u(i,o=u(o,r=u(r,n,i,o,t[h+13],4,681279174),n,i,t[h+0],11,-358537222),r,n,t[h+3],16,-722521979),o,r,t[h+6],23,76029189),i=u(i,o=u(o,r=u(r,n,i,o,t[h+9],4,-640364487),n,i,t[h+12],11,-421815835),r,n,t[h+15],16,530742520),o,r,t[h+2],23,-995338651),i=f(i,o=f(o,r=f(r,n,i,o,t[h+0],6,-198630844),n,i,t[h+7],10,1126891415),r,n,t[h+14],15,-1416354905),o,r,t[h+5],21,-57434055),i=f(i,o=f(o,r=f(r,n,i,o,t[h+12],6,1700485571),n,i,t[h+3],10,-1894986606),r,n,t[h+10],15,-1051523),o,r,t[h+1],21,-2054922799),i=f(i,o=f(o,r=f(r,n,i,o,t[h+8],6,1873313359),n,i,t[h+15],10,-30611744),r,n,t[h+6],15,-1560198380),o,r,t[h+13],21,1309151649),i=f(i,o=f(o,r=f(r,n,i,o,t[h+4],6,-145523070),n,i,t[h+11],10,-1120210379),r,n,t[h+2],15,718787259),o,r,t[h+9],21,-343485551),r=c(r,d),n=c(n,l),i=c(i,p),o=c(o,b)}return[r,n,i,o]}function o(t,e,r,n,i,o){return c((a=c(c(e,t),c(n,o)))<<(s=i)|a>>>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.length<r&&(e=a.concat([e,c],r));for(var n=this._ipad=a.allocUnsafe(r),i=this._opad=a.allocUnsafe(r),s=0;s<r;s++)n[s]=54^e[s],i[s]=92^e[s];this._hash="rmd160"===t?new u:f(t),this._hash.update(n)}n(h,o),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:f(this._alg)).update(this._opad).update(t).digest()},e.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new h("rmd160",e):"md5"===t?new i(s,e):new h(t,e)}},{"./legacy":55,"cipher-base":48,"create-hash/md5":53,inherits:101,ripemd160:146,"safe-buffer":147,"sha.js":149}],55:[function(t,e,r){var n=t("inherits"),i=t("safe-buffer").Buffer,o=t("cipher-base"),a=i.alloc(128),s=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length<s&&(e=i.concat([e,a],s));for(var r=this._ipad=i.allocUnsafe(s),n=this._opad=i.allocUnsafe(s),u=0;u<s;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},e.exports=u},{"cipher-base":48,inherits:101,"safe-buffer":147}],56:[function(t,e,r){r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=t("randombytes"),r.createHash=r.Hash=t("create-hash"),r.createHmac=r.Hmac=t("create-hmac");var n=t("browserify-sign/algos"),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);r.getHashes=function(){return o};var a=t("pbkdf2");r.pbkdf2=a.pbkdf2,r.pbkdf2Sync=a.pbkdf2Sync;var s=t("browserify-cipher");r.Cipher=s.Cipher,r.createCipher=s.createCipher,r.Cipheriv=s.Cipheriv,r.createCipheriv=s.createCipheriv,r.Decipher=s.Decipher,r.createDecipher=s.createDecipher,r.Decipheriv=s.Decipheriv,r.createDecipheriv=s.createDecipheriv,r.getCiphers=s.getCiphers,r.listCiphers=s.listCiphers;var u=t("diffie-hellman");r.DiffieHellmanGroup=u.DiffieHellmanGroup,r.createDiffieHellmanGroup=u.createDiffieHellmanGroup,r.getDiffieHellman=u.getDiffieHellman,r.createDiffieHellman=u.createDiffieHellman,r.DiffieHellman=u.DiffieHellman;var f=t("browserify-sign");r.createSign=f.createSign,r.Sign=f.Sign,r.createVerify=f.createVerify,r.Verify=f.Verify,r.createECDH=t("create-ecdh");var c=t("public-encrypt");r.publicEncrypt=c.publicEncrypt,r.privateEncrypt=c.privateEncrypt,r.publicDecrypt=c.publicDecrypt,r.privateDecrypt=c.privateDecrypt;var h=t("randomfill");r.randomFill=h.randomFill,r.randomFillSync=h.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.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}},{"browserify-cipher":35,"browserify-sign":42,"browserify-sign/algos":39,"create-ecdh":50,"create-hash":51,"create-hmac":54,"diffie-hellman":63,pbkdf2:114,"public-encrypt":121,randombytes:131,randomfill:132}],57:[function(t,e,r){r.utils=t("./des/utils"),r.Cipher=t("./des/cipher"),r.DES=t("./des/des"),r.CBC=t("./des/cbc"),r.EDE=t("./des/ede")},{"./des/cbc":58,"./des/cipher":59,"./des/des":60,"./des/ede":61,"./des/utils":62}],58:[function(t,e,r){var n=t("minimalistic-assert"),i=t("inherits"),o={};r.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n<r.length;n++){var a=r[n];e.prototype[a]=o[a]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new function(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=t[e+s];o._update.call(this,a,0,r,n);for(s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{o._update.call(this,t,e,r,n);for(s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=t[e+s]}}},{inherits:101,"minimalistic-assert":107}],59:[function(t,e,r){var n=t("minimalistic-assert");function i(t){this.options=t,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(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;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<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},{"minimalistic-assert":107}],60:[function(t,e,r){var n=t("minimalistic-assert"),i=t("inherits"),o=t("../des"),a=o.utils,s=o.Cipher;function u(t){s.call(this,t);var e=new function(){this.tmp=new Array(2),this.keys=null};this._desState=e,this.deriveKeys(e,t.key)}i(u,s),e.exports=u,u.create=function(t){return new u(t)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,"Invalid key length");var r=a.readUInt32BE(e,0),i=a.readUInt32BE(e,4);a.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var o=0;o<t.keys.length;o+=2){var s=f[o>>>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<t.length;n++)t[n]=r;return!0},u.prototype._unpad=function(t){for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,r,n,i){for(var o=e,s=r,u=0;u<t.keys.length;u+=2){var f=t.keys[u],c=t.keys[u+1];a.expand(s,t.tmp,0),f^=t.tmp[0],c^=t.tmp[1];var h=a.substitute(f,c),d=s;s=(o^a.permute(h))>>>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<<e&268435455|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<s;u++)o<<=1,o|=t>>>n[u]&1;for(u=s;u<n.length;u++)a<<=1,a|=e>>>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.length;r++)e<<=1,e|=t>>>o[r]&1;return e>>>0},r.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},{}],63:[function(t,e,r){(function(e){var n=t("./lib/generatePrime"),i=t("./lib/primes.json"),o=t("./lib/dh");var a={binary:!0,hex:!0,base64:!0};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new o(r,n)},r.createDiffieHellman=r.DiffieHellman=function t(r,i,s,u){return e.isBuffer(i)||void 0===a[i]?t(r,"binary",i,s):(i=i||"binary",u=u||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,u)),"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,t("buffer").Buffer)},{"./lib/dh":64,"./lib/generatePrime":65,"./lib/primes.json":66,buffer:47}],64:[function(t,e,r){(function(r){var n=t("bn.js"),i=new(t("miller-rabin")),o=new n(24),a=new n(11),s=new n(10),u=new n(3),f=new n(7),c=t("./generatePrime"),h=t("randombytes");function d(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._pub=new n(t),this}function l(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._priv=new n(t),this}e.exports=b;var p={};function b(t,e,r){this.setGenerator(e),this.__prime=new n(t),this._prime=n.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=l):this._primeCode=8}function m(t,e){var n=new r(t.toArray());return e?n.toString(e):n}Object.defineProperty(b.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in p)return p[n];var h,d=0;if(t.isEven()||!c.simpleSieve||!c.fermatTest(t)||!i.test(t))return d+=1,d+="02"===r||"05"===r?8:4,p[n]=d,d;switch(i.test(t.shrn(1))||(d+=2),r){case"02":t.mod(o).cmp(a)&&(d+=8);break;case"05":(h=t.mod(s)).cmp(u)&&h.cmp(f)&&(d+=8);break;default:d+=4}return p[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),b.prototype.generateKeys=function(){return this._priv||(this._priv=new n(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},b.prototype.computeSecret=function(t){var e=(t=(t=new n(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new r(e.toArray()),o=this.getPrime();if(i.length<o.length){var a=new r(o.length-i.length);a.fill(0),i=r.concat([a,i])}return i},b.prototype.getPublicKey=function(t){return m(this._pub,t)},b.prototype.getPrivateKey=function(t){return m(this._priv,t)},b.prototype.getPrime=function(t){return m(this.__prime,t)},b.prototype.getGenerator=function(t){return m(this._gen,t)},b.prototype.setGenerator=function(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this.__gen=t,this._gen=new n(t),this}}).call(this,t("buffer").Buffer)},{"./generatePrime":65,"bn.js":"BN",buffer:47,"miller-rabin":106,randombytes:131}],65:[function(t,e,r){var n=t("randombytes");e.exports=y,y.simpleSieve=b,y.fermatTest=m;var i=t("bn.js"),o=new i(24),a=new(t("miller-rabin")),s=new i(1),u=new i(2),f=new i(5),c=(new i(16),new i(8),new i(10)),h=new i(3),d=(new i(7),new i(11)),l=new i(4),p=(new i(12),null);function b(t){for(var e=function(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return p=t,t}(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function m(t){var e=i.mont(t);return 0===u.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function y(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var r,p;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)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<<r.step+1)-(r.step%2==0?2:1);i/=3;for(var a=[],u=0;u<n.length;u+=r.step){var f=0;for(e=u+r.step-1;e>=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<a.length;u++){(f=a[u])===d?h=h.mixedAdd(r.points[u]):f===-d&&(h=h.mixedAdd(r.points[u].neg()))}c=c.add(h)}return c.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(e,r),u=this.jpoint(null,null,null),f=a.length-1;f>=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<n;h++){var d=(S=e[h])._getNAFPoints(t);s[h]=d.wnd,u[h]=d.points}for(h=n-1;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<c;v++){var g=0|y[0][v],w=0|y[1][v];f[l][v]=m[3*(g+1)+(w+1)],f[p][v]=0,u[l]=b}}else f[l]=o(r[l],s[l]),f[p]=o(r[p],s[p]),c=Math.max(f[l].length,c),c=Math.max(f[p].length,c)}var _=this.jpoint(null,null,null),M=this._wnafT4;for(h=c;h>=0;h--){for(var x=0;h>=0;){var k=!0;for(v=0;v<n;v++)M[v]=0|f[v][h],0!==M[v]&&(k=!1);if(!k)break;x++,h--}if(h>=0&&x++,_=_.dblp(x),h<0)break;for(v=0;v<n;v++){var S,E=M[v];0!==E&&(E>0?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<n;h++)u[h]=null;return i?_:_.toP()},u.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?s(t[t.length-1]%2==0):7===t[0]&&s(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(t){return this.encode(t,!0)},f.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},f.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},f.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},f.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=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<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},f.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},{"../../elliptic":67,"bn.js":"BN"}],69:[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){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new o(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function c(t,e,r,n,i){s.BasePoint.call(this,t,"projective"),null===e&&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 o(e,16),this.y=new o(r,16),this.z=n?new o(n,16):this.curve.one,this.t=i&&new o(i,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()))))}a(f,s),e.exports=f,f.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},f.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},f.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},f.prototype.pointFromX=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(i.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(e&&!u||!e&&u)&&(s=s.redNeg()),this.point(t,s)},f.prototype.pointFromY=function(t,e){(t=new o(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.one),i=r.redMul(this.d).redAdd(this.one),a=n.redMul(i.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},f.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},a(c,s.BasePoint),f.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},f.prototype.point=function(t,e,r,n){return new c(this,t,e,r,n)},c.fromJSON=function(t,e){return new c(t,e[0],e[1],e[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},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()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},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<t.length;o++){var a=this._endoSplit(e[o]),s=t[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var f=this._wnafMulAdd(1,n,i,2*o,r),c=0;c<2*o;c++)n[c]=null,i[c]=null;return f},a(c,s.BasePoint),f.prototype.point=function(t,e,r){return new c(this,t,e,r)},f.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},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<t;r++)e=e.dbl();return e}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),f=a.redAdd(a);for(r=0;r<t;r++){var c=o.redSqr(),h=f.redSqr(),d=h.redSqr(),l=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(u)),p=o.redMul(h),b=l.redSqr().redISub(p.redAdd(p)),m=p.redISub(b),y=l.redMul(m);y=y.redIAdd(y).redISub(d);var v=f.redMul(s);r+1<t&&(u=u.redMul(d)),o=b,s=v,f=y}return this.curve.jpoint(o,f.redMul(i),s)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},h.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),t=u,e=s.redMul(a.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),l=this.x.redAdd(h).redSqr().redISub(c).redISub(d);l=l.redIAdd(l);var p=c.redAdd(c).redIAdd(c),b=p.redSqr(),m=d.redIAdd(d);m=(m=m.redIAdd(m)).redIAdd(m),t=b.redISub(l).redISub(l),e=p.redMul(l.redISub(t)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},h.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a);t=u;var f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),e=s.redMul(a.redISub(u)).redISub(f),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),l=this.x.redSub(c).redMul(this.x.redAdd(c));l=l.redAdd(l).redIAdd(l);var p=d.redIAdd(d),b=(p=p.redIAdd(p)).redAdd(p);t=l.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var m=h.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),e=l.redMul(p.redISub(t)).redISub(m)}return this.curve.jpoint(t,e,r)},h.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),f=(u=u.redIAdd(u)).redMul(a),c=s.redSqr().redISub(f.redAdd(f)),h=f.redISub(c),d=a.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=s.redMul(h).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(c,l,p)},h.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var f=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),c=e.redMul(f);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(s).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.y.redMul(f.redMul(u.redISub(f)).redISub(a.redMul(s)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(h,d,l)},h.prototype.mul=function(t,e){return t=new o(t,e),this.curve._wnafMul(this,t)},h.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},h.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},h.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},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"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../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<n;o++,a++)i<<=8,i|=t[a];return e.place=a,i}function u(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function f(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>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<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},c.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},c.prototype.makeSignature=function(t){return t instanceof f?t:new f(this,t)},c.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},c.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},c.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(t){return o.intFromLE(t)},c.prototype.isPoint=function(t){return t instanceof this.pointClass}},{"../../elliptic":67,"./key":78,"./signature":79,"hash.js":86}],78:[function(t,e,r){var n=t("../../elliptic").utils,i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}s.fromPublic=function(t,e){return e instanceof s?e:new s(t,{pub:e})},s.fromSecret=function(t,e){return e instanceof s?e:new s(t,{secret:e})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(s,"privBytes",function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),a(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},s.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},s.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},s.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},e.exports=s},{"../../elliptic":67}],79:[function(t,e,r){var n=t("bn.js"),i=t("../../elliptic").utils,o=i.assert,a=i.cachedProperty,s=i.parseBytes;function u(t,e){this.eddsa=t,"object"!==(void 0===e?"undefined":_typeof(e))&&(e=s(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}a(u,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),a(u,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),a(u,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),a(u,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},{"../../elliptic":67,"bn.js":"BN"}],80:[function(t,e,r){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],81:[function(t,e,r){var n=r,i=t("bn.js"),o=t("minimalistic-assert"),a=t("minimalistic-crypto-utils");n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(t,e){for(var r=[],n=1<<e+1,i=t.clone();i.cmpn(1)>=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;u<s;u++)r.push(0);i.iushrn(s)}return r},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||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;u<n;u++)f[u].apply(this,s);return!0},n.prototype.addListener=function(t,e){var r;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&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(h<f.length&&o>0){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;o<this._blockSize;)n[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var a=0,s=8*t.length;s>0;++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<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>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;o<this.padLength;o++)n[i++]=0;return n}},{"./utils":97,"minimalistic-assert":107}],88:[function(t,e,r){var n=t("./utils"),i=t("minimalistic-assert");function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}e.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},{"./utils":97,"minimalistic-assert":107}],89:[function(t,e,r){var n=t("./utils"),i=t("./common"),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,f=i.BlockHash;function c(){if(!(this instanceof c))return new c;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function d(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function l(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(c,f),r.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],f=this.h[3],c=this.h[4],v=r,g=n,w=i,_=f,M=c,x=0;x<80;x++){var k=a(o(u(r,h(x,n,i,f),t[p[x]+e],d(x)),m[x]),c);r=c,c=f,f=o(i,10),i=n,n=k,k=a(o(u(v,h(79-x,g,w,_),t[b[x]+e],l(x)),y[x]),M),v=M,M=_,_=o(w,10),w=g,g=k}k=s(this.h[1],i,_),this.h[1]=s(this.h[2],f,M),this.h[2]=s(this.h[3],c,v),this.h[3]=s(this.h[4],r,g),this.h[4]=s(this.h[0],n,w),this.h[0]=k},c.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],b=[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],m=[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],y=[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]},{"./common":87,"./utils":97}],90:[function(t,e,r){r.sha1=t("./sha/1"),r.sha224=t("./sha/224"),r.sha256=t("./sha/256"),r.sha384=t("./sha/384"),r.sha512=t("./sha/512")},{"./sha/1":91,"./sha/224":92,"./sha/256":93,"./sha/384":94,"./sha/512":95}],91:[function(t,e,r){var n=t("../utils"),i=t("../common"),o=t("./common"),a=n.rotl32,s=n.sum32,u=n.sum32_5,f=o.ft_1,c=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],d=this.h[3],l=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=u(a(i,5),f(p,o,c,d),l,r[n],h[p]);l=d,d=c,c=a(o,30),o=i,i=b}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],c),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],l)},d.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":87,"../utils":97,"./common":96}],92:[function(t,e,r){var n=t("../utils"),i=t("./256");function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},{"../utils":97,"./256":93}],93:[function(t,e,r){var n=t("../utils"),i=t("../common"),o=t("./common"),a=t("minimalistic-assert"),s=n.sum32,u=n.sum32_4,f=n.sum32_5,c=o.ch32,h=o.maj32,d=o.s0_256,l=o.s1_256,p=o.g0_256,b=o.g1_256,m=i.BlockHash,y=[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;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(v,m),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],v=this.h[4],g=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var M=f(_,l(v),c(v,g,w),this.k[n],r[n]),x=s(d(i),h(i,o,m));_=w,w=g,g=v,v=s(y,M),y=m,m=o,o=i,i=s(M,x)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],m),this.h[3]=s(this.h[3],y),this.h[4]=s(this.h[4],v),this.h[5]=s(this.h[5],g),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],_)},v.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":87,"../utils":97,"./common":96,"minimalistic-assert":107}],94:[function(t,e,r){var n=t("../utils"),i=t("./512");function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},{"../utils":97,"./512":95}],95:[function(t,e,r){var n=t("../utils"),i=t("../common"),o=t("minimalistic-assert"),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,f=n.shr64_lo,c=n.sum64,h=n.sum64_hi,d=n.sum64_lo,l=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function g(){if(!(this instanceof g))return new g;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var a=e&n^~e&o;return a<0&&(a+=4294967296),a}function M(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function x(t,e,r,n,i,o){var a=e&n^e&o^n&o;return a<0&&(a+=4294967296),a}function k(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function S(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function E(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function A(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function j(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=s(t,e,1)^s(t,e,8)^f(t,e,7);return r<0&&(r+=4294967296),r}function B(t,e){var r=a(t,e,19)^a(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,19)^s(e,t,29)^f(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(g,y),e.exports=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=B(r[n-4],r[n-3]),o=T(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],u=j(r[n-30],r[n-29]),f=I(r[n-30],r[n-29]),c=r[n-32],h=r[n-31];r[n]=l(i,o,a,s,u,f,c,h),r[n+1]=p(i,o,a,s,u,f,c,h)}},g.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],f=this.h[5],l=this.h[6],p=this.h[7],y=this.h[8],v=this.h[9],g=this.h[10],j=this.h[11],I=this.h[12],B=this.h[13],T=this.h[14],C=this.h[15];o(this.k.length===r.length);for(var P=0;P<r.length;P+=2){var R=T,O=C,N=E(y,v),L=A(y,v),F=w(y,v,g,j,I),q=_(y,v,g,j,I,B),D=this.k[P],U=this.k[P+1],z=r[P],K=r[P+1],H=b(R,O,N,L,F,q,D,U,z,K),V=m(R,O,N,L,F,q,D,U,z,K);R=k(n,i),O=S(n,i),N=M(n,i,a,s,u),L=x(n,i,a,s,u,f);var W=h(R,O,N,L),X=d(R,O,N,L);T=I,C=B,I=g,B=j,g=y,j=v,y=h(l,p,H,V),v=d(p,p,H,V),l=u,p=f,u=a,f=s,a=n,s=i,n=h(H,V,W,X),i=d(H,V,W,X)}c(this.h,0,n,i),c(this.h,2,a,s),c(this.h,4,u,f),c(this.h,6,l,p),c(this.h,8,y,v),c(this.h,10,g,j),c(this.h,12,I,B),c(this.h,14,T,C)},g.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":87,"../utils":97,"minimalistic-assert":107}],96:[function(t,e,r){var n=t("../utils").rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}r.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?a(e,r,n):2===t?o(e,r,n):void 0},r.ch32=i,r.maj32=o,r.p32=a,r.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},r.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},r.g0_256=function(t){return n(t,7)^n(t,18)^t>>>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<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r},r.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},r.htonl=o,r.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=o(i)),r+=s(i.toString(16))}return r},r.zero2=a,r.zero8=s,r.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var a=new Array(o/4),s=0,u=e;s<a.length;s++,u+=4){var f;f="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],a[s]=f>>>0}return a},r.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>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<<e|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<n?1:0)+r+i;t[e]=a>>>0,t[e+1]=o},r.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>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)<e?1:0,u+=(f=f+o>>>0)<o?1:0,t+r+i+a+(u+=(f=f+s>>>0)<s?1: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)<e?1:0,c+=(h=h+o>>>0)<o?1:0,c+=(h=h+s>>>0)<s?1:0,t+r+i+a+u+(c+=(h=h+f>>>0)<f?1: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.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=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<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,t);return this._update(r),this._reseed++,i.encode(a,e)}},{"hash.js":86,"minimalistic-assert":107,"minimalistic-crypto-utils":108}],99:[function(t,e,r){r.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>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<<f)-1,h=c>>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<<i|s,f+=i;f>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<t.length;++r)if(t[r]===e)return r;return-1}},{}],101:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],102:[function(t,e,r){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||"function"==typeof(e=t).readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))||!!t._isBuffer);var e}},{}],103:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],104:[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<<e|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":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;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var a=0,s=8*t.length;s>0;++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;l<u;l++){if(0===(d=d.redSqr()).cmp(a))return!1;if(0===d.cmp(c))break}if(l===u)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var u=t.shrn(s),f=a.toRed(i);e>0;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<s;l++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(t);if(0===d.cmp(f))break}if(l===s)return(d=d.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},{"bn.js":"BN",brorand:16}],107:[function(t,e,r){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}e.exports=n,n.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},{}],108:[function(t,e,r){var n=r;function i(t){return 1===t.length?"0"+t:t}function o(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}n.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>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.length<s&&(e=u.concat([e,f],s));for(var h=u.allocUnsafe(s+c[t]),d=u.allocUnsafe(s+c[t]),l=0;l<s;l++)h[l]=54^e[l],d[l]=92^e[l];var p=u.allocUnsafe(s+r+4);h.copy(p,0,0,s),this.ipad1=p,this.ipad2=h,this.opad=d,this.alg=t,this.blocksize=s,this.hash=a,this.size=c[t]}h.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(t,e,r,n,i){u.isBuffer(t)||(t=u.from(t,s)),u.isBuffer(e)||(e=u.from(e,s)),a(r,n);var o=new h(i=i||"sha1",t,e.length),f=u.allocUnsafe(n),d=u.allocUnsafe(e.length+4);e.copy(d,0,0,e.length);for(var l=0,p=c[i],b=Math.ceil(n/p),m=1;m<=b;m++){d.writeUInt32BE(m,e.length);for(var y=o.run(d,o.ipad1),v=y,g=1;g<r;g++){v=o.run(v,o.ipad2);for(var w=0;w<p;w++)y[w]^=v[w]}y.copy(f,l),l+=p}return f}},{"./default-encoding":116,"./precondition":117,"create-hash/md5":53,ripemd160:146,"safe-buffer":147,"sha.js":149}],119:[function(t,e,r){(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick(function(){e.apply(null,o)})}}}:e.exports=t}).call(this,t("_process"))},{_process:120}],120:[function(t,e,r){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 u(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var f,c=[],h=!1,d=-1;function l(){h&&f&&(h=!1,f.length?c=f.concat(c):d=-1,c.length&&p())}function p(){if(!h){var t=u(l);h=!0;for(var e=c.length;e;){for(f=c,c=[];++d<e;)f&&f[d].run();d=-1,e=c.length}f=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function b(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new b(t,e)),1!==c.length||h||u(p)},b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],121:[function(t,e,r){r.publicEncrypt=t("./publicEncrypt"),r.privateDecrypt=t("./privateDecrypt"),r.privateEncrypt=function(t,e){return r.publicEncrypt(t,e,!0)},r.publicDecrypt=function(t,e){return r.privateDecrypt(t,e,!0)}},{"./privateDecrypt":123,"./publicEncrypt":124}],122:[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.length<e;)o=i(s++),a=r.concat([a,n("sha1").update(t).update(o).digest()]);return a.slice(0,e)}}).call(this,t("buffer").Buffer)},{buffer:47,"create-hash":51}],123:[function(t,e,r){(function(r){var n=t("parse-asn1"),i=t("./mgf"),o=t("./xor"),a=t("bn.js"),s=t("browserify-rsa"),u=t("create-hash"),f=t("./withPublic");e.exports=function(t,e,c){var h;h=t.padding?t.padding:c?1:4;var d,l=n(t),p=l.modulus.byteLength();if(e.length>p||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<i;)n+=t[o]^e[o];return n}(a,d.slice(0,s)))throw new Error("decryption error");var l=s;for(;0===d[l];)l++;if(1!==d[l++])throw new Error("decryption error");return d.slice(l)}(l,d);if(1===h)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=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<t;)u===s.length&&(s=i(2*t),u=0),(n=s[u++])&&(o[a++]=n);return o}(s-a-3);return new u(r.concat([new r([0,n?1:2]),o,new r([0]),e],s))}(p,e,h);else{if(3!==d)throw new Error("unknown padding");if((l=new u(e)).cmp(p.modulus)>=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<r;)t[n]^=e[n];return t}},{}],127:[function(t,e,r){(function(t){!function(n){var i="object"==(void 0===r?"undefined":_typeof(r))&&r&&!r.nodeType&&r,o="object"==(void 0===e?"undefined":_typeof(e))&&e&&!e.nodeType&&e,a="object"==(void 0===t?"undefined":_typeof(t))&&t;a.global!==a&&a.window!==a&&a.self!==a||(n=a);var s,u,f=2147483647,c=36,h=1,d=26,l=38,p=700,b=72,m=128,y="-",v=/^xn--/,g=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 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<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function I(t){return E(t,function(t){var e="";return t>65535&&(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<r;++n)t.charCodeAt(n)>=128&&S("not-basic"),g.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<w;){for(o=_,a=1,s=c;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<g;++a)(v=t[a])<128&&E.push(k(v));for(n=i=E.length,i&&E.push(y);n<g;){for(s=f,a=0;a<g;++a)(v=t[a])>=e&&v<s&&(s=v);for(s-e>x((f-r)/(w=n+1))&&S("overflow"),r+=(s-e)*w,e=s,a=0;a<g;++a)if((v=t[a])<e&&++r>f&&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<c;++h){var d,l,p,b,m=t[h].replace(a,"%20"),y=m.indexOf(r);y>=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;n<t.length;n++)r.push(e(t[n],n));return r}var a=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],130:[function(t,e,r){r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":128,"./encode":129}],131:[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":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;f<u.length;f++){var c=u[f];h.prototype[c]||(h.prototype[c]=s.prototype[c])}function h(t){if(!(this instanceof h))return new h(t);a.call(this,t),s.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||n(l,this)}function l(t){t.end()}Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),n(e,t)}},{"./_stream_readable":136,"./_stream_writable":138,"core-util-is":49,inherits:101,"process-nextick-args":119}],135:[function(t,e,r){e.exports=o;var n=t("./_stream_transform"),i=t("core-util-is");function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=t("inherits"),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":137,"core-util-is":49,inherits:101}],136:[function(t,e,r){(function(r,n){var i=t("process-nextick-args").nextTick;e.exports=g;var o,a=t("isarray");g.ReadableState=v;t("events").EventEmitter;var s=function(t,e){return t.listeners(e).length},u=t("./internal/streams/stream"),f=t("safe-buffer").Buffer,c=n.Uint8Array||function(){};var h=t("core-util-is");h.inherits=t("inherits");var d=t("util"),l=void 0;l=d&&d.debuglog?d.debuglog("stream"):function(){};var p,b=t("./internal/streams/BufferList"),m=t("./internal/streams/destroy");h.inherits(g,u);var y=["error","close","destroy","pause","resume"];function v(e,r){e=e||{};var n=r instanceof(o=o||t("./_stream_duplex"));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=t("string_decoder/").StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function g(e){if(o=o||t("./_stream_duplex"),!(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)),u.call(this)}function w(t,e,r,n,i){var o,a,s,u=t._readableState;null===e?(u.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,k(t)}(t,u)):(i||(o=function(t,e){var r;n=e,f.isBuffer(n)||n instanceof c||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(u,e)),o?t.emit("error",o):u.objectMode||e&&e.length>0?("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.length<s.highWaterMark||0===s.length)}function _(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),E(t,e)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),g.prototype.destroy=m.destroy,g.prototype._undestroy=m.undestroy,g.prototype._destroy=function(t,e){this.push(null),e(t)},g.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=f.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},g.prototype.unshift=function(t){return w(this,t,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(e){return p||(p=t("string_decoder/").StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var M=8388608;function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.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.highWaterMark&&(l("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function j(t){l("readable nexttick read 0"),t.read(0)}function I(t,e){e.reading||(l("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function T(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=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;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,a=t>o.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<n;r++)if(t[r]===e)return r;return-1}g.prototype.read=function(t){l("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=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-t<e.highWaterMark)&&l("length less than watermark",i=!0),e.ended||e.reading?l("reading or ended",i=!1):i&&(l("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?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<i;o++)n[o].emit("unpipe",this,r);return this}var a=R(e.pipes,t);return-1===a?this:(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},g.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):i(j,this))}return r},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var t,e,r=this._readableState;return r.flowing||(l("resume"),r.flowing=!0,t=this,(e=r).resumeScheduled||(e.resumeScheduled=!0,i(I,t,e))),this},g.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(l("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<y.length;o++)t.on(y[o],this.emit.bind(this,y[o]));return this._read=function(e){l("wrapped _read",e),n&&(n=!1,t.resume())},this},g._fromList=T}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":134,"./internal/streams/BufferList":139,"./internal/streams/destroy":140,"./internal/streams/stream":141,_process:120,"core-util-is":49,events:83,inherits:101,isarray:103,"process-nextick-args":119,"safe-buffer":147,"string_decoder/":157,util:17}],137:[function(t,e,r){e.exports=o;var n=t("./_stream_duplex"),i=t("core-util-is");function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){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!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(this,null,null)}function s(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=t("inherits"),i.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},{"./_stream_duplex":134,"core-util-is":49,inherits:101}],138:[function(t,e,r){(function(r,n){var i=t("process-nextick-args").nextTick;function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}e.exports=y;var a,s=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-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<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else v(t,e,!1,s,n,i,o);return u}(this,g,_,t,e,r)),w},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-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<<e|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<o;){for(var u=a%i,f=Math.min(o-s,i-u),c=0;c<f;c++)r[u+c]=t[s+c];s+=f,(a+=f)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=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<e>>>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<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�".repeat(this.lastTotal-this.lastNeed):e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=a(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r)return 0;if((i=a(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r)return 0;if((i=a(e[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&&o<t.indexOf("#")?"?":"#",f=t.split(s);f[0]=f[0].replace(/\\/g,"/");var g=t=f.join(s);if(g=g.trim(),!r&&1===t.split("#").length){var w=u.exec(g);if(w)return this.path=g,this.href=g,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?v.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var _=a.exec(g);if(_){var M=(_=_[0]).toLowerCase();this.protocol=M,g=g.substr(_.length)}if(r||_||g.match(/^\/\/[^@\/]+@[^@\/]+/)){var x="//"===g.substr(0,2);!x||_&&m[_]||(g=g.substr(2),this.slashes=!0)}if(!m[_]&&(x||_&&!y[_])){for(var k,S,E=-1,A=0;A<d.length;A++){-1!==(j=g.indexOf(d[A]))&&(-1===E||j<E)&&(E=j)}-1!==(S=-1===E?g.lastIndexOf("@"):g.lastIndexOf("@",E))&&(k=g.slice(0,S),g=g.slice(S+1),this.auth=decodeURIComponent(k)),E=-1;for(A=0;A<h.length;A++){var j;-1!==(j=g.indexOf(h[A]))&&(-1===E||j<E)&&(E=j)}-1===E&&(E=g.length),this.host=g.slice(0,E),g=g.slice(E),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var B=this.hostname.split(/\./),T=(A=0,B.length);A<T;A++){var C=B[A];if(C&&!C.match(l)){for(var P="",R=0,O=C.length;R<O;R++)C.charCodeAt(R)>127?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;A<T;A++){var U=c[A];if(-1!==g.indexOf(U)){var z=encodeURIComponent(U);z===U&&(z=escape(U)),g=g.split(U).join(z)}}var K=g.indexOf("#");-1!==K&&(this.hash=g.substr(K),g=g.slice(0,K));var H=g.indexOf("?");if(-1!==H?(this.search=g.substr(H),this.query=g.substr(H+1),e&&(this.query=v.parse(this.query)),g=g.slice(0,H)):e&&(this.search="",this.query={}),g&&(this.pathname=g),y[M]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){q=this.pathname||"";var V=this.search||"";this.path=q+V}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=v.stringify(this.query));var s=this.search||a&&"?"+a||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||y[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),e+o+(r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(s=s.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(g(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),f=0;f<u.length;f++){var c=u[f];"protocol"!==c&&(r[c]=t[c])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!y[t.protocol]){for(var h=Object.keys(t),d=0;d<h.length;d++){var l=h[d];r[l]=t[l]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||m[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var b=r.pathname||"",v=r.search||"";r.path=b+v}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=w||g||r.host&&t.pathname,M=_,x=r.pathname&&r.pathname.split("/")||[],k=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(k&&(r.hostname="",r.port=null,r.host&&(""===x[0]?x[0]=r.host:x.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),_=_&&(""===p[0]||""===x[0])),w)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,x=p;else if(p.length)x||(x=[]),x.pop(),x=x.concat(p),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(k)r.hostname=r.host=x.shift(),(I=!!(r.host&&r.host.indexOf("@")>0)&&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<t.length;r++)e(t[r],r,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(t),function(e){r[e]=t[e]}),forEach(globals,function(e){t[e]&&(r[e]=t[e])});var o=Object_keys(r),a=n.call(r,this.code);return forEach(Object_keys(r),function(e){(e in t||-1===indexOf(o,e))&&(t[e]=r[e])}),forEach(globals,function(e){e in t||defineProp(t,e,r[e])}),document.body.removeChild(e),a},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return forEach(Object_keys(e),function(r){t[r]=e[r]}),r},forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}}),exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"===(void 0===t?"undefined":_typeof(t))&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}},{indexof:100}],162:[function(t,e,r){var n="%[a-f0-9]{2}",i=new RegExp(n,"gi"),o=new RegExp("("+n+")+","gi");function a(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],a(r),a(n))}function s(t){try{return decodeURIComponent(t)}catch(n){for(var e=t.match(i),r=1;r<e.length;r++)t=a(e,r).join(""),e=t.match(i);return t}}e.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+(void 0===t?"undefined":_typeof(t))+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},r=o.exec(t);r;){try{e[r[0]]=decodeURIComponent(r[0])}catch(t){var n=s(r[0]);n!==r[0]&&(e[r[0]]=n)}r=o.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),a=0;a<i.length;a++){var u=i[a];t=t.replace(new RegExp(u,"g"),e[u])}return t}(t)}}},{}],163:[function(t,e,r){var n=function(t,e){for(var r=[],n=0;n<t;++n)r.push(e(n));return r};e.exports={generate:n,replicate:function(t,e){return n(t,function(){return e})},concat:function(t,e){return t.concat(e)},flatten:function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=0,o=t[r].length;i<o;++i)e.push(t[r][i]);return e},chunksOf:function(t,e){for(var r=[],n=0,i=e.length;n<i;n+=t)r.push(e.slice(n,n+t));return r}}},{}],164:[function(t,e,r){t("./array.js");var n=function(t,e){return parseInt(t.slice(2*e+2,2*e+4),16)},i=function(t){return(t.length-2)/2},o=function(t){for(var e=[],r=2,n=t.length;r<n;r+=2)e.push(parseInt(t.slice(r,r+2),16));return e},a=function(t){for(var e="0x",r=0,n=t.length;r<n;++r){var i=t[r];e+=(i<16?"0":"")+i.toString(16)}return e};e.exports={random:function(e){var r=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues)r=window.crypto.getRandomValues(new Uint8Array(e));else{if(void 0===t)throw"Safe random numbers not available.";r=t("crypto").randomBytes(e)}for(var n="0x",i=0;i<e;++i)n+=("00"+r[i].toString(16)).slice(-2);return n},length:i,concat:function(t,e){return t.concat(e.slice(2))},flatten:function(t){return"0x"+t.reduce(function(t,e){return t+e.slice(2)},"")},slice:function(t,e,r){return"0x"+r.slice(2*t+2,2*e+2)},reverse:function(t){for(var e="0x",r=0,n=i(t);r<n;++r)e+=t.slice(2*(n-r),2*(n-r+1));return e},pad:function t(e,r){return r.length===2*e+2?r:t(e,"0x0"+r.slice(2))},padRight:function t(e,r){return r.length===2*e+2?r:t(e,r+"0")},fromAscii:function(t){for(var e="0x",r=0;r<t.length;++r)e+=("00"+t.charCodeAt(r).toString(16)).slice(-2);return e},toAscii:function(t){for(var e="",r=2;r<t.length;r+=2)e+=String.fromCharCode(parseInt(t.slice(r,r+2),16));return e},fromString:function(t){for(var e=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},r="0x",n=0;n!=t.length;n++){var i=t.charCodeAt(n);if(i<128)r+=e(i);else{if(i<2048)r+=e(i>>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);r<o;){var a=n(t,r++);if(a>127){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<c;f+=2)r.push(parseInt(e.slice(f,f+2),16))}else r=e;return function(t,e){for(var r,a=e.length,u=t.blocks,f=t.blockCount<<2,c=t.blockCount,h=t.outputBlocks,d=t.s,l=0;l<a;){if(t.reset)for(t.reset=!1,u[0]=t.block,m=1;m<c+1;++m)u[m]=0;if("string"!=typeof e)for(m=t.start;l<a&&m<f;++l)u[m>>2]|=e[l]<<o[3&m++];else for(m=t.start;l<a&&m<f;++l)(r=e.charCodeAt(l))<128?u[m>>2]|=r<<o[3&m++]:r<2048?(u[m>>2]|=(192|r>>6)<<o[3&m++],u[m>>2]|=(128|63&r)<<o[3&m++]):r<55296||r>=57344?(u[m>>2]|=(224|r>>12)<<o[3&m++],u[m>>2]|=(128|r>>6&63)<<o[3&m++],u[m>>2]|=(128|63&r)<<o[3&m++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++l)),u[m>>2]|=(240|r>>18)<<o[3&m++],u[m>>2]|=(128|r>>12&63)<<o[3&m++],u[m>>2]|=(128|r>>6&63)<<o[3&m++],u[m>>2]|=(128|63&r)<<o[3&m++]);if(t.lastByteIndex=m,m>=f){for(t.start=m-f,t.block=u[c],m=0;m<c;++m)d[m]^=u[m];s(d),t.reset=!0}else t.start=m}if(u[(m=t.lastByteIndex)>>2]|=i[3&m],t.lastByteIndex===f)for(u[0]=u[c],m=1;m<c+1;++m)u[m]=0;for(u[c-1]|=2147483648,m=0;m<c;++m)d[m]^=u[m];s(d);for(var p,b="",m=0,y=0;y<h;){for(m=0;m<c&&y<h;++m,++y)p=d[m],b+=n[p>>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;n<i;n++)o.call(t,n)&&e.call(r,t[n],n,t)}(t,e,r):"string"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)e.call(r,t.charAt(n),n,t)}(t,e,r):function(t,e,r){for(var n in t)o.call(t,n)&&e.call(r,t[n],n,t)}(t,e,r)};var i=Object.prototype.toString,o=Object.prototype.hasOwnProperty},{"is-function":168}],167:[function(t,e,r){(function(t){var r;r="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],168:[function(t,e,r){e.exports=function(t){var e=n.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var n=Object.prototype.toString},{}],169:[function(t,e,r){var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var f in r=Object(arguments[u]))i.call(r,f)&&(s[f]=r[f]);if(n){a=n(r);for(var c=0;c<a.length;c++)o.call(r,a[c])&&(s[a[c]]=r[a[c]])}}return s}},{}],170:[function(t,e,r){var n=t("trim"),i=t("for-each");e.exports=function(t){if(!t)return{};var e={};return i(n(t).split("\n"),function(t){var r,i=t.indexOf(":"),o=n(t.slice(0,i)).toLowerCase(),a=n(t.slice(i+1));void 0===e[o]?e[o]=a:(r=e[o],"[object Array]"===Object.prototype.toString.call(r)?e[o].push(a):e[o]=[e[o],a])}),e}},{"for-each":166,trim:177}],171:[function(t,e,r){var n=t("strict-uri-encode"),i=t("object-assign"),o=t("decode-uri-component");function a(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function s(t){var e=t.indexOf("?");return-1===e?"":t.slice(e+1)}function u(t,e){var r=function(t){var e;switch(t.arrayFormat){case"index":return function(t,r,n){e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return function(t,r,n){e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};default:return function(t,e,r){void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e=i({arrayFormat:"none"},e)),n=Object.create(null);return"string"!=typeof t?n:(t=t.trim().replace(/^[?#&]/,""))?(t.split("&").forEach(function(t){var e=t.replace(/\+/g," ").split("="),i=e.shift(),a=e.length>0?e.join("="):void 0;a=void 0===a?null:o(a),r(o(i),a,n)}),Object.keys(n).sort().reduce(function(t,e){var r=n[e];return Boolean(r)&&"object"===(void 0===r?"undefined":_typeof(r))&&!Array.isArray(r)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"===(void 0===e?"undefined":_typeof(e))?t(Object.keys(e)).sort(function(t,e){return Number(t)-Number(e)}).map(function(t){return e[t]}):e}(r):t[e]=r,t},Object.create(null))):n}r.extract=s,r.parse=u,r.stringify=function(t,e){!1===(e=i({encode:!0,strict:!0,arrayFormat:"none"},e)).sort&&(e.sort=function(){});var r=function(t){switch(t.arrayFormat){case"index":return function(e,r,n){return null===r?[a(e,t),"[",n,"]"].join(""):[a(e,t),"[",a(n,t),"]=",a(r,t)].join("")};case"bracket":return function(e,r){return null===r?a(e,t):[a(e,t),"[]=",a(r,t)].join("")};default:return function(e,r){return null===r?a(e,t):[a(e,t),"=",a(r,t)].join("")}}}(e);return t?Object.keys(t).sort(e.sort).map(function(n){var i=t[n];if(void 0===i)return"";if(null===i)return a(n,e);if(Array.isArray(i)){var o=[];return i.slice().forEach(function(t){void 0!==t&&o.push(r(n,t,o.length))}),o.join("&")}return a(n,e)+"="+a(i,e)}).filter(function(t){return t.length>0}).join("&"):""},r.parseUrl=function(t,e){return{url:t.split("?")[0]||"",query:u(s(t),e)}}},{"decode-uri-component":162,"object-assign":169,"strict-uri-encode":172}],172:[function(t,e,r){e.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}},{}],173:[function(t,e,r){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},u={spawn:n},f={lookup:n},c=t("xhr-request-promise"),h=t("eth-lib/lib/bytes"),d=t("./swarm-hash.js"),l=t("./pick.js"),p=t("./swarm");e.exports=p({fsp:i,files:o,os:a,path:s,child_process:u,defaultArchives:{},mimetype:f,request:c,downloadUrl:null,bytes:h,hash:d,pick:l})},{"./pick.js":174,"./swarm":176,"./swarm-hash.js":175,"eth-lib/lib/bytes":164,"xhr-request-promise":180}],174:[function(t,e,r){var n=function(t){return function(){return new Promise(function(e,r){var n=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"===t){var u=r.webkitRelativePath;n[u.slice(u.indexOf("/")+1)]={type:"text/plain",data:s},++o===i&&e(n)}else if("file"===t){var f=r.webkitRelativePath;e({type:mimetype.lookup(f),data:s})}else e(s)},a.readAsArrayBuffer(r)})},i=void 0;"directory"===t?((i=document.createElement("input")).addEventListener("change",n),i.type="file",i.webkitdirectory=!0,i.mozdirectory=!0,i.msdirectory=!0,i.odirectory=!0,i.directory=!0):((i=document.createElement("input")).addEventListener("change",n),i.type="file");var o=document.createEvent("MouseEvents");o.initEvent("click",!0,!1),i.dispatchEvent(o)})}};e.exports={data:n("data"),file:n("file"),directory:n("directory")}},{}],175:[function(t,e,r){var n=t("eth-lib/lib/hash").keccak256,i=t("eth-lib/lib/bytes"),o=function(t,e){var r=i.reverse(i.pad(6,i.fromNumber(t))),o=i.flatten([r,"0x0000",e]);return n(o).slice(2)};e.exports=function t(e){"string"==typeof e&&"0x"!==e.slice(0,2)?e=i.fromString(e):"string"!=typeof e&&void 0!==e.length&&(e=i.fromUint8Array(e));var r=i.length(e);if(r<=4096)return o(r,e);for(var n=4096;128*n<r;)n*=128;for(var a=[],s=0;s<r;s+=n){var u=n<r-s?n:r-s;a.push(t(i.slice(e,s,s+u)))}return o(r,i.flatten(a))}},{"eth-lib/lib/bytes":164,"eth-lib/lib/hash":165}],176:[function(t,e,r){e.exports=function(t){var e=t.fsp,r=t.files,n=t.os,i=t.path,o=t.child_process,a=t.mimetype,s=t.defaultArchives,u=t.request,f=t.downloadUrl,c=t.bytes,h=t.hash,d=t.pick,l=function(t){return function(e){for(var r={},n=0,i=t.length;n<i;++n)r[t[n]]=e[n];return r}},p=function(t){return function(e){return t+"/bzzr:/"+e}},b=function(t){return function(e){return u(p(t)(e),{responseType:"arraybuffer"}).then(function(t){var e,r=new Uint8Array(t);if((e=r,function(t){if(e.length!==t.length)return!1;var r=0;for(e.length;r<e;++r)if(e[r]!==t[r])return!1;return!0})([52,48,52,32,112,97,103,101,32,110,111,116,32,102,111,117,110,100,10]))throw"Error 404.";return r})}},m=function(t){return function(e){return function e(r){return function(n){return function(i){var o=function(t){return void 0===t.path?Promise.resolve():"application/bzz-manifest+json"===t.contentType?e(t.hash)(n+t.path)(i):Promise.resolve((o=n+t.path,function(t){return function(e){return e[o]=t,e}})({type:(r=t).contentType,hash:r.hash})(i));var r,o};return b(t)(r).then(function(t){return JSON.parse(N(t)).entries}).then(function(t){return Promise.all(t.map(o))}).then(function(){return i})}}}(e)("")({})}},y=function(t){return function(e){return m(t)(e).then(function(t){return l(Object.keys(t))(Object.keys(t).map(function(e){return t[e].hash}))})}},v=function(t){return function(e){return m(t)(e).then(function(e){var r=Object.keys(e),n=r.map(function(t){return e[t].hash}),i=r.map(function(t){return e[t].type}),o=n.map(b(t));return Promise.all(o).then(function(t){return l(r)(t.map(function(t,e){return{type:i[e],data:t}}))})})}},g=function(t){return function(e){return function(n){return r.download(p(t)(e))(n)}}},w=function(t){return function(e){return function(r){return y(t)(e).then(function(e){var n=[];for(var o in e)if(o.length>0){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<n;i++)for(var o=arguments[i],a=t(o),s=a.length,u=0;u<s;u++){var f=a[u];e&&void 0!==r[f]||(r[f]=o[f])}return r}},w=function(t){if(!m.isObject(t))return{};if(p)return p(t);b.prototype=t;var e=new b;return b.prototype=null,e},_=function(t){return function(e){return null==e?void 0:e[t]}},M=Math.pow(2,53)-1,x=_("length"),k=function(t){var e=x(t);return"number"==typeof e&&e>=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<a;o+=t){var s=i?i[o]:o;n=r(n,e[s],s,e)}return n}(e,r,n,o,s,a)}}m.each=m.forEach=function(t,e,r){var n,i;if(e=y(e,r),k(t))for(n=0,i=t.length;n<i;n++)e(t[n],n,t);else{var o=m.keys(t);for(n=0,i=o.length;n<i;n++)e(t[o[n]],o[n],t)}return t},m.map=m.collect=function(t,e,r){e=v(e,r);for(var n=!k(t)&&m.keys(t),i=(n||t).length,o=Array(i),a=0;a<i;a++){var s=n?n[a]:a;o[a]=e(t[s],s,t)}return o},m.reduce=m.foldl=m.inject=S(1),m.reduceRight=m.foldr=S(-1),m.find=m.detect=function(t,e,r){var n;if(void 0!==(n=k(t)?m.findIndex(t,e,r):m.findKey(t,e,r))&&-1!==n)return t[n]},m.filter=m.select=function(t,e,r){var n=[];return e=v(e,r),m.each(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n},m.reject=function(t,e,r){return m.filter(t,m.negate(v(e)),r)},m.every=m.all=function(t,e,r){e=v(e,r);for(var n=!k(t)&&m.keys(t),i=(n||t).length,o=0;o<i;o++){var a=n?n[o]:o;if(!e(t[a],a,t))return!1}return!0},m.some=m.any=function(t,e,r){e=v(e,r);for(var n=!k(t)&&m.keys(t),i=(n||t).length,o=0;o<i;o++){var a=n?n[o]:o;if(e(t[a],a,t))return!0}return!1},m.contains=m.includes=m.include=function(t,e,r,n){return k(t)||(t=m.values(t)),("number"!=typeof r||n)&&(r=0),m.indexOf(t,e,r)>=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;s<u;s++)(n=t[s])>o&&(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;s<u;s++)(n=t[s])<o&&(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.shuffle=function(t){for(var e,r=k(t)?t:m.values(t),n=r.length,i=Array(n),o=0;o<n;o++)(e=m.random(0,o))!==o&&(i[o]=i[e]),i[e]=r[o];return i},m.sample=function(t,e,r){return null==e||r?(k(t)||(t=m.values(t)),t[m.random(t.length-1)]):m.shuffle(t).slice(0,Math.max(0,e))},m.sortBy=function(t,e,r){return e=v(e,r),m.pluck(m.map(t,function(t,r,n){return{value:t,index:r,criteria:e(t,r,n)}}).sort(function(t,e){var r=t.criteria,n=e.criteria;if(r!==n){if(r>n||void 0===r)return 1;if(r<n||void 0===n)return-1}return t.index-e.index}),"value")};var E=function(t){return function(e,r,n){var i={};return r=v(r,n),m.each(e,function(n,o){var a=r(n,o,e);t(i,n,a)}),i}};m.groupBy=E(function(t,e,r){m.has(t,r)?t[r].push(e):t[r]=[e]}),m.indexBy=E(function(t,e,r){t[r]=e}),m.countBy=E(function(t,e,r){m.has(t,r)?t[r]++:t[r]=1}),m.toArray=function(t){return t?m.isArray(t)?u.call(t):k(t)?m.map(t,m.identity):m.values(t):[]},m.size=function(t){return null==t?0:k(t)?t.length:m.keys(t).length},m.partition=function(t,e,r){e=v(e,r);var n=[],i=[];return m.each(t,function(t,r,o){(e(t,r,o)?n:i).push(t)}),[n,i]},m.first=m.head=m.take=function(t,e,r){if(null!=t)return null==e||r?t[0]:m.initial(t,t.length-e)},m.initial=function(t,e,r){return u.call(t,0,Math.max(0,t.length-(null==e||r?1:e)))},m.last=function(t,e,r){if(null!=t)return null==e||r?t[t.length-1]:m.rest(t,Math.max(0,t.length-e))},m.rest=m.tail=m.drop=function(t,e,r){return u.call(t,null==e||r?1:e)},m.compact=function(t){return m.filter(t,m.identity)};var A=function t(e,r,n,i){for(var o=[],a=0,s=i||0,u=x(e);s<u;s++){var f=e[s];if(k(f)&&(m.isArray(f)||m.isArguments(f))){r||(f=t(f,r,n));var c=0,h=f.length;for(o.length+=h;c<h;)o[a++]=f[c++]}else n||(o[a++]=f)}return o};function j(t){return function(e,r,n){r=v(r,n);for(var i=x(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(r(e[o],o,e))return o;return-1}}function I(t,e,r){return function(n,i,o){var a=0,s=x(n);if("number"==typeof o)t>0?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&&o<s;o+=t)if(n[o]===i)return o;return-1}}m.flatten=function(t,e){return A(t,e,!1)},m.without=function(t){return m.difference(t,u.call(arguments,1))},m.uniq=m.unique=function(t,e,r,n){m.isBoolean(e)||(n=r,r=e,e=!1),null!=r&&(r=v(r,n));for(var i=[],o=[],a=0,s=x(t);a<s;a++){var u=t[a],f=r?r(u,a,t):u;e?(a&&o===f||i.push(u),o=f):r?m.contains(o,f)||(o.push(f),i.push(u)):m.contains(i,u)||i.push(u)}return i},m.union=function(){return m.uniq(A(arguments,!0,!0))},m.intersection=function(t){for(var e=[],r=arguments.length,n=0,i=x(t);n<i;n++){var o=t[n];if(!m.contains(e,o)){for(var a=1;a<r&&m.contains(arguments[a],o);a++);a===r&&e.push(o)}}return e},m.difference=function(t){var e=A(arguments,!0,!0,1);return m.filter(t,function(t){return!m.contains(e,t)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(t){for(var e=t&&m.max(t,x).length||0,r=Array(e),n=0;n<e;n++)r[n]=m.pluck(t,n);return r},m.object=function(t,e){for(var r={},n=0,i=x(t);n<i;n++)e?r[t[n]]=e[n]:r[t[n][0]]=t[n][1];return r},m.findIndex=j(1),m.findLastIndex=j(-1),m.sortedIndex=function(t,e,r,n){for(var i=(r=v(r,n,1))(e),o=0,a=x(t);o<a;){var s=Math.floor((o+a)/2);r(t[s])<i?o=s+1:a=s}return o},m.indexOf=I(1,m.findIndex,m.sortedIndex),m.lastIndexOf=I(-1,m.findLastIndex),m.range=function(t,e,r){null==e&&(e=t||0,t=0),r=r||1;for(var n=Math.max(Math.ceil((e-t)/r),0),i=Array(n),o=0;o<n;o++,t+=r)i[o]=t;return i};var B=function(t,e,r,n,i){if(!(n instanceof e))return t.apply(r,i);var o=w(t.prototype),a=t.apply(o,i);return m.isObject(a)?a:o};m.bind=function(t,e){if(l&&t.bind===l)return l.apply(t,u.call(arguments,1));if(!m.isFunction(t))throw new TypeError("Bind must be called on a function");var r=u.call(arguments,2);return function n(){return B(t,n,e,this,r.concat(u.call(arguments)))}},m.partial=function(t){var e=u.call(arguments,1);return function r(){for(var n=0,i=e.length,o=Array(i),a=0;a<i;a++)o[a]=e[a]===m?arguments[n++]:e[a];for(;n<arguments.length;)o.push(arguments[n++]);return B(t,r,this,this,o)}},m.bindAll=function(t){var e,r,n=arguments.length;if(n<=1)throw new Error("bindAll must be passed function names");for(e=1;e<n;e++)t[r=arguments[e]]=m.bind(t[r],t);return t},m.memoize=function(t,e){var r=function r(n){var i=r.cache,o=""+(e?e.apply(this,arguments):n);return m.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return r.cache={},r},m.delay=function(t,e){var r=u.call(arguments,2);return setTimeout(function(){return t.apply(null,r)},e)},m.defer=m.partial(m.delay,m,1),m.throttle=function(t,e,r){var n,i,o,a=null,s=0;r||(r={});var u=function(){s=!1===r.leading?0:m.now(),a=null,o=t.apply(n,i),a||(n=i=null)};return function(){var f=m.now();s||!1!==r.leading||(s=f);var c=e-(f-s);return n=this,i=arguments,c<=0||c>e?(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<e&&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<r;i++)n[i]=t[e[i]];return n},m.mapObject=function(t,e,r){e=v(e,r);for(var n,i=m.keys(t),o=i.length,a={},s=0;s<o;s++)a[n=i[s]]=e(t[n],n,t);return a},m.pairs=function(t){for(var e=m.keys(t),r=e.length,n=Array(r),i=0;i<r;i++)n[i]=[e[i],t[e[i]]];return n},m.invert=function(t){for(var e={},r=m.keys(t),n=0,i=r.length;n<i;n++)e[t[r[n]]]=r[n];return e},m.functions=m.methods=function(t){var e=[];for(var r in t)m.isFunction(t[r])&&e.push(r);return e.sort()},m.extend=g(m.allKeys),m.extendOwn=m.assign=g(m.keys),m.findKey=function(t,e,r){e=v(e,r);for(var n,i=m.keys(t),o=0,a=i.length;o<a;o++)if(e(t[n=i[o]],n,t))return n},m.pick=function(t,e,r){var n,i,o={},a=t;if(null==a)return o;m.isFunction(e)?(i=m.allKeys(a),n=y(e,r)):(i=A(arguments,!1,!1,1),n=function(t,e,r){return e in r},a=Object(a));for(var s=0,u=i.length;s<u;s++){var f=i[s],c=a[f];n(c,f,a)&&(o[f]=c)}return o},m.omit=function(t,e,r){if(m.isFunction(e))e=m.negate(e);else{var n=m.map(A(arguments,!1,!1,1),String);e=function(t,e){return!m.contains(n,e)}}return m.pick(t,e,r)},m.defaults=g(m.allKeys,!0),m.create=function(t,e){var r=w(t);return e&&m.extendOwn(r,e),r},m.clone=function(t){return m.isObject(t)?m.isArray(t)?t.slice():m.extend({},t):t},m.tap=function(t,e){return e(t),t},m.isMatch=function(t,e){var r=m.keys(e),n=r.length;if(null==t)return!n;for(var i=Object(t),o=0;o<n;o++){var a=r[o];if(e[a]!==i[a]||!(a in i))return!1}return!0};m.isEqual=function(t,e){return function t(e,r,n,i){if(e===r)return 0!==e||1/e==1/r;if(null==e||null==r)return e===r;e instanceof m&&(e=e._wrapped),r instanceof m&&(r=r._wrapped);var o=f.call(e);if(o!==f.call(r))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:0==+e?1/+e==1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r}var a="[object Array]"===o;if(!a){if("object"!=(void 0===e?"undefined":_typeof(e))||"object"!=(void 0===r?"undefined":_typeof(r)))return!1;var s=e.constructor,u=r.constructor;if(s!==u&&!(m.isFunction(s)&&s instanceof s&&m.isFunction(u)&&u instanceof u)&&"constructor"in e&&"constructor"in r)return!1}i=i||[];for(var c=(n=n||[]).length;c--;)if(n[c]===e)return i[c]===r;if(n.push(e),i.push(r),a){if((c=e.length)!==r.length)return!1;for(;c--;)if(!t(e[c],r[c],n,i))return!1}else{var h,d=m.keys(e);if(c=d.length,m.keys(r).length!==c)return!1;for(;c--;)if(h=d[c],!m.has(r,h)||!t(e[h],r[h],n,i))return!1}return n.pop(),i.pop(),!0}(t,e)},m.isEmpty=function(t){return null==t||(k(t)&&(m.isArray(t)||m.isString(t)||m.isArguments(t))?0===t.length:0===m.keys(t).length)},m.isElement=function(t){return!(!t||1!==t.nodeType)},m.isArray=h||function(t){return"[object Array]"===f.call(t)},m.isObject=function(t){var e=void 0===t?"undefined":_typeof(t);return"function"===e||"object"===e&&!!t},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){m["is"+t]=function(e){return f.call(e)==="[object "+t+"]"}}),m.isArguments(arguments)||(m.isArguments=function(t){return m.has(t,"callee")}),"function"!=typeof/./&&"object"!=("undefined"==typeof Int8Array?"undefined":_typeof(Int8Array))&&(m.isFunction=function(t){return"function"==typeof t||!1}),m.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},m.isNaN=function(t){return m.isNumber(t)&&t!==+t},m.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===f.call(t)},m.isNull=function(t){return null===t},m.isUndefined=function(t){return void 0===t},m.has=function(t,e){return null!=t&&c.call(t,e)},m.noConflict=function(){return t._=n,this},m.identity=function(t){return t},m.constant=function(t){return function(){return t}},m.noop=function(){},m.property=_,m.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},m.matcher=m.matches=function(t){return t=m.extendOwn({},t),function(e){return m.isMatch(e,t)}},m.times=function(t,e,r){var n=Array(Math.max(0,t));e=y(e,r,1);for(var i=0;i<t;i++)n[i]=e(i);return n},m.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},m.now=Date.now||function(){return(new Date).getTime()};var R={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},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;r<t.length;r++)e(t[r])}(["get","put","post","patch","head","delete"],function(t){u["delete"===t?"del":t]=function(e,r,n){return(r=s(e,r,n)).method=t.toUpperCase(),f(r)}})},{"global/window":167,"is-function":168,"parse-headers":170,xtend:186}],186:[function(t,e,r){e.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},{}],187:[function(t,e,r){var n=t("underscore"),i=t("swarm-js"),o=function t(e){this.givenProvider=t.givenProvider,e&&e._requestManager&&(e=e.currentProvider),"undefined"!=typeof document&&(this.pick=i.pick),this.setProvider(e)};o.givenProvider=null,"undefined"!=typeof ethereumProvider&&ethereumProvider.bzz&&(o.givenProvider=ethereumProvider.bzz),o.prototype.setProvider=function(t){if(n.isObject(t)&&n.isString(t.bzz)&&(t=t.bzz),!n.isString(t)){this.currentProvider=null;var e=new Error("No provider set, please set one using bzz.setProvider().");return this.download=this.upload=this.isAvailable=function(){throw e},!1}return this.currentProvider=t,this.download=i.at(t).download,this.upload=i.at(t).upload,this.isAvailable=i.at(t).isAvailable,!0},e.exports=o},{"swarm-js":173,underscore:178}],188:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],189:[function(t,e,r){e.exports={ErrorResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:JSON.stringify(t);return new Error("Returned error: "+e)},InvalidNumberOfParams:function(t,e,r){return new Error('Invalid number of parameters for "'+r+'". Got '+t+" expected "+e+"!")},InvalidConnection:function(t){return new Error("CONNECTION ERROR: Couldn't connect to node "+t+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:"Invalid JSON RPC response: "+JSON.stringify(t);return new Error(e)},ConnectionTimeout:function(t){return new Error("CONNECTION TIMEOUT: timeout of "+t+" ms achived")}}},{}],190:[function(t,e,r){var n=t("underscore"),i=t("web3-utils"),o=t("web3-eth-iban"),a=function(t){return i.toBN(t).toString(10)},s=function(t){var e;if(void 0!==t)return"latest"===(e=t)||"pending"===e||"earliest"===e?t:i.isHexStrict(t)?n.isString(t)?t.toLowerCase():t:i.numberToHex(t)},u=function(t){if(t.to&&(t.to=h(t.to)),t.data&&t.input)throw new Error('You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.');if(!t.data&&t.input&&(t.data=t.input,delete t.input),t.data&&!i.isHex(t.data))throw new Error("The data field must be HEX encoded data.");return(t.gas||t.gasLimit)&&(t.gas=t.gas||t.gasLimit),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=i.numberToHex(t[e])}),t},f=function(t){return null!==t.blockNumber&&(t.blockNumber=i.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=i.hexToNumber(t.transactionIndex)),t.nonce=i.hexToNumber(t.nonce),t.gas=i.hexToNumber(t.gas),t.gasPrice=a(t.gasPrice),t.value=a(t.value),t.to&&i.isAddress(t.to)?t.to=i.toChecksumAddress(t.to):t.to=null,t.from&&(t.from=i.toChecksumAddress(t.from)),t},c=function(t){if("string"==typeof t.blockHash&&"string"==typeof t.transactionHash&&"string"==typeof t.logIndex){var e=i.sha3(t.blockHash.replace("0x","")+t.transactionHash.replace("0x","")+t.logIndex.replace("0x",""));t.id="log_"+e.replace("0x","").substr(0,8)}else t.id||(t.id=null);return null!==t.blockNumber&&(t.blockNumber=i.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=i.hexToNumber(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=i.hexToNumber(t.logIndex)),t.address&&(t.address=i.toChecksumAddress(t.address)),t},h=function(t){var e=new o(t);if(e.isValid()&&e.isDirect())return e.toAddress().toLowerCase();if(i.isAddress(t))return"0x"+t.toLowerCase().replace("0x","");throw new Error('Provided address "'+t+"\" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.")};e.exports={inputDefaultBlockNumberFormatter:function(t){return this&&null==t?this.defaultBlock:"genesis"===t||"earliest"===t?"0x0":s(t)},inputBlockNumberFormatter:s,inputCallFormatter:function(t){var e=(t=u(t)).from||(this?this.defaultAccount:null);return e&&(t.from=h(e)),t},inputTransactionFormatter:function(t){if(t=u(t),!n.isNumber(t.from)&&!n.isObject(t.from)){if(t.from=t.from||(this?this.defaultAccount:null),!t.from&&!n.isNumber(t.from))throw new Error('The send transactions "from" field must be defined!');t.from=h(t.from)}return t},inputAddressFormatter:h,inputPostFormatter:function(t){return t.ttl&&(t.ttl=i.numberToHex(t.ttl)),t.workToProve&&(t.workToProve=i.numberToHex(t.workToProve)),t.priority&&(t.priority=i.numberToHex(t.priority)),n.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map(function(t){return 0===t.indexOf("0x")?t:i.fromUtf8(t)}),t},inputLogFormatter:function(t){var e=function(t){return null==t?null:0===(t=String(t)).indexOf("0x")?t:i.fromUtf8(t)};return t.topics=t.topics||[],t.topics=t.topics.map(function(t){return n.isArray(t)?t.map(e):e(t)}),e=null,t.address&&(t.address=n.isArray(t.address)?t.address.map(function(t){return h(t)}):h(t.address)),t},inputSignFormatter:function(t){return i.isHexStrict(t)?t:i.utf8ToHex(t)},outputBigNumberFormatter:a,outputTransactionFormatter:f,outputTransactionReceiptFormatter:function(t){if("object"!==(void 0===t?"undefined":_typeof(t)))throw new Error("Received receipt is invalid: "+t);return null!==t.blockNumber&&(t.blockNumber=i.hexToNumber(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=i.hexToNumber(t.transactionIndex)),t.cumulativeGasUsed=i.hexToNumber(t.cumulativeGasUsed),t.gasUsed=i.hexToNumber(t.gasUsed),n.isArray(t.logs)&&(t.logs=t.logs.map(c)),t.contractAddress&&(t.contractAddress=i.toChecksumAddress(t.contractAddress)),void 0!==t.status&&(t.status=Boolean(parseInt(t.status))),t},outputBlockFormatter:function(t){return t.gasLimit=i.hexToNumber(t.gasLimit),t.gasUsed=i.hexToNumber(t.gasUsed),t.size=i.hexToNumber(t.size),t.timestamp=i.hexToNumber(t.timestamp),null!==t.number&&(t.number=i.hexToNumber(t.number)),t.difficulty&&(t.difficulty=a(t.difficulty)),t.totalDifficulty&&(t.totalDifficulty=a(t.totalDifficulty)),n.isArray(t.transactions)&&t.transactions.forEach(function(t){if(!n.isString(t))return f(t)}),t.miner&&(t.miner=i.toChecksumAddress(t.miner)),t},outputLogFormatter:c,outputPostFormatter:function(t){return t.expiry=i.hexToNumber(t.expiry),t.sent=i.hexToNumber(t.sent),t.ttl=i.hexToNumber(t.ttl),t.workProved=i.hexToNumber(t.workProved),t.topics||(t.topics=[]),t.topics=t.topics.map(function(t){return i.toUtf8(t)}),t},outputSyncingFormatter:function(t){return t.startingBlock=i.hexToNumber(t.startingBlock),t.currentBlock=i.hexToNumber(t.currentBlock),t.highestBlock=i.hexToNumber(t.highestBlock),t.knownStates&&(t.knownStates=i.hexToNumber(t.knownStates),t.pulledStates=i.hexToNumber(t.pulledStates)),t}}},{underscore:188,"web3-eth-iban":368,"web3-utils":393}],191:[function(t,e,r){var n=t("./errors"),i=t("./formatters");e.exports={errors:n,formatters:i}},{"./errors":189,"./formatters":190}],192:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],193:[function(t,e,r){var n=t("underscore"),i=t("web3-core-helpers").errors,o=t("web3-core-helpers").formatters,a=t("web3-utils"),s=t("web3-core-promievent"),u=t("web3-core-subscriptions").subscriptions,f=function(t){if(!t.call||!t.name)throw new Error('When creating a method you need to provide at least the "name" and "call" property.');this.name=t.name,this.call=t.call,this.params=t.params||0,this.inputFormatter=t.inputFormatter,this.outputFormatter=t.outputFormatter,this.transformPayload=t.transformPayload,this.extraFormatters=t.extraFormatters,this.requestManager=t.requestManager,this.accounts=t.accounts,this.defaultBlock=t.defaultBlock||"latest",this.defaultAccount=t.defaultAccount||null};f.prototype.setRequestManager=function(t,e){this.requestManager=t,e&&(this.accounts=e)},f.prototype.createFunction=function(t,e){var r=this.buildCall();return r.call=this.call,this.setRequestManager(t||this.requestManager,e||this.accounts),r},f.prototype.attachToObject=function(t){var e=this.buildCall();e.call=this.call;var r=this.name.split(".");r.length>1?(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);o<a;o++)s[o]=i[o].fn;return s},o.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events||!this._events[s])return!1;var u,f,c=this._events[s],h=arguments.length;if("function"==typeof c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,o),!0;case 6:return c.fn.call(c.context,e,r,i,o,a),!0}for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];c.fn.apply(c.context,u)}else{var d,l=c.length;for(f=0;f<l;f++)switch(c[f].once&&this.removeListener(t,c[f].fn,void 0,!0),h){case 1:c[f].fn.call(c[f].context);break;case 2:c[f].fn.call(c[f].context,e);break;case 3:c[f].fn.call(c[f].context,e,r);break;default:if(!u)for(d=1,u=new Array(h-1);d<h;d++)u[d-1]=arguments[d];c[f].fn.apply(c[f].context,u)}}return!0},o.prototype.on=function(t,e,r){var o=new i(e,r||this),a=n?n+t:t;return this._events||(this._events=n?{}:Object.create(null)),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],o]:this._events[a].push(o):this._events[a]=o,this},o.prototype.once=function(t,e,r){var o=new i(e,r||this,!0),a=n?n+t:t;return this._events||(this._events=n?{}:Object.create(null)),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],o]:this._events[a].push(o):this._events[a]=o,this},o.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events||!this._events[o])return this;var a=this._events[o],s=[];if(e)if(a.fn)(a.fn!==e||i&&!a.once||r&&a.context!==r)&&s.push(a);else for(var u=0,f=a.length;u<f;u++)(a[u].fn!==e||i&&!a[u].once||r&&a[u].context!==r)&&s.push(a[u]);return s.length?this._events[o]=1===s.length?s[0]:s:delete this._events[o],this},o.prototype.removeAllListeners=function(t){return this._events?(t?delete this._events[n?n+t:t]:this._events=n?{}:Object.create(null),this):this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prototype.setMaxListeners=function(){return this},o.prefixed=n,void 0!==e&&(e.exports=o)},{}],198:[function(t,e,r){var n=t("eventemitter3"),i=t("any-promise"),o=function(t){var e,r,o=new i(function(){e=arguments[0],r=arguments[1]});if(t)return{resolve:e,reject:r,eventEmitter:o};var a=new n;return o._events=a._events,o.emit=a.emit,o.on=a.on,o.once=a.once,o.off=a.off,o.listeners=a.listeners,o.addListener=a.addListener,o.removeListener=a.removeListener,o.removeAllListeners=a.removeAllListeners,{resolve:e,reject:r,eventEmitter:o}};o.resolve=function(t){var e=o(!0);return e.resolve(t),e.eventEmitter},e.exports=o},{"any-promise":194,eventemitter3:197}],199:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],200:[function(t,e,r){var n=t("./jsonrpc"),i=t("web3-core-helpers").errors,o=function(t){this.requestManager=t,this.requests=[]};o.prototype.add=function(t){this.requests.push(t)},o.prototype.execute=function(){var t=this.requests;this.requestManager.sendBatch(t,function(e,r){r=r||[],t.map(function(t,e){return r[e]||{}}).forEach(function(e,r){if(t[r].callback){if(e&&e.error)return t[r].callback(i.ErrorResponse(e));if(!n.isValidResponse(e))return t[r].callback(i.InvalidResponse(e));t[r].callback(null,t[r].format?t[r].format(e.result):e.result)}})})},e.exports=o},{"./jsonrpc":203,"web3-core-helpers":191}],201:[function(t,e,r){var n=null,i=Function("return this")();void 0!==i.ethereumProvider?n=i.ethereumProvider:void 0!==i.web3&&i.web3.currentProvider&&(i.web3.currentProvider.sendAsync&&(i.web3.currentProvider.send=i.web3.currentProvider.sendAsync,delete i.web3.currentProvider.sendAsync),!i.web3.currentProvider.on&&i.web3.currentProvider.connection&&"ipcProviderWrapper"===i.web3.currentProvider.connection.constructor.name&&(i.web3.currentProvider.on=function(t,e){if("function"!=typeof e)throw new Error("The second parameter callback must be a function.");switch(t){case"data":this.connection.on("data",function(t){var r="";t=t.toString();try{r=JSON.parse(t)}catch(r){return e(new Error("Couldn't parse response data"+t))}r.id||-1===r.method.indexOf("_subscription")||e(null,r)});break;default:this.connection.on(t,e)}}),n=i.web3.currentProvider),e.exports=n},{}],202:[function(t,e,r){var n=t("underscore"),i=t("web3-core-helpers").errors,o=t("./jsonrpc.js"),a=t("./batch.js"),s=t("./givenProvider.js"),u=function t(e){this.provider=null,this.providers=t.providers,this.setProvider(e),this.subscriptions={}};u.givenProvider=s,u.providers={WebsocketProvider:t("web3-providers-ws"),HttpProvider:t("web3-providers-http"),IpcProvider:t("web3-providers-ipc")},u.prototype.setProvider=function(t,e){var r=this;if(t&&"string"==typeof t&&this.providers)if(/^http(s)?:\/\//i.test(t))t=new this.providers.HttpProvider(t);else if(/^ws(s)?:\/\//i.test(t))t=new this.providers.WebsocketProvider(t);else if(t&&"object"===(void 0===e?"undefined":_typeof(e))&&"function"==typeof e.connect)t=new this.providers.IpcProvider(t,e);else if(t)throw new Error("Can't autodetect provider for \""+t+'"');this.provider&&this.clearSubscriptions(),this.provider=t||null,this.provider&&this.provider.on&&this.provider.on("data",function(t,e){(t=t||e).method&&r.subscriptions[t.params.subscription]&&r.subscriptions[t.params.subscription].callback&&r.subscriptions[t.params.subscription].callback(null,t.params.result)})},u.prototype.send=function(t,e){if(e=e||function(){},!this.provider)return e(i.InvalidProvider());var r=o.toPayload(t.method,t.params);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,function(t,n){return n&&n.id&&r.id!==n.id?e(new Error('Wrong response id "'+n.id+'" (expected: "'+r.id+'") in '+JSON.stringify(r))):t?e(t):n&&n.error?e(i.ErrorResponse(n)):o.isValidResponse(n)?void e(null,n.result):e(i.InvalidResponse(n))})},u.prototype.sendBatch=function(t,e){if(!this.provider)return e(i.InvalidProvider());var r=o.toBatchPayload(t);this.provider[this.provider.sendAsync?"sendAsync":"send"](r,function(t,r){return t?e(t):n.isArray(r)?void e(null,r):e(i.InvalidResponse(r))})},u.prototype.addSubscription=function(t,e,r,n){if(!this.provider.on)throw new Error("The provider doesn't support subscriptions: "+this.provider.constructor.name);this.subscriptions[t]={callback:n,type:r,name:e}},u.prototype.removeSubscription=function(t,e){this.subscriptions[t]&&(this.send({method:this.subscriptions[t].type+"_unsubscribe",params:[t]},e),delete this.subscriptions[t])},u.prototype.clearSubscriptions=function(t){var e=this;Object.keys(this.subscriptions).forEach(function(r){t&&"syncing"===e.subscriptions[r].name||e.removeSubscription(r)}),this.provider.reset&&this.provider.reset()},e.exports={Manager:u,BatchManager:a}},{"./batch.js":200,"./givenProvider.js":201,"./jsonrpc.js":203,underscore:199,"web3-core-helpers":191,"web3-providers-http":375,"web3-providers-ipc":378,"web3-providers-ws":380}],203:[function(t,e,r){var n={messageId:0,toPayload:function(t,e){if(!t)throw new Error('JSONRPC method should be specified for params: "'+JSON.stringify(e)+'"!');return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:t,params:e||[]}},isValidResponse:function(t){return Array.isArray(t)?t.every(e):e(t);function e(t){return!(!t||t.error||"2.0"!==t.jsonrpc||"number"!=typeof t.id&&"string"!=typeof t.id||void 0===t.result)}},toBatchPayload:function(t){return t.map(function(t){return n.toPayload(t.method,t.params)})}};e.exports=n},{}],204:[function(t,e,r){arguments[4][197][0].apply(r,arguments)},{dup:197}],205:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],206:[function(t,e,r){var n=t("./subscription.js"),i=function(t){this.name=t.name,this.type=t.type,this.subscriptions=t.subscriptions||{},this.requestManager=null};i.prototype.setRequestManager=function(t){this.requestManager=t},i.prototype.attachToObject=function(t){var e=this.buildCall();e.call=this.call;var r=this.name.split(".");r.length>1?(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<i;o++){var a=t.charCodeAt(o)-48;n<<=4,n|=a>=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<o;a++){var s=t.charCodeAt(a)-48;i*=n,i+=s>=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<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>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<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=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;c<s;c+=n)f=u(t,c,c+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==a){var h=1;for(f=u(t,c,t.length,e),c=0;c<a;c++)h*=e;this.imuln(h),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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<n;f++){for(var c=u>>>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<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>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<o;s++)f[s]=0}else{for(s=0;s<o-i;s++)f[s]=0;for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),f[o-s-1]=a}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var l=function(t,e,r){var n,i,o,a=t.words,s=e.words,u=r.words,f=0,c=0|a[0],h=8191&c,d=c>>>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&lt,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<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var c=o-f,h=(0|t.words[c])*(0|e.words[f]),d=67108863&h;s=67108863&(d=d+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(d>>>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<t;n++)e[n]=this.revBin(n,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},b.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var h=u,d=f,l=0;l<a;l++){var p=r[c+l],b=n[c+l],m=r[c+l+a],y=n[c+l+a],v=h*m-d*y;y=h*y+d*m,m=v,r[c+l]=p+m,n[c+l]=b+y,r[c+l+a]=p-m,n[c+l+a]=b-y,l!==s&&(v=u*h-f*d,d=u*d+f*h,h=v)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},b.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,r,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),f=new Array(n),c=new Array(n),h=new Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,f,n),this.transform(a,o,s,u,n,i),this.transform(f,o,c,h,n,i);for(var l=0;l<n;l++){var p=s[l]*c[l]-u[l]*h[l];u[l]=s[l]*h[l]+u[l]*c[l],s[l]=p}return this.conjugate(s,u,n),this.transform(s,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=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<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=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<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>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<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var f=0;f<a;f++)u.words[f]=this.words[f];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,f=0;f<this.length;f++)this.words[f]=this.words[f+a];else this.words[0]=0,this.length=1;var c=0;for(f=this.length-1;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<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,a=t.length+r;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>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<s.length;f++)s.words[f]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,s&&(s.words[u]=1));for(var h=u-1;h>=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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>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:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?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<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(g,y),i(w,y),i(_,y),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=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<p);var y=this.pow(h,new o(1).iushln(p-m-1));d=d.redMul(y),h=y.redSqr(),l=l.redMul(h),p=m}return d},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=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<r.length;n++)r[n]+=r[n-1];return r.map(function(r,n){return r-e[n].staticPartLength(t[n])})},b.prototype._getSolidityTypes=function(t){var e=this;return t.map(function(t){return e._requireType(t)})},b.prototype._encodeMultiWithOffset=function(t,e,r,n){var i="",a=this;return t.forEach(function(s,u){if(l(e[u],t[u])){i+=o.formatInputInt(n).encode();var f=a._encodeWithOffset(t[u],e[u],r[u],n);n+=f.length/2}else i+=a._encodeWithOffset(t[u],e[u],r[u],n)}),t.forEach(function(o,s){if(l(e[s],t[s])){var u=a._encodeWithOffset(t[s],e[s],r[s],n);n+=u.length/2,i+=u}}),i},b.prototype._encodeWithOffset=function(t,e,r,n){var i,a,s,u,f,c,h=this;return e.isDynamicArray(t)?(u=e.nestedName(t),f=e.staticPartLength(u),c=r[0],function(){var t=2;if(e.isDynamicArray(u))for(var i=1;i<r.length;i++)t+=+r[i-1][0]||0,c+=o.formatInputInt(n+i*f+32*t).encode()}(),function(){for(var t=0;t<r.length-1;t++){var i=c/2;c+=h._encodeWithOffset(u,e,r[t+1],n+i)}}(),c):e.isStaticArray(t)?(i=e.nestedName(t),a=e.staticPartLength(i),s="",e.isDynamicArray(i)&&function(){for(var t=0,e=0;e<r.length;e++)t+=+(r[e-1]||[])[0]||0,s+=o.formatInputInt(n+e*a+32*t).encode()}(),function(){for(var t=0;t<r.length;t++){var o=s/2;s+=h._encodeWithOffset(i,e,r[t],n+o)}}(),s):r},b.prototype.encodeFunctionSignature=function(t){return n.isObject(t)&&(t=i._jsonInterfaceMethodToString(t)),i.sha3(t).slice(0,10)},b.prototype.encodeEventSignature=function(t){return n.isObject(t)&&(t=i._jsonInterfaceMethodToString(t)),i.sha3(t)},b.prototype.encodeParameter=function(t,e){return this.encodeParameters([t],[e])},b.prototype.encodeParameters=function(t,e){n.isObject(t)&&t.inputs&&(t=n.map(t.inputs,function(t){return t.type}));var r=this._getSolidityTypes(t),i=r.map(function(r,n){return r.encode(e[n],t[n])}),o=r.reduce(function(e,n,i){var o=n.staticPartLength(t[i]),a=32*Math.floor((o+31)/32);return e+(l(r[i],t[i])?32:a)},0);return"0x"+this._encodeMultiWithOffset(t,r,i,o)},b.prototype.encodeFunctionCall=function(t,e){return this.encodeFunctionSignature(t)+this.encodeParameters(t,e).replace("0x","")},b.prototype.decodeParameter=function(t,e){if(!n.isString(t))throw new Error("Given parameter type is not a string: "+t);return this.decodeParameters([{type:t}],e)[0]},b.prototype.decodeParameters=function(t,e){var r=n.isArray(t)&&n.isString(t[0]),i=r?t:[];r||t.forEach(function(t){i.push(t.type)});var o=this._getSolidityTypes(i),a=this._getOffsets(i,o),s=new p;s.__length__=0;var u=0;return t.forEach(function(t,r){var f=o[u].decode(e.replace(/^0x/i,""),a[u],i[u],u);f="0x"===f?null:f,s[r]=f,n.isObject(t)&&t.name&&(s[t.name]=f),s.__length__++,u++}),s},b.prototype.decodeLog=function(t,e,r){e=e||"";var i=[],o=[];t.forEach(function(t,e){t.indexed?o[e]=t:i[e]=t});var a=e.slice(2),s=n.isArray(r)?r.map(function(t){return t.slice(2)}).join(""):r,u=this.decodeParameters(i,a),f=this.decodeParameters(o,s),c=new p;return c.__length__=0,t.forEach(function(t,e){c[e]="string"===t.type?"":null,u[e]&&(c[e]=u[e]),f[e]&&(c[e]=f[e]),t.name&&(c[t.name]=c[e]),c.__length__++}),c};var m=new b([new a,new s,new u,new f,new c,new d,new h]);e.exports=m},{"./formatters":212,"./types/address":216,"./types/bool":217,"./types/bytes":218,"./types/dynamicbytes":219,"./types/int":220,"./types/string":221,"./types/uint":222,underscore:211,"web3-utils":393}],214:[function(t,e,r){var n=t("./formatters.js"),i=function(t,e,r){this.value=t||"",this.offset=e,this.rawValue=r};i.prototype.dynamicPartLength=function(){return this.dynamicPart().length/2},i.prototype.withOffset=function(t){return new i(this.value,t)},i.prototype.combine=function(t){return new i(this.value+t.value)},i.prototype.isDynamic=function(){return void 0!==this.offset},i.prototype.offsetAsBytes=function(){return this.isDynamic()?n.toTwosComplement(this.offset).replace("0x",""):""},i.prototype.staticPart=function(){return this.isDynamic()?this.offsetAsBytes():this.value},i.prototype.dynamicPart=function(){return this.isDynamic()?this.value:""},i.prototype.encode=function(){return this.staticPart()+this.dynamicPart()},i.encodeList=function(t){var e=32*t.length,r=t.map(function(t){if(!t.isDynamic())return t;var r=e;return e+=t.dynamicPartLength(),t.withOffset(r)});return r.reduce(function(t,e){return t+e.dynamicPart()},r.reduce(function(t,e){return t+e.staticPart()},""))},e.exports=i},{"./formatters.js":212}],215:[function(t,e,r){var n=t("./formatters"),i=t("./param"),o=function(t){this._inputFormatter=t.inputFormatter,this._outputFormatter=t.outputFormatter};o.prototype.isType=function(t){throw"This method should be overwritten for type "+t},o.prototype.staticPartLength=function(t){return(this.nestedTypes(t)||["[1]"]).map(function(t){return parseInt(t.slice(1,-1),10)||1}).reduce(function(t,e){return t*e},32)},o.prototype.isDynamicArray=function(t){var e=this.nestedTypes(t);return!!e&&!e[e.length-1].match(/[0-9]{1,}/g)},o.prototype.isStaticArray=function(t){var e=this.nestedTypes(t);return!!e&&!!e[e.length-1].match(/[0-9]{1,}/g)},o.prototype.staticArrayLength=function(t){var e=this.nestedTypes(t);return e?parseInt(e[e.length-1].match(/[0-9]{1,}/g)||1):1},o.prototype.nestedName=function(t){var e=this.nestedTypes(t);return e?t.substr(0,t.length-e[e.length-1].length):t},o.prototype.isDynamicType=function(){return!1},o.prototype.nestedTypes=function(t){return t.match(/(\[[0-9]*\])/g)},o.prototype.encode=function(t,e){var r,i,o,a=this;return this.isDynamicArray(e)?(r=t.length,i=a.nestedName(e),(o=[]).push(n.formatInputInt(r).encode()),t.forEach(function(t){o.push(a.encode(t,i))}),o):this.isStaticArray(e)?function(){for(var r=a.staticArrayLength(e),n=a.nestedName(e),i=[],o=0;o<r;o++)i.push(a.encode(t[o],n));return i}():this._inputFormatter(t,e).encode()},o.prototype.decode=function(t,e,r){var n,o,a,s,u=this;if(this.isDynamicArray(r))return function(){for(var n=parseInt("0x"+t.substr(2*e,64)),i=parseInt("0x"+t.substr(2*n,64)),o=n+32,a=u.nestedName(r),s=u.staticPartLength(a),f=32*Math.floor((s+31)/32),c=[],h=0;h<i*f;h+=f)c.push(u.decode(t,o+h,a));return c}();if(this.isStaticArray(r))return function(){for(var n=u.staticArrayLength(r),i=e,o=u.nestedName(r),a=u.staticPartLength(o),s=32*Math.floor((a+31)/32),f=[],c=0;c<n*s;c+=s)f.push(u.decode(t,i+c,o));return f}();if(this.isDynamicType(r))return n=parseInt("0x"+t.substr(2*e,64)),o=parseInt("0x"+t.substr(2*n,64)),a=Math.floor((o+31)/32),s=new i(t.substr(2*n,64*(1+a)),0,t),u._outputFormatter(s,r);var f=this.staticPartLength(r),c=new i(t.substr(2*e,2*f),void 0,t);return this._outputFormatter(c,r)},e.exports=o},{"./formatters":212,"./param":214}],216:[function(t,e,r){var n=t("../formatters"),i=t("web3-core-helpers").formatters,o=t("../type"),a=function(){this._inputFormatter=function(){var t=Array.prototype.slice.call(arguments);return t[0]=t[0]&&"0x0"!==t[0]?i.inputAddressFormatter(t[0]):"",n.formatInputInt.apply(this,t)},this._outputFormatter=n.formatOutputAddress};(a.prototype=new o({})).constructor=a,a.prototype.isType=function(t){return!!t.match(/address(\[([0-9]*)\])?/)},e.exports=a},{"../formatters":212,"../type":215,"web3-core-helpers":191}],217:[function(t,e,r){var n=t("../formatters"),i=t("../type"),o=function(){this._inputFormatter=n.formatInputBool,this._outputFormatter=n.formatOutputBool};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^bool(\[([0-9]*)\])*$/)},e.exports=o},{"../formatters":212,"../type":215}],218:[function(t,e,r){var n=t("../formatters"),i=t("../type"),o=function(){this._inputFormatter=n.formatInputBytes,this._outputFormatter=n.formatOutputBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^bytes([0-9]{1,})(\[([0-9]*)\])*$/)},e.exports=o},{"../formatters":212,"../type":215}],219:[function(t,e,r){var n=t("../formatters"),i=t("../type"),o=function(){this._inputFormatter=n.formatInputDynamicBytes,this._outputFormatter=n.formatOutputDynamicBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^bytes(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},e.exports=o},{"../formatters":212,"../type":215}],220:[function(t,e,r){var n=t("../formatters"),i=t("../type"),o=function(){this._inputFormatter=n.formatInputInt,this._outputFormatter=n.formatOutputInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^int([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},{"../formatters":212,"../type":215}],221:[function(t,e,r){var n=t("../formatters"),i=t("../type"),o=function(){this._inputFormatter=n.formatInputString,this._outputFormatter=n.formatOutputString};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^string(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},e.exports=o},{"../formatters":212,"../type":215}],222:[function(t,e,r){var n=t("../formatters"),i=t("../type"),o=function(){this._inputFormatter=n.formatInputInt,this._outputFormatter=n.formatOutputUInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(t){return!!t.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},{"../formatters":212,"../type":215}],223:[function(t,e,r){arguments[4][194][0].apply(r,arguments)},{"./register":225,dup:194}],224:[function(t,e,r){arguments[4][195][0].apply(r,arguments)},{dup:195}],225:[function(t,e,r){arguments[4][196][0].apply(r,arguments)},{"./loader":224,dup:196}],226:[function(t,e,r){arguments[4][1][0].apply(r,arguments)},{"./asn1/api":227,"./asn1/base":229,"./asn1/constants":233,"./asn1/decoders":235,"./asn1/encoders":238,"bn.js":240,dup:1}],227:[function(t,e,r){arguments[4][2][0].apply(r,arguments)},{"../asn1":226,dup:2,inherits:325,vm:161}],228:[function(t,e,r){arguments[4][3][0].apply(r,arguments)},{"../base":229,buffer:47,dup:3,inherits:325}],229:[function(t,e,r){arguments[4][4][0].apply(r,arguments)},{"./buffer":228,"./node":230,"./reporter":231,dup:4}],230:[function(t,e,r){arguments[4][5][0].apply(r,arguments)},{"../base":229,dup:5,"minimalistic-assert":329}],231:[function(t,e,r){arguments[4][6][0].apply(r,arguments)},{dup:6,inherits:325}],232:[function(t,e,r){arguments[4][7][0].apply(r,arguments)},{"../constants":233,dup:7}],233:[function(t,e,r){arguments[4][8][0].apply(r,arguments)},{"./der":232,dup:8}],234:[function(t,e,r){arguments[4][9][0].apply(r,arguments)},{"../../asn1":226,dup:9,inherits:325}],235:[function(t,e,r){arguments[4][10][0].apply(r,arguments)},{"./der":234,"./pem":236,dup:10}],236:[function(t,e,r){arguments[4][11][0].apply(r,arguments)},{"./der":234,buffer:47,dup:11,inherits:325}],237:[function(t,e,r){arguments[4][12][0].apply(r,arguments)},{"../../asn1":226,buffer:47,dup:12,inherits:325}],238:[function(t,e,r){arguments[4][13][0].apply(r,arguments)},{"./der":237,"./pem":239,dup:13}],239:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{"./der":237,dup:14,inherits:325}],240:[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<i;o++){var a=t.charCodeAt(o)-48;n<<=4,n|=a>=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<o;a++){var s=t.charCodeAt(a)-48;i*=n,i+=s>=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<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>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<this.length;r++)this.words[r]=0;var n,i,o=0;for(r=t.length-6,n=0;r>=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=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;c<s;c+=n)f=u(t,c,c+n,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==a){var h=1;for(f=u(t,c,t.length,e),c=0;c<a;c++)h*=e;this.imuln(h),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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<n;f++){for(var c=u>>>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<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>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<o;s++)f[s]=0}else{for(s=0;s<o-i;s++)f[s]=0;for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),f[o-s-1]=a}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=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;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(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<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.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<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var l=function(t,e,r){var n,i,o,a=t.words,s=e.words,u=r.words,f=0,c=0|a[0],h=8191&c,d=c>>>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&lt,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<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var c=o-f,h=(0|t.words[c])*(0|e.words[f]),d=67108863&h;s=67108863&(d=d+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(d>>>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<t;n++)e[n]=this.revBin(n,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},b.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var h=u,d=f,l=0;l<a;l++){var p=r[c+l],b=n[c+l],m=r[c+l+a],y=n[c+l+a],v=h*m-d*y;y=h*y+d*m,m=v,r[c+l]=p+m,n[c+l]=b+y,r[c+l+a]=p-m,n[c+l+a]=b-y,l!==s&&(v=u*h-f*d,d=u*d+f*h,h=v)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},b.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,r,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),f=new Array(n),c=new Array(n),h=new Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,f,n),this.transform(a,o,s,u,n,i),this.transform(f,o,c,h,n,i);for(var l=0;l<n;l++){var p=s[l]*c[l]-u[l]*h[l];u[l]=s[l]*h[l]+u[l]*c[l],s[l]=p}return this.conjugate(s,u,n),this.transform(s,u,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=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<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=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<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<r;this.words[e]=u|a,a=s>>>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<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var f=0;f<a;f++)u.words[f]=this.words[f];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,f=0;f<this.length;f++)this.words[f]=this.words[f+a];else this.words[0]=0,this.length=1;var c=0;for(f=this.length-1;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<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=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<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,a=t.length+r;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>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<s.length;f++)s.words[f]=0}var c=n.clone()._ishlnsubmul(i,1,u);0===c.negative&&(n=c,s&&(s.words[u]=1));for(var h=u-1;h>=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<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>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:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(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=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?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<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>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<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(g,y),i(w,y),i(_,y),_.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=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<p);var y=this.pow(h,new o(1).iushln(p-m-1));d=d.redMul(y),h=y.redSqr(),l=l.redMul(h),p=m}return d},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=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<r.length;)t._cache=e.concat([t._cache,(i=t,i._prev=i._cipher.encryptBlock(i._prev),i._prev)]);var i,o=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),n(r,o)}}).call(this,t("buffer").Buffer)},{buffer:47,"buffer-xor":269}],258:[function(t,e,r){arguments[4][34][0].apply(r,arguments)},{"./aes":242,"cipher-base":270,dup:34,inherits:325,"safe-buffer":350}],259:[function(t,e,r){arguments[4][35][0].apply(r,arguments)},{"browserify-aes/browser":244,"browserify-aes/modes":255,"browserify-des":260,"browserify-des/modes":261,dup:35,evp_bytestokey:310}],260:[function(t,e,r){(function(r){var n=t("cipher-base"),i=t("des.js"),o=t("inherits"),a={"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 s(t){n.call(this);var e,i=t.mode.toLowerCase(),o=a[i];e=t.decrypt?"decrypt":"encrypt";var s=t.key;"des-ede"!==i&&"des-ede-cbc"!==i||(s=r.concat([s,s.slice(0,8)]));var u=t.iv;this._des=o.create({key:s,iv:u,type:e})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=s,o(s,n),s.prototype._update=function(t){return new r(this._des.update(t))},s.prototype._final=function(){return new r(this._des.final())}}).call(this,t("buffer").Buffer)},{buffer:47,"cipher-base":270,"des.js":278,inherits:325}],261:[function(t,e,r){arguments[4][37][0].apply(r,arguments)},{dup:37}],262:[function(t,e,r){(function(r){var n=t("bn.js"),i=t("randombytes");function o(t,e){var i,o,s={blinder:(o=a(i=e)).toRed(n.mont(i.modulus)).redPow(new n(i.publicExponent)).fromRed(),unblinder:o.invm(i.modulus)},u=e.modulus.byteLength(),f=(n.mont(e.modulus),new n(t).mul(s.blinder).umod(e.modulus)),c=f.toRed(n.mont(e.prime1)),h=f.toRed(n.mont(e.prime2)),d=e.coefficient,l=e.prime1,p=e.prime2,b=c.redPow(e.exponent1),m=h.redPow(e.exponent2);b=b.fromRed(),m=m.fromRed();var y=b.isub(m).imul(d).umod(l);return y.imul(p),m.iadd(y),new r(m.imul(s.unblinder).umod(e.modulus).toArray(!1,u))}function a(t){for(var e=t.modulus.byteLength(),r=new n(i(e));r.cmp(t.modulus)>=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())).length<e.byteLength()){var a=new r(e.byteLength()-t.length);a.fill(0),t=r.concat([a,t])}var s=i.length,u=function(t,e){t=(t=c(t,e)).mod(e);var n=new r(t.toArray());if(n.length<e.byteLength()){var i=new r(e.byteLength()-n.length);i.fill(0),n=r.concat([i,n])}return n}(i,e),f=new r(s);f.fill(1);var h=new r(s);return h.fill(0),h=n(o,h).update(f).update(new r([0])).update(t).update(u).digest(),f=n(o,h).update(f).digest(),{k:h=n(o,h).update(f).update(new r([1])).update(t).update(u).digest(),v:f=n(o,h).update(f).digest()}}function c(t,e){var r=new a(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function h(t,e,i){var o,a;do{for(o=new r(0);8*o.length<t.bitLength();)e.v=n(i,e.k).update(e.v).digest(),o=r.concat([o,e.v]);a=c(o,t),e.k=n(i,e.k).update(e.v).update(new r([0])).digest(),e.v=n(i,e.k).update(e.v).digest()}while(-1!==a.cmp(t));return a}e.exports=function(t,e,n,d,l){var p=s(e);if(p.curve){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");return function(t,e){var n=u[e.curve.join(".")];if(!n)throw new Error("unknown curve "+e.curve.join("."));var i=new o(n).keyFromPrivate(e.privateKey).sign(t);return new r(i.toDER())}(t,p)}if("dsa"===p.type){if("dsa"!==d)throw new Error("wrong private key type");return function(t,e,n){for(var i,o,s,u,d=e.params.priv_key,l=e.params.p,p=e.params.q,b=e.params.g,m=new a(0),y=c(t,p).mod(p),v=!1,g=f(d,p,t,n);!1===v;)i=h(p,g,n),o=i,s=l,u=p,m=b.toRed(a.mont(s)).redPow(o).fromRed().mod(u),0===(v=i.invm(p).imul(y.add(d.mul(m))).mod(p)).cmpn(0)&&(v=!1,m=new a(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t)),128&e[0]&&(e=[0].concat(e));var n=[48,t.length+e.length+4,2,t.length];return n=n.concat(t,[2,e.length],e),new r(n)}(m,v)}(t,p,n)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");t=r.concat([l,t]);for(var b=p.modulus.byteLength(),m=[0,1];t.length+m.length+1<b;)m.push(255);m.push(0);for(var y=-1;++y<t.length;)m.push(t[y]);return i(m,p)},e.exports.getKey=f,e.exports.makeKey=h}).call(this,t("buffer").Buffer)},{"./curves.json":265,"bn.js":240,"browserify-rsa":262,buffer:47,"create-hmac":275,elliptic:288,"parse-asn1":335}],268:[function(t,e,r){(function(r){var n=t("bn.js"),i=t("elliptic").ec,o=t("parse-asn1"),a=t("./curves.json");function s(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=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<d;)l.push(255),p++;l.push(0);for(var b=-1;++b<e.length;)l.push(e[b]);l=new r(l);var m=n.mont(h.modulus);t=(t=new n(t).toRed(m)).redPow(new n(h.publicExponent)),t=new r(t.fromRed().toArray());var y=p<8?1:0;for(d=Math.min(t.length,l.length),t.length!==l.length&&(y=1),b=-1;++b<d;)y|=t[b]^l[b];return 0===y}}).call(this,t("buffer").Buffer)},{"./curves.json":265,"bn.js":240,buffer:47,elliptic:288,"parse-asn1":335}],269:[function(t,e,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;o<n;++o)i[o]=e[o]^r[o];return i}}).call(this,t("buffer").Buffer)},{buffer:47}],270:[function(t,e,r){arguments[4][48][0].apply(r,arguments)},{dup:48,inherits:325,"safe-buffer":350,stream:156,string_decoder:157}],271:[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<n){var o=new r(n-i.length);o.fill(0),i=r.concat([o,i])}return e?i.toString(e):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},a.prototype.computeSecret=function(t,e,n){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),s(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},a.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),s(r,t)},a.prototype.getPrivateKey=function(t){return s(this.keys.getPrivate(),t)},a.prototype.setPublicKey=function(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this.keys._importPublic(t),this},a.prototype.setPrivateKey=function(t,e){e=e||"utf8",r.isBuffer(t)||(t=new r(t,e));var n=new i(t);return n=n.toString(16),this.keys._importPrivate(n),this}}).call(this,t("buffer").Buffer)},{"bn.js":240,buffer:47,elliptic:288}],272:[function(t,e,r){(function(r){var n=t("inherits"),i=t("./md5"),o=t("ripemd160"),a=t("sha.js"),s=t("cipher-base");function u(t){s.call(this,"digest"),this._hash=t,this.buffers=[]}function f(t){s.call(this,"digest"),this._hash=t}n(u,s),u.prototype._update=function(t){this.buffers.push(t)},u.prototype._final=function(){var t=r.concat(this.buffers),e=this._hash(t);return this.buffers=null,e},n(f,s),f.prototype._update=function(t){this._hash.update(t)},f.prototype._final=function(){return this._hash.digest()},e.exports=function(t){return"md5"===(t=t.toLowerCase())?new u(i):new f("rmd160"===t||"ripemd160"===t?new o:a(t))}}).call(this,t("buffer").Buffer)},{"./md5":274,buffer:47,"cipher-base":270,inherits:325,ripemd160:349,"sha.js":354}],273:[function(t,e,r){(function(t){var r=4,n=new t(r);n.fill(0);e.exports=function(e,i){var o=i(function(e){if(e.length%r!=0){var i=e.length+(r-e.length%r);e=t.concat([e,n],i)}for(var o=new Array(e.length>>>2),a=0,s=0;a<e.length;a+=r,s++)o[s]=e.readInt32LE(a);return o}(e),8*e.length);e=new t(16);for(var a=0;a<o.length;a++)e.writeInt32LE(o[a],a<<2,!0);return e}}).call(this,t("buffer").Buffer)},{buffer:47}],274:[function(t,e,r){arguments[4][53][0].apply(r,arguments)},{"./make-hash":273,dup:53}],275:[function(t,e,r){arguments[4][54][0].apply(r,arguments)},{"./legacy":276,"cipher-base":270,"create-hash/md5":274,dup:54,inherits:325,ripemd160:349,"safe-buffer":350,"sha.js":354}],276:[function(t,e,r){arguments[4][55][0].apply(r,arguments)},{"cipher-base":270,dup:55,inherits:325,"safe-buffer":350}],277:[function(t,e,r){arguments[4][56][0].apply(r,arguments)},{"browserify-cipher":259,"browserify-sign":266,"browserify-sign/algos":263,"create-ecdh":271,"create-hash":272,"create-hmac":275,"diffie-hellman":284,dup:56,pbkdf2:336,"public-encrypt":341,randombytes:347,randomfill:348}],278:[function(t,e,r){arguments[4][57][0].apply(r,arguments)},{"./des/cbc":279,"./des/cipher":280,"./des/des":281,"./des/ede":282,"./des/utils":283,dup:57}],279:[function(t,e,r){arguments[4][58][0].apply(r,arguments)},{dup:58,inherits:325,"minimalistic-assert":329}],280:[function(t,e,r){arguments[4][59][0].apply(r,arguments)},{dup:59,"minimalistic-assert":329}],281:[function(t,e,r){arguments[4][60][0].apply(r,arguments)},{"../des":278,dup:60,inherits:325,"minimalistic-assert":329}],282:[function(t,e,r){arguments[4][61][0].apply(r,arguments)},{"../des":278,dup:61,inherits:325,"minimalistic-assert":329}],283:[function(t,e,r){arguments[4][62][0].apply(r,arguments)},{dup:62}],284:[function(t,e,r){(function(e){var n=t("./lib/generatePrime"),i=t("./lib/primes.json"),o=t("./lib/dh");var a={binary:!0,hex:!0,base64:!0};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=function(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new o(r,n)},r.createDiffieHellman=r.DiffieHellman=function t(r,i,s,u){return e.isBuffer(i)||void 0===a[i]?t(r,"binary",i,s):(i=i||"binary",u=u||"binary",s=s||new e([2]),e.isBuffer(s)||(s=new e(s,u)),"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,t("buffer").Buffer)},{"./lib/dh":285,"./lib/generatePrime":286,"./lib/primes.json":287,buffer:47}],285:[function(t,e,r){(function(r){var n=t("bn.js"),i=new(t("miller-rabin")),o=new n(24),a=new n(11),s=new n(10),u=new n(3),f=new n(7),c=t("./generatePrime"),h=t("randombytes");function d(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._pub=new n(t),this}function l(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._priv=new n(t),this}e.exports=b;var p={};function b(t,e,r){this.setGenerator(e),this.__prime=new n(t),this._prime=n.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=l):this._primeCode=8}function m(t,e){var n=new r(t.toArray());return e?n.toString(e):n}Object.defineProperty(b.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in p)return p[n];var h,d=0;if(t.isEven()||!c.simpleSieve||!c.fermatTest(t)||!i.test(t))return d+=1,d+="02"===r||"05"===r?8:4,p[n]=d,d;switch(i.test(t.shrn(1))||(d+=2),r){case"02":t.mod(o).cmp(a)&&(d+=8);break;case"05":(h=t.mod(s)).cmp(u)&&h.cmp(f)&&(d+=8);break;default:d+=4}return p[n]=d,d}(this.__prime,this.__gen)),this._primeCode}}),b.prototype.generateKeys=function(){return this._priv||(this._priv=new n(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},b.prototype.computeSecret=function(t){var e=(t=(t=new n(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new r(e.toArray()),o=this.getPrime();if(i.length<o.length){var a=new r(o.length-i.length);a.fill(0),i=r.concat([a,i])}return i},b.prototype.getPublicKey=function(t){return m(this._pub,t)},b.prototype.getPrivateKey=function(t){return m(this._priv,t)},b.prototype.getPrime=function(t){return m(this.__prime,t)},b.prototype.getGenerator=function(t){return m(this._gen,t)},b.prototype.setGenerator=function(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this.__gen=t,this._gen=new n(t),this}}).call(this,t("buffer").Buffer)},{"./generatePrime":286,"bn.js":240,buffer:47,"miller-rabin":328,randombytes:347}],286:[function(t,e,r){arguments[4][65][0].apply(r,arguments)},{"bn.js":240,dup:65,"miller-rabin":328,randombytes:347}],287:[function(t,e,r){arguments[4][66][0].apply(r,arguments)},{dup:66}],288:[function(t,e,r){arguments[4][67][0].apply(r,arguments)},{"../package.json":303,"./elliptic/curve":291,"./elliptic/curves":294,"./elliptic/ec":295,"./elliptic/eddsa":298,"./elliptic/utils":302,brorand:241,dup:67}],289:[function(t,e,r){arguments[4][68][0].apply(r,arguments)},{"../../elliptic":288,"bn.js":240,dup:68}],290:[function(t,e,r){arguments[4][69][0].apply(r,arguments)},{"../../elliptic":288,"../curve":291,"bn.js":240,dup:69,inherits:325}],291:[function(t,e,r){arguments[4][70][0].apply(r,arguments)},{"./base":289,"./edwards":290,"./mont":292,"./short":293,dup:70}],292:[function(t,e,r){arguments[4][71][0].apply(r,arguments)},{"../../elliptic":288,"../curve":291,"bn.js":240,dup:71,inherits:325}],293:[function(t,e,r){arguments[4][72][0].apply(r,arguments)},{"../../elliptic":288,"../curve":291,"bn.js":240,dup:72,inherits:325}],294:[function(t,e,r){arguments[4][73][0].apply(r,arguments)},{"../elliptic":288,"./precomputed/secp256k1":301,dup:73,"hash.js":312}],295:[function(t,e,r){arguments[4][74][0].apply(r,arguments)},{"../../elliptic":288,"./key":296,"./signature":297,"bn.js":240,dup:74,"hmac-drbg":324}],296:[function(t,e,r){arguments[4][75][0].apply(r,arguments)},{"../../elliptic":288,"bn.js":240,dup:75}],297:[function(t,e,r){arguments[4][76][0].apply(r,arguments)},{"../../elliptic":288,"bn.js":240,dup:76}],298:[function(t,e,r){arguments[4][77][0].apply(r,arguments)},{"../../elliptic":288,"./key":299,"./signature":300,dup:77,"hash.js":312}],299:[function(t,e,r){arguments[4][78][0].apply(r,arguments)},{"../../elliptic":288,dup:78}],300:[function(t,e,r){arguments[4][79][0].apply(r,arguments)},{"../../elliptic":288,"bn.js":240,dup:79}],301:[function(t,e,r){arguments[4][80][0].apply(r,arguments)},{dup:80}],302:[function(t,e,r){arguments[4][81][0].apply(r,arguments)},{"bn.js":240,dup:81,"minimalistic-assert":329,"minimalistic-crypto-utils":330}],303:[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/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<t;)i.push(r());return i};try{return r()}catch(t){return[]}}}},{}],310:[function(t,e,r){arguments[4][84][0].apply(r,arguments)},{dup:84,"md5.js":326,"safe-buffer":350}],311:[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;o<this._blockSize;)n[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var a=0,s=8*t.length;s>0;++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<<e|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.length<e;)o=i(s++),a=r.concat([a,n("sha1").update(t).update(o).digest()]);return a.slice(0,e)}}).call(this,t("buffer").Buffer)},{buffer:47,"create-hash":272}],343:[function(t,e,r){(function(r){var n=t("parse-asn1"),i=t("./mgf"),o=t("./xor"),a=t("bn.js"),s=t("browserify-rsa"),u=t("create-hash"),f=t("./withPublic");e.exports=function(t,e,c){var h;h=t.padding?t.padding:c?1:4;var d,l=n(t),p=l.modulus.byteLength();if(e.length>p||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<i;)n+=t[o]^e[o];return n}(a,d.slice(0,s)))throw new Error("decryption error");var l=s;for(;0===d[l];)l++;if(1!==d[l++])throw new Error("decryption error");return d.slice(l)}(l,d);if(1===h)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=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<t;)u===s.length&&(s=i(2*t),u=0),(n=s[u++])&&(o[a++]=n);return o}(s-a-3);return new u(r.concat([new r([0,n?1:2]),o,new r([0]),e],s))}(p,e,h);else{if(3!==d)throw new Error("unknown padding");if((l=new u(e)).cmp(p.modulus)>=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<<e|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<u;w++)_(y,128*w*s,s,a,l,d);return n(t,y,1,f,"sha256");function _(t,e,r,n,i,o){var a,s=128*r;for(t.copy(o,0,e,e+s),a=0;a<n;a++)o.copy(i,a*s,0,0+s),M(o,0,s,r),h&&h();for(a=0;a<n;a++){var u=0+64*(2*r-1);S(i,(o.readUInt32LE(u)&n-1)*s,o,0,s),M(o,0,s,r),h&&h()}o.copy(t,e,0,0+s)}function M(t,e,r,n){var i;for(o(t,e+64*(2*n-1),m,0,64),i=0;i<2*n;i++)S(t,64*i,m,0,64),k(m),o(m,0,t,r+64*i,64);for(i=0;i<n;i++)o(t,r+2*i*64,t,e+64*i,64);for(i=0;i<n;i++)o(t,r+64*(2*i+1),t,e+64*(i+n),64)}function x(t,e){return t<<e|t>>>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<i;o++)r[n+o]^=t[e+o]}}}).call(this,t("buffer").Buffer)},{buffer:47,pbkdf2:336}],353:[function(t,e,r){arguments[4][148][0].apply(r,arguments)},{dup:148,"safe-buffer":350}],354:[function(t,e,r){arguments[4][149][0].apply(r,arguments)},{"./sha":355,"./sha1":356,"./sha224":357,"./sha256":358,"./sha384":359,"./sha512":360,dup:149}],355:[function(t,e,r){arguments[4][150][0].apply(r,arguments)},{"./hash":353,dup:150,inherits:325,"safe-buffer":350}],356:[function(t,e,r){arguments[4][151][0].apply(r,arguments)},{"./hash":353,dup:151,inherits:325,"safe-buffer":350}],357:[function(t,e,r){arguments[4][152][0].apply(r,arguments)},{"./hash":353,"./sha256":358,dup:152,inherits:325,"safe-buffer":350}],358:[function(t,e,r){arguments[4][153][0].apply(r,arguments)},{"./hash":353,dup:153,inherits:325,"safe-buffer":350}],359:[function(t,e,r){arguments[4][154][0].apply(r,arguments)},{"./hash":353,"./sha512":360,dup:154,inherits:325,"safe-buffer":350}],360:[function(t,e,r){arguments[4][155][0].apply(r,arguments)},{"./hash":353,dup:155,inherits:325,"safe-buffer":350}],361:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],362:[function(t,e,r){(function(t){var r;if(t.crypto&&crypto.getRandomValues){var n=new Uint8Array(16);r=function(){return crypto.getRandomValues(n),n}}if(!r){var i=new Array(16);r=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((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<t;++r)this.add(this._accounts.create(e).privateKey);return this},M.prototype.add=function(t){return i.isString(t)&&(t=this._accounts.privateKeyToAccount(t)),this[t.address]?this[t.address]:((t=this._accounts.privateKeyToAccount(t.privateKey)).index=this._findSafeIndex(),this[t.index]=t,this[t.address]=t,this[t.address.toLowerCase()]=t,this.length++,t)},M.prototype.remove=function(t){var e=this[t];return!(!e||!e.address)&&(this[e.address].privateKey=null,delete this[e.address],this[e.address.toLowerCase()].privateKey=null,delete this[e.address.toLowerCase()],this[e.index].privateKey=null,delete this[e.index],this.length--,!0)},M.prototype.clear=function(){var t=this;return this._currentIndexes().forEach(function(e){t.remove(e)}),this},M.prototype.encrypt=function(t,e){var r=this;return this._currentIndexes().map(function(n){return r[n].encrypt(t,e)})},M.prototype.decrypt=function(t,e){var r=this;return t.forEach(function(t){var n=r._accounts.decrypt(t,e);if(!n)throw new Error("Couldn't decrypt accounts. Password wrong?");r.add(n)}),this},M.prototype.save=function(t,e){return localStorage.setItem(e||this.defaultKeyName,JSON.stringify(this.encrypt(t))),!0},M.prototype.load=function(t,e){var r=localStorage.getItem(e||this.defaultKeyName);if(r)try{r=JSON.parse(r)}catch(t){}return this.decrypt(r||[],t)},"undefined"==typeof localStorage&&(delete M.prototype.save,delete M.prototype.load),e.exports=_}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"any-promise":223,buffer:47,crypto:56,"crypto-browserify":277,"eth-lib/lib/account":304,"eth-lib/lib/bytes":306,"eth-lib/lib/hash":307,"eth-lib/lib/nat":308,"eth-lib/lib/rlp":309,"scrypt.js":351,underscore:361,uuid:363,"web3-core":209,"web3-core-helpers":191,"web3-core-method":193,"web3-utils":393}],365:[function(t,e,r){arguments[4][178][0].apply(r,arguments)},{dup:178}],366:[function(t,e,r){var n=t("underscore"),i=t("web3-core"),o=t("web3-core-method"),a=t("web3-utils"),s=t("web3-core-subscriptions").subscription,u=t("web3-core-helpers").formatters,f=t("web3-core-helpers").errors,c=t("web3-core-promievent"),h=t("web3-eth-abi"),d=function t(e,r,o){var s=this,f=Array.prototype.slice.call(arguments);if(!(this instanceof t))throw new Error('Please use the "new" keyword to instantiate a web3.eth.contract() object!');if(i.packageInit(this,[this.constructor.currentProvider]),this.clearSubscriptions=this._requestManager.clearSubscriptions,!e||!Array.isArray(e))throw new Error("You must provide the json interface of the contract when instantiating a contract object.");this.options={};var c=f[f.length-1];n.isObject(c)&&!n.isArray(c)&&(o=c,this.options=n.extend(this.options,this._getOrSetDefaultOptions(o)),n.isObject(r)&&(r=null)),Object.defineProperty(this.options,"address",{set:function(t){t&&(s._address=a.toChecksumAddress(u.inputAddressFormatter(t)))},get:function(){return s._address},enumerable:!0}),Object.defineProperty(this.options,"jsonInterface",{set:function(t){return s.methods={},s.events={},s._jsonInterface=t.map(function(t){var e,r;if(t.name&&(r=a._jsonInterfaceMethodToString(t)),"function"===t.type){if(t.signature=h.encodeFunctionSignature(r),e=s._createTxObject.bind({method:t,parent:s}),s.methods[t.name]){var n=s._createTxObject.bind({method:t,parent:s,nextMethod:s.methods[t.name]});s.methods[t.name]=n}else s.methods[t.name]=e;s.methods[t.signature]=e,s.methods[r]=e}else if("event"===t.type){t.signature=h.encodeEventSignature(r);var i=s._on.bind(s,t.signature);s.events[t.name]&&"bound "!==s.events[t.name].name||(s.events[t.name]=i),s.events[t.signature]=i,s.events[r]=i}return t}),s.events.allEvents=s._on.bind(s,"allevents"),s._jsonInterface},get:function(){return s._jsonInterface},enumerable:!0});var d=this.constructor.defaultAccount,l=this.constructor.defaultBlock||"latest";Object.defineProperty(this,"defaultAccount",{get:function(){return d},set:function(t){return t&&(d=a.toChecksumAddress(u.inputAddressFormatter(t))),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return l},set:function(t){return l=t,t},enumerable:!0}),this.methods={},this.events={},this._address=null,this._jsonInterface=[],this.options.address=r,this.options.jsonInterface=e};d.setProvider=function(t,e){i.packageInit(this,[t]),this._ethAccounts=e},d.prototype._getCallback=function(t){if(t&&n.isFunction(t[t.length-1]))return t.pop()},d.prototype._checkListener=function(t,e){if(e===t)throw new Error('The event "'+t+"\" is a reserved event name, you can't use it.")},d.prototype._getOrSetDefaultOptions=function(t){var e=t.gasPrice?String(t.gasPrice):null,r=t.from?a.toChecksumAddress(u.inputAddressFormatter(t.from)):null;return t.data=t.data||this.options.data,t.from=r||this.options.from,t.gasPrice=e||this.options.gasPrice,t.gas=t.gas||t.gasLimit||this.options.gas,delete t.gasLimit,t},d.prototype._encodeEventABI=function(t,e){var r=(e=e||{}).filter||{},i={};if(["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(t){i[t]=u.inputBlockNumberFormatter(e[t])}),n.isArray(e.topics))i.topics=e.topics;else{if(i.topics=[],t&&!t.anonymous&&"ALLEVENTS"!==t.name&&i.topics.push(t.signature),"ALLEVENTS"!==t.name){var o=t.inputs.filter(function(t){return!0===t.indexed}).map(function(t){var e=r[t.name];return e?n.isArray(e)?e.map(function(e){return h.encodeParameter(t.type,e)}):h.encodeParameter(t.type,e):null});i.topics=i.topics.concat(o)}i.topics.length||delete i.topics}return this.options.address&&(i.address=this.options.address.toLowerCase()),i},d.prototype._decodeEventABI=function(t){var e=this;t.data=t.data||"",t.topics=t.topics||[];var r=u.outputLogFormatter(t);"ALLEVENTS"===e.name&&(e=e.jsonInterface.find(function(e){return e.signature===t.topics[0]})||{anonymous:!0}),e.inputs=e.inputs||[];var n=e.anonymous?t.topics:t.topics.slice(1);return r.returnValues=h.decodeLog(e.inputs,t.data,n),delete r.returnValues.__length__,r.event=e.name,r.signature=e.anonymous||!t.topics[0]?null:t.topics[0],r.raw={data:r.data,topics:r.topics},delete r.data,delete r.topics,r},d.prototype._encodeMethodABI=function(){var t=this._method.signature,e=this.arguments||[],r=!1,i=this._parent.options.jsonInterface.filter(function(e){return"constructor"===t&&e.type===t||(e.signature===t||e.signature===t.replace("0x","")||e.name===t)&&"function"===e.type}).map(function(t){var i=n.isArray(t.inputs)?t.inputs.length:0;if(i!==e.length)throw new Error("The number of arguments is not matching the methods required number. You need to pass "+i+" arguments.");return"function"===t.type&&(r=t.signature),n.isArray(t.inputs)?t.inputs.map(function(t){return t.type}):[]}).map(function(t){return h.encodeParameters(t,e).replace("0x","")})[0]||"";if("constructor"===t){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+i}var o=r?r+i:i;if(o)return o;throw new Error("Couldn't find a matching contract method named \""+this._method.name+'".')},d.prototype._decodeMethodReturn=function(t,e){if(!e)return null;e=e.length>=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;i<n.length;i++)e[r+i]=n[i];return e.length=r+n.length,t.apply(this,e)})});l(function(t){var e=E(t);function r(t,e){return[d(t,e)]}return l(function(t){return B(r,t,e)[0]})});function f(t,e){return function(){return t.call(this,e.apply(this,arguments))}}function c(t){return function(e){return e[t]}}var h=l(function(t){return l(function(e){for(var r,n=0;n<v(t);n++)if(r=d(e,t[n]))return r})});function d(t,e){return e.apply(s,t)}function l(t){var e=t.length-1,r=i.prototype.slice;if(0==e)return function(){return t.call(this,r.call(arguments))};if(1==e)return function(){return t.call(this,arguments[0],r.call(arguments,1))};var n=i(t.length);return function(){for(var i=0;i<e;i++)n[i]=arguments[i];return n[e]=r.call(arguments,e),t.apply(this,n)}}function p(t,e){return function(r){return t(r)&&e(r)}}function b(){}function m(){return!0}function y(t,e){return e&&e.constructor===t}var v=c("length"),g=u(y,String);function w(t){return t!==s}function _(t,e){return e instanceof n&&function t(e,r){return!r||e(k(r))&&t(e,S(r))}(function(t){return t in e},t)}function M(t,e){return[t,e]}var x=null,k=c(0),S=c(1);function E(t){return C(t.reduce((e=M,function(t,r){return e(r,t)}),x));var e}var A=l(E);function j(t){return B(function(t,e){return t.unshift(e),t},[],t)}function I(t,e){return e?M(t(k(e)),I(t,S(e))):x}function B(t,e,r){return r?t(B(t,e,S(r)),k(r)):e}function T(t,e,r){return function t(r,n){return r?e(k(r))?(n(k(r)),S(r)):M(k(r),t(S(r),n)):x}(t,r||b)}function C(t){return function t(e,r){return e?t(S(e),M(k(e),r)):r}(t,x)}function P(t){var e,r,n,i=t(ht).emit,a=t(dt).emit,u=t(lt).emit,f=t(it).emit,c=65536,h=/[\\"\n]/g,d=0,l=d++,p=d++,b=d++,m=d++,y=d++,v=d++,g=d++,w=d++,_=d++,M=d++,x=d++,k=d++,S=d++,E=d++,A=d++,j=d++,I=d++,B=d++,T=d++,C=d++,P=20,R=c,O=s,N="",L=!1,F=!1,q=l,D=[],U=null,z=0,K=0,H=0,V=0,W=1;function X(t){O!==s&&(a(O),u(),O=s),e=o(t+"\nLn: "+W+"\nCol: "+V+"\nChr: "+r),f(pt(s,s,e))}function G(t){return"\r"==t||"\n"==t||" "==t||"\t"==t}t(ut).on(function(t){if(e)return;if(F)return X("Cannot write after close");var o=0;r=t[0];for(;r&&(n=r,r=t[o++]);)switch(H++,"\n"==r?(W++,V=0):V++,q){case l:if("{"===r)q=b;else if("["===r)q=y;else if(!G(r))return X("Non-whitespace before {[.");continue;case w:case b:if(G(r))continue;if(q===w)D.push(_);else{if("}"===r){a({}),u(),q=D.pop()||p;continue}D.push(m)}if('"'!==r)return X('Malformed object key should start with " ');q=g;continue;case _:case m:if(G(r))continue;if(":"===r)q===m?(D.push(m),O!==s&&(a({}),i(O),O=s),K++):O!==s&&(i(O),O=s),q=p;else if("}"===r)O!==s&&(a(O),u(),O=s),u(),K--,q=D.pop()||p;else{if(","!==r)return X("Bad object");q===m&&D.push(m),O!==s&&(a(O),u(),O=s),q=w}continue;case y:case p:if(G(r))continue;if(q===y){if(a([]),K++,q=p,"]"===r){u(),K--,q=D.pop()||p;continue}D.push(v)}if('"'===r)q=g;else if("{"===r)q=b;else if("["===r)q=y;else if("t"===r)q=M;else if("f"===r)q=S;else if("n"===r)q=I;else if("-"===r)N+=r;else if("0"===r)N+=r,q=P;else{if(-1==="123456789".indexOf(r))return X("Bad value");N+=r,q=P}continue;case v:if(","===r)D.push(v),O!==s&&(a(O),u(),O=s),q=p;else{if("]"!==r){if(G(r))continue;return X("Bad array")}O!==s&&(a(O),u(),O=s),u(),K--,q=D.pop()||p}continue;case g:O===s&&(O="");var f=o-1;t:for(;;){for(;z>0;)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.length<h;)l="0"+l;d.pad||(l=l.match(/^([0-9]*[1-9]|0)(0*)/)[1]);var p=n.div(c).toString(10);d.commify&&(p=p.replace(/\B(?=(\d{3})+(?!\d))/g,","));var b=p+("0"==l?"":"."+l);return f&&(b="-"+b),b},toWei:function(t,e){var r=f(t),i=u(e),o=s[e].length-1||1,c="-"===r.substring(0,1);if(c&&(r=r.substring(1)),"."===r)throw new Error("[ethjs-unit] while converting number "+t+" to wei, invalid value");var h=r.split(".");if(h.length>2)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.length<o;)l+="0";d=new n(d),l=new n(l);var p=d.mul(i).add(l);return c&&(p=p.mul(a)),new n(p.toString(10),10)}}},{"bn.js":382,"number-to-bn":386}],385:[function(t,e,r){e.exports=function(t){if("string"!=typeof t)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+(void 0===t?"undefined":_typeof(t))+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},{}],386:[function(t,e,r){var n=t("bn.js"),i=t("strip-hex-prefix");e.exports=function(t){if("string"==typeof t||"number"==typeof t){var e=new n(1),r=String(t).toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),a=i(r);if("-"===a.substr(0,1)&&(a=i(a.slice(1)),e=new n(-1,10)),!(a=""===a?"0":a).match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||!0===o&&a.match(/^[0-9A-Fa-f]+$/))return new n(a,16).mul(e);if((a.match(/^-?[0-9]+$/)||""===a)&&!1===o)return new n(a,10).mul(e)}else if("object"===(void 0===t?"undefined":_typeof(t))&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new n(t.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},{"bn.js":382,"strip-hex-prefix":390}],387:[function(t,e,r){e.exports=window.crypto},{}],388:[function(t,e,r){e.exports=t("crypto")},{crypto:387}],389:[function(t,e,r){e.exports=function(e,r){var n=t("./crypto.js"),i="function"==typeof r;if(e>65536){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<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function d(t){if(t>=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="";++n<r;)i+=p(e[n]);return i},decode:function(t){s=h(t),u=s.length,f=0;for(var e,r=[];!1!==(e=m());)r.push(e);return function(t){for(var e,r=t.length,n=-1,i="";++n<r;)(e=t[n])>65535&&(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);r<n;r+=2){var i=parseInt(t.substr(r,2),16);e+=String.fromCharCode(i)}return e},f=function(t){if(!t)return"0x00";for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return"0x"+e},c=function(t){if(t=t?t.toLowerCase():"ether",!i.unitMap[t])throw new Error('This unit "'+t+"\" doesn't exist, please use the one of the following units"+JSON.stringify(i.unitMap,null,2));return t};e.exports={_fireError:function(t,e,r,i){return!n.isObject(t)||t instanceof Error||!t.data||((n.isObject(t.data)||n.isArray(t.data))&&(t.data=JSON.stringify(t.data,null,2)),t=t.message+"\n"+t.data),n.isString(t)&&(t=new Error(t)),n.isFunction(i)&&i(t),n.isFunction(r)&&((e&&n.isFunction(e.listeners)&&e.listeners("error").length||n.isFunction(i))&&e.catch(function(){}),setTimeout(function(){r(t)},1)),e&&n.isFunction(e.emit)&&setTimeout(function(){e.emit("error",t),e.removeAllListeners()},1),e},_jsonInterfaceMethodToString:function(t){if(n.isObject(t)&&t.name&&-1!==t.name.indexOf("("))return t.name;var e=t.inputs.map(function(t){return t.type}).join(",");return t.name+"("+e+")"},randomHex:s,_:n,BN:o.BN,isBN:o.isBN,isBigNumber:o.isBigNumber,isHex:o.isHex,isHexStrict:o.isHexStrict,sha3:o.sha3,keccak256:o.sha3,soliditySha3:a,isAddress:o.isAddress,checkAddressChecksum:o.checkAddressChecksum,toChecksumAddress:function(t){if(void 0===t)return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(t))throw new Error('Given address "'+t+'" is not a valid Ethereum address.');t=t.toLowerCase().replace(/^0x/i,"");for(var e=o.sha3(t).replace(/^0x/i,""),r="0x",n=0;n<t.length;n++)parseInt(e[n],16)>7?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||n<e.replace(/^0x/i,"").length/2)throw new Error("Invalid bytes"+n+" for "+e);return o.rightPad(e,2*n)}if(t.startsWith("uint")){if(n%8||n<8||n>256)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<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return"0x"+e},p=function(t){if(n.isNull(t)||n.isUndefined(t))return t;if(!isFinite(t)&&!m(t))throw new Error('Given input "'+t+'" is not a number.');var e=c(t),r=e.toString(16);return e.lt(new i(0))?"-0x"+r.substr(1):"0x"+r},b=function(t){if(t=t.toString(16),!m(t))throw new Error('Given value "'+t+'" is not a valid hex string.');t=t.replace(/^0x/i,"");for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},m=function(t){return(n.isString(t)||n.isNumber(t))&&/^(-)?0x[0-9a-f]*$/i.test(t)},y=function(t){m(t)&&/^0x/i.test(t.toString())&&(t=b(t));var e=s.keccak256(t);return"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"===e?null:e};y._Hash=s,e.exports={BN:i,isBN:u,isBigNumber:f,toBN:c,isAddress:h,isBloom:function(t){return!(!/^(0x)?[0-9a-f]{512}$/i.test(t)||!/^(0x)?[0-9a-f]{512}$/.test(t)&&!/^(0x)?[0-9A-F]{512}$/.test(t))},isTopic:function(t){return!(!/^(0x)?[0-9a-f]{64}$/i.test(t)||!/^(0x)?[0-9a-f]{64}$/.test(t)&&!/^(0x)?[0-9A-F]{64}$/.test(t))},checkAddressChecksum:d,utf8ToHex:l,hexToUtf8:function(t){if(!m(t))throw new Error('The parameter "'+t+'" must be a valid HEX string.');for(var e="",r=0,n=(t=(t=(t=(t=(t=t.replace(/^0x/i,"")).replace(/^(?:00)*/,"")).split("").reverse().join("")).replace(/^(?:00)*/,"")).split("").reverse().join("")).length,i=0;i<n;i+=2)r=parseInt(t.substr(i,2),16),e+=String.fromCharCode(r);return a.decode(e)},hexToNumber:function(t){return t?c(t).toNumber():t},hexToNumberString:function(t){return t?c(t).toString(10):t},numberToHex:p,toHex:function(t,e){if(h(t))return e?"address":"0x"+t.toLowerCase().replace(/^0x/i,"");if(n.isBoolean(t))return e?"bool":t?"0x01":"0x00";if(n.isObject(t)&&!f(t)&&!u(t))return e?"string":l(JSON.stringify(t));if(n.isString(t)){if(0===t.indexOf("-0x")||0===t.indexOf("-0X"))return e?"int256":p(t);if(0===t.indexOf("0x")||0===t.indexOf("0X"))return e?"bytes":t;if(!isFinite(t))return e?"string":l(t)}return e?t<0?"int256":"uint256":p(t)},hexToBytes:b,bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[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
diff --git a/ui/app/components/app/backup-notification/backup-notification.component.js b/ui/app/components/app/backup-notification/backup-notification.component.js
new file mode 100644
index 000000000..dba79186c
--- /dev/null
+++ b/ui/app/components/app/backup-notification/backup-notification.component.js
@@ -0,0 +1,50 @@
+import React, { PureComponent } from 'react'
+import PropTypes from 'prop-types'
+import Button from '../../ui/button'
+import {
+ INITIALIZE_SEED_PHRASE_ROUTE,
+} from '../../../helpers/constants/routes'
+
+export default class BackupNotification extends PureComponent {
+ static propTypes = {
+ history: PropTypes.object,
+ showSeedPhraseBackupAfterOnboarding: PropTypes.func,
+ }
+
+ static contextTypes = {
+ t: PropTypes.func,
+ metricsEvent: PropTypes.func,
+ }
+
+ handleSubmit = () => {
+ const { history, showSeedPhraseBackupAfterOnboarding } = this.props
+ showSeedPhraseBackupAfterOnboarding()
+ history.push(INITIALIZE_SEED_PHRASE_ROUTE)
+ }
+
+ render () {
+ const { t } = this.context
+
+ return (
+ <div className="backup-notification">
+ <div className="backup-notification__header">
+ <img
+ className="backup-notification__icon"
+ src="images/meta-shield.svg"
+ />
+ <div className="backup-notification__text">Backup your Secret Recovery code to keep your wallet and funds secure.</div>
+ <i className="fa fa-info-circle"></i>
+ </div>
+ <div className="backup-notification__buttons">
+ <Button
+ type="primary"
+ className="backup-notification__submit-button"
+ onClick={this.handleSubmit}
+ >
+ { t('backupNow') }
+ </Button>
+ </div>
+ </div>
+ )
+ }
+}
diff --git a/ui/app/components/app/backup-notification/backup-notification.container.js b/ui/app/components/app/backup-notification/backup-notification.container.js
new file mode 100644
index 000000000..6996770bc
--- /dev/null
+++ b/ui/app/components/app/backup-notification/backup-notification.container.js
@@ -0,0 +1,16 @@
+import { connect } from 'react-redux'
+import { withRouter } from 'react-router-dom'
+import { compose } from 'recompose'
+import BackupNotification from './backup-notification.component'
+import { showSeedPhraseBackupAfterOnboarding } from '../../../store/actions'
+
+const mapDispatchToProps = dispatch => {
+ return {
+ showSeedPhraseBackupAfterOnboarding: () => dispatch(showSeedPhraseBackupAfterOnboarding()),
+ }
+}
+
+export default compose(
+ withRouter,
+ connect(null, mapDispatchToProps)
+)(BackupNotification)
diff --git a/ui/app/components/app/backup-notification/index.js b/ui/app/components/app/backup-notification/index.js
new file mode 100644
index 000000000..a1cbfe75a
--- /dev/null
+++ b/ui/app/components/app/backup-notification/index.js
@@ -0,0 +1 @@
+export { default } from './backup-notification.container'
diff --git a/ui/app/components/app/backup-notification/index.scss b/ui/app/components/app/backup-notification/index.scss
new file mode 100644
index 000000000..2d76c6ce4
--- /dev/null
+++ b/ui/app/components/app/backup-notification/index.scss
@@ -0,0 +1,75 @@
+.backup-notification {
+ background: rgba(36, 41, 46, 0.9);
+ box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.12);
+ border-radius: 8px;
+ height: 116px;
+ padding: 16px;
+ margin: 8px;
+
+ display: flex;
+ flex-flow: column;
+ justify-content: space-between;
+
+ position: absolute;
+ right: 0;
+ bottom: 0;
+
+ &__header {
+ display: flex;
+ }
+
+ &__text {
+ font-family: Roboto;
+ font-style: normal;
+ font-weight: normal;
+ font-size: 12px;
+ color: #FFFFFF;
+ margin-left: 10px;
+ margin-right: 8px;
+ }
+
+ .fa-info-circle {
+ color: #6A737D;
+ }
+
+ &__ignore-button {
+ border: 2px solid #6A737D;
+ box-sizing: border-box;
+ border-radius: 6px;
+ color: $white;
+ background-color: rgba(36, 41, 46, 0.9);
+ height: 34px;
+ width: 155px;
+ padding: 0;
+
+ &:hover {
+ border-color: #6A737D;
+ background-color: #6A737D;
+ }
+ }
+
+ &__submit-button {
+ border: 2px solid #6A737D;
+ box-sizing: border-box;
+ border-radius: 6px;
+ color: $white;
+ background-color: rgba(36, 41, 46, 0.9);
+ height: 34px;
+ width: 155px;
+ padding: 0;
+
+ &:hover {
+ background-color: #3b4046;
+ }
+
+ &:active {
+ background-color:#141618;
+ }
+ }
+
+ &__buttons {
+ display: flex;
+ width: 130px;
+ align-self: flex-end;
+ }
+} \ No newline at end of file
diff --git a/ui/app/components/app/index.scss b/ui/app/components/app/index.scss
index 9b7da8c2e..1f70ba974 100644
--- a/ui/app/components/app/index.scss
+++ b/ui/app/components/app/index.scss
@@ -81,3 +81,5 @@
@import '../ui/toggle-button/index';
@import 'home-notification/index';
+
+@import 'backup-notification/index';
diff --git a/ui/app/ducks/app/app.js b/ui/app/ducks/app/app.js
index 10ed7d155..6fe2a3a9a 100644
--- a/ui/app/ducks/app/app.js
+++ b/ui/app/ducks/app/app.js
@@ -73,6 +73,7 @@ function reduceApp (state, action) {
networksTabSelectedRpcUrl: '',
networksTabIsInAddMode: false,
loadingMethodData: false,
+ showingSeedPhraseBackupAfterOnboarding: false,
}, state.appState)
switch (action.type) {
@@ -756,6 +757,16 @@ function reduceApp (state, action) {
loadingMethodData: false,
})
+ case actions.SHOW_SEED_PHRASE_BACKUP_AFTER_ONBOARDING:
+ return extend(appState, {
+ showingSeedPhraseBackupAfterOnboarding: true,
+ })
+
+ case actions.HIDE_SEED_PHRASE_BACKUP_AFTER_ONBOARDING:
+ return extend(appState, {
+ showingSeedPhraseBackupAfterOnboarding: false,
+ })
+
default:
return appState
diff --git a/ui/app/helpers/higher-order-components/authenticated/authenticated.container.js b/ui/app/helpers/higher-order-components/authenticated/authenticated.container.js
index 6124b0fcd..8fc637332 100644
--- a/ui/app/helpers/higher-order-components/authenticated/authenticated.container.js
+++ b/ui/app/helpers/higher-order-components/authenticated/authenticated.container.js
@@ -3,6 +3,7 @@ import Authenticated from './authenticated.component'
const mapStateToProps = state => {
const { metamask: { isUnlocked, completedOnboarding } } = state
+
return {
isUnlocked,
completedOnboarding,
diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js
index a5cf0f752..48eff96cb 100644
--- a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js
+++ b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js
@@ -17,6 +17,7 @@ export default class ImportWithSeedPhrase extends PureComponent {
static propTypes = {
history: PropTypes.object,
onSubmit: PropTypes.func.isRequired,
+ setSeedPhraseBackedUp: PropTypes.func,
}
state = {
@@ -126,7 +127,7 @@ export default class ImportWithSeedPhrase extends PureComponent {
}
const { password, seedPhrase } = this.state
- const { history, onSubmit } = this.props
+ const { history, onSubmit, setSeedPhraseBackedUp } = this.props
try {
await onSubmit(password, this.parseSeedPhrase(seedPhrase))
@@ -137,7 +138,10 @@ export default class ImportWithSeedPhrase extends PureComponent {
name: 'Import Complete',
},
})
- history.push(INITIALIZE_END_OF_FLOW_ROUTE)
+
+ setSeedPhraseBackedUp(true).then(() => {
+ history.push(INITIALIZE_END_OF_FLOW_ROUTE)
+ })
} catch (error) {
this.setState({ seedPhraseError: error.message })
}
diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js
new file mode 100644
index 000000000..0cfeee1f4
--- /dev/null
+++ b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.container.js
@@ -0,0 +1,13 @@
+import { connect } from 'react-redux'
+import ImportWithSeedPhrase from './import-with-seed-phrase.component'
+import {
+ setSeedPhraseBackedUp,
+} from '../../../../store/actions'
+
+const mapDispatchToProps = dispatch => {
+ return {
+ setSeedPhraseBackedUp: (seedPhraseBackupState) => dispatch(setSeedPhraseBackedUp(seedPhraseBackupState)),
+ }
+}
+
+export default connect(null, mapDispatchToProps)(ImportWithSeedPhrase)
diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js
index e5ff1fde5..9d4ad7d0f 100644
--- a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js
+++ b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/index.js
@@ -1 +1 @@
-export { default } from './import-with-seed-phrase.component'
+export { default } from './import-with-seed-phrase.container'
diff --git a/ui/app/pages/first-time-flow/first-time-flow.component.js b/ui/app/pages/first-time-flow/first-time-flow.component.js
index 0d206bf42..df9631e15 100644
--- a/ui/app/pages/first-time-flow/first-time-flow.component.js
+++ b/ui/app/pages/first-time-flow/first-time-flow.component.js
@@ -30,6 +30,9 @@ export default class FirstTimeFlow extends PureComponent {
isUnlocked: PropTypes.bool,
unlockAccount: PropTypes.func,
nextRoute: PropTypes.string,
+ showingSeedPhraseBackupAfterOnboarding: PropTypes.bool,
+ seedPhraseBackedUp: PropTypes.bool,
+ verifySeedPhrase: PropTypes.func,
}
state = {
@@ -38,9 +41,16 @@ export default class FirstTimeFlow extends PureComponent {
}
componentDidMount () {
- const { completedOnboarding, history, isInitialized, isUnlocked } = this.props
+ const {
+ completedOnboarding,
+ history,
+ isInitialized,
+ isUnlocked,
+ showingSeedPhraseBackupAfterOnboarding,
+ seedPhraseBackedUp,
+ } = this.props
- if (completedOnboarding) {
+ if (completedOnboarding && (!showingSeedPhraseBackupAfterOnboarding || seedPhraseBackedUp)) {
history.push(DEFAULT_ROUTE)
return
}
@@ -88,6 +98,7 @@ export default class FirstTimeFlow extends PureComponent {
render () {
const { seedPhrase, isImportedKeyring } = this.state
+ const { verifySeedPhrase } = this.props
return (
<div className="first-time-flow">
@@ -98,6 +109,7 @@ export default class FirstTimeFlow extends PureComponent {
<SeedPhrase
{ ...props }
seedPhrase={seedPhrase}
+ verifySeedPhrase={verifySeedPhrase}
/>
)}
/>
diff --git a/ui/app/pages/first-time-flow/first-time-flow.container.js b/ui/app/pages/first-time-flow/first-time-flow.container.js
index 16025a489..76fd12bcd 100644
--- a/ui/app/pages/first-time-flow/first-time-flow.container.js
+++ b/ui/app/pages/first-time-flow/first-time-flow.container.js
@@ -5,16 +5,19 @@ import {
createNewVaultAndGetSeedPhrase,
createNewVaultAndRestore,
unlockAndGetSeedPhrase,
+ verifySeedPhrase,
} from '../../store/actions'
const mapStateToProps = state => {
- const { metamask: { completedOnboarding, isInitialized, isUnlocked } } = state
+ const { metamask: { completedOnboarding, isInitialized, isUnlocked, seedPhraseBackedUp }, appState: { showingSeedPhraseBackupAfterOnboarding } } = state
return {
completedOnboarding,
isInitialized,
isUnlocked,
nextRoute: getFirstTimeFlowTypeRoute(state),
+ showingSeedPhraseBackupAfterOnboarding,
+ seedPhraseBackedUp,
}
}
@@ -25,6 +28,7 @@ const mapDispatchToProps = dispatch => {
return dispatch(createNewVaultAndRestore(password, seedPhrase))
},
unlockAccount: password => dispatch(unlockAndGetSeedPhrase(password)),
+ verifySeedPhrase: () => verifySeedPhrase(),
}
}
diff --git a/ui/app/pages/first-time-flow/index.scss b/ui/app/pages/first-time-flow/index.scss
index 6c65cfdae..dec80cb60 100644
--- a/ui/app/pages/first-time-flow/index.scss
+++ b/ui/app/pages/first-time-flow/index.scss
@@ -26,6 +26,10 @@
.app-header__metafox-logo {
margin-bottom: 40px;
+
+ @media screen and (max-width: $break-small) {
+ margin-bottom: 0px;
+ }
}
}
diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js
index 4cfc38fdf..9256c3d8d 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.component.js
@@ -6,6 +6,7 @@ import Button from '../../../../components/ui/button'
import {
INITIALIZE_END_OF_FLOW_ROUTE,
INITIALIZE_SEED_PHRASE_ROUTE,
+ DEFAULT_ROUTE,
} from '../../../../helpers/constants/routes'
import { exportAsFile } from '../../../../helpers/utils/util'
import DraggableSeed from './draggable-seed.component'
@@ -88,7 +89,7 @@ export default class ConfirmSeedPhrase extends PureComponent {
}
handleSubmit = async () => {
- const { history } = this.props
+ const { history, setSeedPhraseBackedUp, showingSeedPhraseBackupAfterOnboarding, hideSeedPhraseBackupAfterOnboarding } = this.props
if (!this.isValid()) {
return
@@ -102,7 +103,15 @@ export default class ConfirmSeedPhrase extends PureComponent {
name: 'Verify Complete',
},
})
- history.push(INITIALIZE_END_OF_FLOW_ROUTE)
+
+ setSeedPhraseBackedUp(true).then(() => {
+ if (showingSeedPhraseBackupAfterOnboarding) {
+ hideSeedPhraseBackupAfterOnboarding()
+ history.push(DEFAULT_ROUTE)
+ } else {
+ history.push(INITIALIZE_END_OF_FLOW_ROUTE)
+ }
+ })
} catch (error) {
console.error(error.message)
}
diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js
new file mode 100644
index 000000000..ac5a26979
--- /dev/null
+++ b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/confirm-seed-phrase.container.js
@@ -0,0 +1,23 @@
+import { connect } from 'react-redux'
+import ConfirmSeedPhrase from './confirm-seed-phrase.component'
+import {
+ setSeedPhraseBackedUp,
+ hideSeedPhraseBackupAfterOnboarding,
+} from '../../../../store/actions'
+
+const mapStateToProps = state => {
+ const { appState: { showingSeedPhraseBackupAfterOnboarding } } = state
+
+ return {
+ showingSeedPhraseBackupAfterOnboarding,
+ }
+}
+
+const mapDispatchToProps = dispatch => {
+ return {
+ setSeedPhraseBackedUp: (seedPhraseBackupState) => dispatch(setSeedPhraseBackedUp(seedPhraseBackupState)),
+ hideSeedPhraseBackupAfterOnboarding: () => dispatch(hideSeedPhraseBackupAfterOnboarding()),
+ }
+}
+
+export default connect(mapStateToProps, mapDispatchToProps)(ConfirmSeedPhrase)
diff --git a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js
index c7b511503..beb53b383 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/confirm-seed-phrase/index.js
@@ -1 +1 @@
-export { default } from './confirm-seed-phrase.component'
+export { default } from './confirm-seed-phrase.container'
diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js
index 4a1b191b5..a528f95a2 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.js
@@ -1 +1 @@
-export { default } from './reveal-seed-phrase.component'
+export { default } from './reveal-seed-phrase.container'
diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss
index 8a47447ed..dfe9868cf 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss
+++ b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/index.scss
@@ -1,4 +1,12 @@
.reveal-seed-phrase {
+ @media screen and (max-width: 576px) {
+ display: flex;
+ flex-direction: column;
+ width: 96%;
+ margin-left: 2%;
+ margin-right: 2%;
+ }
+
&__secret {
position: relative;
display: flex;
@@ -54,4 +62,12 @@
button {
margin-top: 0xp;
}
+
+ &__buttons {
+ display: flex;
+
+ .first-time-flow__button:last-of-type {
+ margin-left: 20px;
+ }
+ }
}
diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js
index 4e9948a0e..78981bae8 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import classnames from 'classnames'
import LockIcon from '../../../../components/ui/lock-icon'
import Button from '../../../../components/ui/button'
-import { INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE } from '../../../../helpers/constants/routes'
+import { INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE, DEFAULT_ROUTE } from '../../../../helpers/constants/routes'
import { exportAsFile } from '../../../../helpers/utils/util'
export default class RevealSeedPhrase extends PureComponent {
@@ -15,6 +15,8 @@ export default class RevealSeedPhrase extends PureComponent {
static propTypes = {
history: PropTypes.object,
seedPhrase: PropTypes.string,
+ setSeedPhraseBackedUp: PropTypes.func,
+ setCompletedOnboarding: PropTypes.func,
}
state = {
@@ -45,6 +47,24 @@ export default class RevealSeedPhrase extends PureComponent {
history.push(INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE)
}
+ handleSkip = event => {
+ event.preventDefault()
+ const { history, setSeedPhraseBackedUp, setCompletedOnboarding } = this.props
+
+ this.context.metricsEvent({
+ eventOpts: {
+ category: 'Onboarding',
+ action: 'Seed Phrase Setup',
+ name: 'Remind me later',
+ },
+ })
+
+ Promise.all([setCompletedOnboarding(), setSeedPhraseBackedUp(false)])
+ .then(() => {
+ history.push(DEFAULT_ROUTE)
+ })
+ }
+
renderSecretWordsContainer () {
const { t } = this.context
const { seedPhrase } = this.props
@@ -129,14 +149,23 @@ export default class RevealSeedPhrase extends PureComponent {
</div>
</div>
</div>
- <Button
- type="primary"
- className="first-time-flow__button"
- onClick={this.handleNext}
- disabled={!isShowingSeedPhrase}
- >
- { t('next') }
- </Button>
+ <div className="reveal-seed-phrase__buttons">
+ <Button
+ type="secondary"
+ className="first-time-flow__button"
+ onClick={this.handleSkip}
+ >
+ { t('remindMeLater') }
+ </Button>
+ <Button
+ type="primary"
+ className="first-time-flow__button"
+ onClick={this.handleNext}
+ disabled={!isShowingSeedPhrase}
+ >
+ { t('next') }
+ </Button>
+ </div>
</div>
)
}
diff --git a/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js
new file mode 100644
index 000000000..7ada36afc
--- /dev/null
+++ b/ui/app/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.container.js
@@ -0,0 +1,15 @@
+import { connect } from 'react-redux'
+import RevealSeedPhrase from './reveal-seed-phrase.component'
+import {
+ setCompletedOnboarding,
+ setSeedPhraseBackedUp,
+} from '../../../../store/actions'
+
+const mapDispatchToProps = dispatch => {
+ return {
+ setSeedPhraseBackedUp: (seedPhraseBackupState) => dispatch(setSeedPhraseBackedUp(seedPhraseBackupState)),
+ setCompletedOnboarding: () => dispatch(setCompletedOnboarding()),
+ }
+}
+
+export default connect(null, mapDispatchToProps)(RevealSeedPhrase)
diff --git a/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js b/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js
index f4557115a..79cb27c52 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js
@@ -17,18 +17,31 @@ export default class SeedPhrase extends PureComponent {
address: PropTypes.string,
history: PropTypes.object,
seedPhrase: PropTypes.string,
+ verifySeedPhrase: PropTypes.func,
+ }
+
+ state = {
+ verifiedSeedPhrase: '',
}
componentDidMount () {
- const { seedPhrase, history } = this.props
+ const { seedPhrase, history, verifySeedPhrase } = this.props
if (!seedPhrase) {
- history.push(DEFAULT_ROUTE)
+ verifySeedPhrase()
+ .then(verifiedSeedPhrase => {
+ if (!verifiedSeedPhrase) {
+ history.push(DEFAULT_ROUTE)
+ } else {
+ this.setState({ verifiedSeedPhrase })
+ }
+ })
}
}
render () {
const { seedPhrase } = this.props
+ const { verifiedSeedPhrase } = this.state
return (
<DragDropContextProvider backend={HTML5Backend}>
@@ -41,7 +54,7 @@ export default class SeedPhrase extends PureComponent {
render={props => (
<ConfirmSeedPhrase
{ ...props }
- seedPhrase={seedPhrase}
+ seedPhrase={seedPhrase || verifiedSeedPhrase}
/>
)}
/>
@@ -51,7 +64,7 @@ export default class SeedPhrase extends PureComponent {
render={props => (
<RevealSeedPhrase
{ ...props }
- seedPhrase={seedPhrase}
+ seedPhrase={seedPhrase || verifiedSeedPhrase}
/>
)}
/>
diff --git a/ui/app/pages/first-time-flow/seed-phrase/tests/confirm-seed-phrase-component.test.js b/ui/app/pages/first-time-flow/seed-phrase/tests/confirm-seed-phrase-component.test.js
index 8339a6f6f..3d5f7f066 100644
--- a/ui/app/pages/first-time-flow/seed-phrase/tests/confirm-seed-phrase-component.test.js
+++ b/ui/app/pages/first-time-flow/seed-phrase/tests/confirm-seed-phrase-component.test.js
@@ -131,7 +131,7 @@ describe('ConfirmSeedPhrase Component', () => {
assert.deepEqual(root.state().pendingSeedIndices, [2, 0, 1])
})
- it('should submit correctly', () => {
+ it('should submit correctly', async () => {
const originalSeed = ['鼠', '牛', '虎', '兔', '龍', '蛇', '馬', '羊', '猴', '雞', '狗', '豬']
const metricsEventSpy = sinon.spy()
const pushSpy = sinon.spy()
@@ -139,6 +139,7 @@ describe('ConfirmSeedPhrase Component', () => {
{
seedPhrase: '鼠 牛 虎 兔 龍 蛇 馬 羊 猴 雞 狗 豬',
history: { push: pushSpy },
+ setSeedPhraseBackedUp: () => Promise.resolve(),
},
{
metricsEvent: metricsEventSpy,
@@ -157,6 +158,9 @@ describe('ConfirmSeedPhrase Component', () => {
root.update()
root.find('.first-time-flow__button').simulate('click')
+
+ await (new Promise(resolve => setTimeout(resolve, 100)))
+
assert.deepEqual(metricsEventSpy.args[0][0], {
eventOpts: {
category: 'Onboarding',
diff --git a/ui/app/pages/home/home.component.js b/ui/app/pages/home/home.component.js
index 1fd12a359..e59106537 100644
--- a/ui/app/pages/home/home.component.js
+++ b/ui/app/pages/home/home.component.js
@@ -6,6 +6,7 @@ import HomeNotification from '../../components/app/home-notification'
import WalletView from '../../components/app/wallet-view'
import TransactionView from '../../components/app/transaction-view'
import ProviderApproval from '../provider-approval'
+import BackupNotification from '../../components/app/backup-notification'
import {
RESTORE_VAULT_ROUTE,
@@ -38,6 +39,7 @@ export default class Home extends PureComponent {
unsetMigratedPrivacyMode: PropTypes.func,
viewingUnconnectedDapp: PropTypes.bool.isRequired,
forceApproveProviderRequestByOrigin: PropTypes.func,
+ shouldShowSeedPhraseReminder: PropTypes.bool,
}
componentWillMount () {
@@ -74,6 +76,7 @@ export default class Home extends PureComponent {
unsetMigratedPrivacyMode,
viewingUnconnectedDapp,
forceApproveProviderRequestByOrigin,
+ shouldShowSeedPhraseReminder,
} = this.props
if (forgottenPassword) {
@@ -85,7 +88,6 @@ export default class Home extends PureComponent {
<ProviderApproval providerRequest={providerRequests[0]} />
)
}
-
return (
<div className="main-container">
<div className="account-and-transaction-details">
@@ -124,6 +126,11 @@ export default class Home extends PureComponent {
)
: null
}
+ {
+ shouldShowSeedPhraseReminder
+ ? (<BackupNotification />)
+ : null
+ }
</TransactionView>
)
: null }
diff --git a/ui/app/pages/home/home.container.js b/ui/app/pages/home/home.container.js
index 81a3946c5..4195fbe79 100644
--- a/ui/app/pages/home/home.container.js
+++ b/ui/app/pages/home/home.container.js
@@ -3,6 +3,7 @@ import { compose } from 'recompose'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { unconfirmedTransactionsCountSelector } from '../../selectors/confirm-transaction'
+import { getCurrentEthBalance } from '../../selectors/selectors'
import {
forceApproveProviderRequestByOrigin,
unsetMigratedPrivacyMode,
@@ -21,7 +22,9 @@ const mapStateToProps = state => {
featureFlags: {
privacyMode,
} = {},
+ seedPhraseBackedUp,
} = metamask
+ const accountBalance = getCurrentEthBalance(state)
const { forgottenPassword } = appState
const isUnconnected = Boolean(activeTab && privacyMode && !approvedOrigins[activeTab.origin])
@@ -36,6 +39,7 @@ const mapStateToProps = state => {
showPrivacyModeNotification: migratedPrivacyMode,
activeTab,
viewingUnconnectedDapp: isUnconnected && isPopup,
+ shouldShowSeedPhraseReminder: parseInt(accountBalance, 16) > 0 && !seedPhraseBackedUp,
}
}
diff --git a/ui/app/pages/settings/networks-tab/networks-tab.component.js b/ui/app/pages/settings/networks-tab/networks-tab.component.js
index a44872843..40e1a902f 100644
--- a/ui/app/pages/settings/networks-tab/networks-tab.component.js
+++ b/ui/app/pages/settings/networks-tab/networks-tab.component.js
@@ -126,6 +126,7 @@ export default class NetworksTab extends PureComponent {
renderNetworksList () {
const { networksToRender, selectedNetwork, networkIsSelected, networksTabIsInAddMode, networkDefaultedToProvider } = this.props
+
return (
<div
className={classnames('networks-tab__networks-list', {
diff --git a/ui/app/store/actions.js b/ui/app/store/actions.js
index 726deb59d..9d8c7c6b2 100644
--- a/ui/app/store/actions.js
+++ b/ui/app/store/actions.js
@@ -375,6 +375,15 @@ var actions = {
LOADING_TOKEN_PARAMS_STARTED: 'LOADING_TOKEN_PARAMS_STARTED',
loadingTokenParamsFinished,
LOADING_TOKEN_PARAMS_FINISHED: 'LOADING_TOKEN_PARAMS_FINISHED',
+
+ setSeedPhraseBackedUp,
+ showSeedPhraseBackupAfterOnboarding,
+ SHOW_SEED_PHRASE_BACKUP_AFTER_ONBOARDING: 'SHOW_SEED_PHRASE_BACKUP_AFTER_ONBOARDING',
+ hideSeedPhraseBackupAfterOnboarding,
+ HIDE_SEED_PHRASE_BACKUP_AFTER_ONBOARDING: 'HIDE_SEED_PHRASE_BACKUP_AFTER_ONBOARDING',
+
+ verifySeedPhrase,
+ SET_SEED_PHRASE_BACKED_UP_TO_TRUE: 'SET_SEED_PHRASE_BACKED_UP_TO_TRUE',
}
module.exports = actions
@@ -2772,3 +2781,30 @@ function unsetMigratedPrivacyMode () {
background.unsetMigratedPrivacyMode()
}
}
+
+function setSeedPhraseBackedUp (seedPhraseBackupState) {
+ return (dispatch) => {
+ log.debug(`background.setSeedPhraseBackedUp`)
+ return new Promise((resolve, reject) => {
+ background.setSeedPhraseBackedUp(seedPhraseBackupState, (err) => {
+ if (err) {
+ dispatch(actions.displayWarning(err.message))
+ return reject(err)
+ }
+ return forceUpdateMetamaskState(dispatch).then(() => resolve())
+ })
+ })
+ }
+}
+
+function showSeedPhraseBackupAfterOnboarding () {
+ return {
+ type: actions.SHOW_SEED_PHRASE_BACKUP_AFTER_ONBOARDING,
+ }
+}
+
+function hideSeedPhraseBackupAfterOnboarding () {
+ return {
+ type: actions.HIDE_SEED_PHRASE_BACKUP_AFTER_ONBOARDING,
+ }
+}