diff --git a/src/staking-v3/components/RegisterBanner.vue b/src/staking-v3/components/RegisterBanner.vue
index 00333de44..179785e81 100644
--- a/src/staking-v3/components/RegisterBanner.vue
+++ b/src/staking-v3/components/RegisterBanner.vue
@@ -4,6 +4,7 @@
:to="networkParam + Path.DappStaking + Path.Register"
class="wrapper--register-banner"
:style="{ backgroundImage: `url(${require('src/staking-v3/assets/register_bg.webp')})` }"
+ data-testid="register-dapp-banner"
>
🎉 {{ `${$t('stakingV3.congrats')}` }}
diff --git a/tests/assets-transactions-evm.spec.ts b/tests/assets-transactions-evm.spec.ts
deleted file mode 100644
index 4a9506793..000000000
--- a/tests/assets-transactions-evm.spec.ts
+++ /dev/null
@@ -1,121 +0,0 @@
-import { clickDisclaimerButton } from 'src/modules/playwright';
-import { BrowserContext, Page, expect } from '@playwright/test';
-import { test } from './fixtures';
-import {
- ALICE_ACCOUNT_NAME,
- ALICE_ACCOUNT_SEED,
- ALICE_ADDRESS,
- ALICE_EVM_ADDRESS,
- BOB_ACCOUNT_NAME,
- BOB_ACCOUNT_SEED,
- BOB_ADDRESS,
- closePolkadotWelcomePopup,
- connectToNetwork,
- createAccount,
- createMetamaskAccount,
- selectAccount,
- signInMetamask,
- signTransaction,
- connectWithEVM,
- changeNetworkOnEVM,
-} from './common';
-import { ApiPromise } from '@polkadot/api';
-import { chainDecimals, getApi, getBalance } from './common-api';
-
-let api: ApiPromise;
-test.beforeAll(async () => {
- api = await getApi();
-});
-
-test.afterAll(async () => {
- await api.disconnect();
-});
-
-test.beforeEach(async ({ page, context }: { page: Page; context: BrowserContext }) => {
- await page.goto('/astar/assets');
- await clickDisclaimerButton(page);
- const walletTab = page.getByTestId('select-wallet-tab');
- await walletTab.click();
-
- await closePolkadotWelcomePopup(context);
- await createAccount(page, ALICE_ACCOUNT_SEED, ALICE_ACCOUNT_NAME);
- await createAccount(page, BOB_ACCOUNT_SEED, BOB_ACCOUNT_NAME);
- await createMetamaskAccount(
- page,
- 'bottom drive obey lake curtain smoke basket hold race lonely fit walk',
- 'Test'
- );
- await page.goto('/astar/assets');
- await connectToNetwork(page);
- await selectAccount(page, ALICE_ACCOUNT_NAME);
-});
-
-test.describe('account panel', () => {
- // Test case: AS002
- test('should transfer tokens from Alice to Bob on EVM account', async ({
- page,
- context,
- }: {
- page: Page;
- context: BrowserContext;
- }) => {
- // transfer test (from native to evm) :: need to testing
- page.getByTestId('transfer-link-button').click();
- const faucetAmount = BigInt(200);
- await page.getByPlaceholder('Destination Address').fill(ALICE_EVM_ADDRESS);
- await page.getByPlaceholder('0.0').fill(faucetAmount.toString());
- await page.locator('.box--warning label').check();
- await page.getByRole('button', { name: 'Confirm' }).click();
- await signTransaction(context);
- await page.waitForSelector('.four', { state: 'hidden' });
- await expect(page.getByText('Success')).toBeVisible();
-
- //metamask setup
- await page.locator('.btn--account').click();
- await page.locator('.wrapper--modal-drawer .modal-close').first().click();
- await page.getByText('MetaMask').click();
- await signInMetamask(page, context);
-
- //transfer test (from evm to native)
- await page.goto('/custom-node/assets/transfer?token=astr&mode=local');
- await page.locator('.btn--connect').click();
- await page.getByText('MetaMask').click();
- const metamaskWindow = await connectWithEVM(page, context);
- await changeNetworkOnEVM(page, context, metamaskWindow);
- await page.waitForSelector('.modal-close', { state: 'hidden' });
- await expect(page.getByText('Select a Wallet')).toBeHidden();
-
- const baseTransferAmount = BigInt(10);
- //BOB_ADDRESS > ALICE_EVM_ADDRESS
- const bobBalanceBeforeTransaction = await getBalance(BOB_ADDRESS);
- const overTransferAmount = bobBalanceBeforeTransaction + baseTransferAmount;
- await page.getByPlaceholder('Destination Address').fill(BOB_ADDRESS);
- await page.getByPlaceholder('0.0').fill(overTransferAmount.toString());
- await expect(page.getByText('the funds will likely be lost')).toBeVisible();
- await expect(page.getByText('Insufficient')).toBeVisible();
-
- // Invalid destination address
- await page.getByPlaceholder('Destination Address').fill('invalid address');
- await page.getByPlaceholder('0.0').fill('0');
- await expect(page.getByText('Inputted invalid destination address')).toBeVisible();
-
- // transfer alice_evm to native
- await page.getByPlaceholder('Destination Address').fill(BOB_ADDRESS);
- await page.getByPlaceholder('0.0').fill(baseTransferAmount.toString());
- await page.locator('.box--warning label').check();
- await expect(page.getByRole('button', { name: 'Confirm' })).toBeDisabled();
-
- // MEMO: There's an issue where the balance between from and to of metamask is different, so this should be solved in another PR.
- // await page.getByRole('button', { name: 'Confirm' }).click();
-
- // send transaction
- // await signTransaction(context);
- // await page.waitForSelector('.four', { state: 'hidden' });
-
- // await expect(page.getByText('Success')).toBeVisible();
- // const bobBalanceAfterTransaction = await getBalance(BOB_ADDRESS);
- // expect(bobBalanceAfterTransaction - bobBalanceBeforeTransaction).toEqual(
- // transferAmount * BigInt(Math.pow(10, chainDecimals))
- // );
- });
-});
diff --git a/tests/chopsticks/assethub.yml b/tests/chopsticks/assethub.yml
new file mode 100644
index 000000000..7b20dd0d0
--- /dev/null
+++ b/tests/chopsticks/assethub.yml
@@ -0,0 +1,29 @@
+endpoint: wss://asset-hub-polkadot-rpc.dwellir.com
+mock-signature-host: true
+block: ${env.ASSETHUB_BLOCK_NUMBER}
+db: ./db.sqlite
+port: 9956
+# wasm-override: acala-2150.wasm
+
+import-storage:
+ System:
+ Account:
+ - - - 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
+ - providers: 1
+ data:
+ free: 1000000000000000
+ - - - 246gNkjCexYRsCpdjtVhz35sHjcb21jpqipzT9u4uwKV8iEE
+ - data:
+ free: 1000000000000000
+ - - - 249LSvsEyxS4VpEJGg62yhYA7sHy1KcgGW6KzACBCLW1RsZF
+ - data:
+ free: 1000000000000000
+ - - - 21y4X7QDByUjnu5KX9W1H5TbG2wTLPDbhYFHqc4v6Q1nTBnu
+ - data:
+ free: 1000000000000000
+ - - - 265dERKLvMFwWWvtGNUjQBrHFTT88VcEtb5QYh2Zuj79UGMf
+ - data:
+ free: 1000000000000000
+ - - - 21XH88Kd5vDLkrZMb4D2eYJAB9yKbycfkYBqAaD1wQQi1uJ8
+ - data:
+ free: 1000000000000000
diff --git a/tests/chopsticks/moonbeam.yml b/tests/chopsticks/moonbeam.yml
index cd80a9107..865479342 100644
--- a/tests/chopsticks/moonbeam.yml
+++ b/tests/chopsticks/moonbeam.yml
@@ -12,10 +12,6 @@ import-storage:
- providers: 1
data:
free: '100000000000000000000000'
- TechCommitteeCollective:
- Members: ['0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac']
- CouncilCollective:
- Members: ['0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac']
TreasuryCouncilCollective:
Members: ['0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac']
AuthorFilter:
diff --git a/tests/chopsticks/setup-preconditions-api.js b/tests/chopsticks/setup-preconditions-api.js
index aae3190f6..924eff1b1 100644
--- a/tests/chopsticks/setup-preconditions-api.js
+++ b/tests/chopsticks/setup-preconditions-api.js
@@ -27,8 +27,8 @@ async function run(nodeName, networkInfo, args) {
// register dApp
console.info('Registering dApps with sender: ', sender.address);
- const tx4 = api.tx.dappsStaking.register(sender.address, { Evm: TEST_DAPP_ADDRESS });
- const tx5 = api.tx.dappsStaking.register(bob.address, { Evm: TEST_DAPP_ADDRESS_2 });
+ const tx4 = api.tx.dappStaking.register(sender.address, { Evm: TEST_DAPP_ADDRESS });
+ const tx5 = api.tx.dappStaking.register(bob.address, { Evm: TEST_DAPP_ADDRESS_2 });
await sendTransaction(api.tx.sudo.sudo(tx4), sender);
await sendTransaction(api.tx.sudo.sudo(tx5), sender);
diff --git a/tests/chopsticks/start-chopsticks.js b/tests/chopsticks/start-chopsticks.js
index 6881e7f77..83547389c 100644
--- a/tests/chopsticks/start-chopsticks.js
+++ b/tests/chopsticks/start-chopsticks.js
@@ -27,8 +27,11 @@ const spawnDetached = (cmd) => {
// Execute the run function with the given parameters
async function executeRun() {
try {
+ // const childProcess = spawnDetached(
+ // 'npx @acala-network/chopsticks@latest xcm -p=tests/chopsticks/astar.yml -p=tests/chopsticks/moonbeam.yml -p=tests/chopsticks/acala.yml -p=tests/chopsticks/interlay.yml -p=tests/chopsticks/bifrost.yml -r=tests/chopsticks/polkadot.yml'
+ // );
const childProcess = spawnDetached(
- 'npx @acala-network/chopsticks@latest xcm -p=tests/chopsticks/astar.yml -p=tests/chopsticks/moonbeam.yml -p=tests/chopsticks/acala.yml -p=tests/chopsticks/interlay.yml -p=tests/chopsticks/bifrost.yml -r=tests/chopsticks/polkadot.yml'
+ 'npx @acala-network/chopsticks@latest xcm -p=tests/chopsticks/astar.yml -p=tests/chopsticks/acala.yml -p=tests/chopsticks/assethub.yml -r=tests/chopsticks/polkadot.yml'
);
console.info('Chopsticks started with pid:', childProcess.pid);
diff --git a/tests/chopsticks/start-playwright.js b/tests/chopsticks/start-playwright.js
index 73418ec12..7f7615514 100644
--- a/tests/chopsticks/start-playwright.js
+++ b/tests/chopsticks/start-playwright.js
@@ -1,3 +1,5 @@
+const core = require('@actions/core');
+
/* eslint-disable @typescript-eslint/no-var-requires */
const spawn = (cmd) =>
new Promise((resolve, reject) => {
@@ -6,7 +8,7 @@ const spawn = (cmd) =>
const stdout = [];
cp.stdout.on('data', (data) => {
stdout.push(data.toString());
- console.info(data.toString())
+ console.info(data.toString());
if (data.toString().includes('Ctrl+C')) {
cp.kill(9);
@@ -32,16 +34,26 @@ async function run(nodeName, networkInfo, args) {
console.info('endpoint :', endpoint);
let result = await spawn('npx playwright install --with-deps');
+
+ // Print playwright version
+ await spawn('npx playwright --version');
+
+ // Start tests
result = await spawn(
`BASE_URL=\'${args[0]}\' ENDPOINT=\'${endpoint}\' HEADLESS='true' CI='true' npx playwright test tests/test_specs --project=chromium`
);
// MEMO: for debugging specific test case
// result = await spawn(
- // `BASE_URL=\'${args[0]}\' ENDPOINT=\'${endpoint}\' npx playwright test tests/assets-transactions-evm.spec.ts --project=chromium --debug`
+ // `BASE_URL=\'${args[0]}\' ENDPOINT=\'${endpoint}\' HEADLESS='true' npx playwright test test_specs/assets-transactions.spec.ts --project=chromium`
// );
- return result?.includes('failed') ? 0 : 1;
+ const runResult = result?.includes('failed') || result?.includes('flaky') ? 1 : 0;
+ if (runResult !== 0) {
+ core.setFailed('One or more playwright tests failed.');
+ }
+
+ return runResult;
}
module.exports = { run };
diff --git a/tests/chopsticks/tx-utils.mjs b/tests/chopsticks/tx-utils.mjs
index f49fa1735..5aff6967f 100644
--- a/tests/chopsticks/tx-utils.mjs
+++ b/tests/chopsticks/tx-utils.mjs
@@ -13,7 +13,6 @@ export async function sendTransaction(transaction, sender) {
unsubscribe();
}
- clearTimeout(timeout);
resolve(true);
}
})
@@ -24,9 +23,5 @@ export async function sendTransaction(transaction, sender) {
console.error(error);
reject(error);
});
-
- timeout = setTimeout(() => {
- reject(new Error('Transaction timeout'));
- }, SPAWNING_TIME);
});
}
diff --git a/tests/common.ts b/tests/common.ts
index cf9e70086..242bde1e3 100644
--- a/tests/common.ts
+++ b/tests/common.ts
@@ -36,10 +36,20 @@ export const connectToNetwork = async (page: Page): Promise
=> {
await page.waitForNavigation();
};
-export const selectAccount = async (page: Page, accountName: string): Promise => {
+export const selectAccount = async (
+ page: Page,
+ accountName: string,
+ context: BrowserContext
+): Promise => {
const walletTab = page.getByTestId('select-wallet-tab');
await walletTab.click();
await page.getByTestId('Polkadot.js').click();
+
+ // Account selection popup
+ const extensionWindow = await getWindow('polkadot{.js}', context);
+ await extensionWindow.locator('label').filter({ hasText: 'Select all' }).locator('span').click();
+ await extensionWindow.getByRole('button', { name: 'Connect 2 account(s)' }).click();
+
await page.getByText(`${accountName} (extension)`).click();
await page.getByRole('button', { name: 'Connect', exact: true }).click();
};
@@ -90,7 +100,7 @@ export const closePolkadotWelcomePopup = async (context: BrowserContext): Promis
const extensionWindow = await getWindow('polkadot{.js}', context);
const extensionAcceptButton = extensionWindow.getByText('Understood, let me continue');
await extensionAcceptButton.click();
- const extensionAcceptButton2 = extensionWindow.getByText('Yes, allow this application access');
+ const extensionAcceptButton2 = extensionWindow.getByText('Understood');
await extensionAcceptButton2.click();
};
@@ -143,15 +153,22 @@ export const signInMetamask = async (page: Page, context: BrowserContext): Promi
export const connectWithEVM = async (page: Page, context: BrowserContext): Promise => {
const extensionWindow = await getWindow('MetaMask Notification', context);
- await extensionWindow.waitForLoadState('load');
- await extensionWindow.waitForSelector('.permissions-connect-header__title', { state: 'visible' });
-
- await extensionWindow
- .locator('.permissions-connect-choose-account__bottom-buttons')
- .getByRole('button', { name: 'Next' })
- .click();
+ // connect account
+ // await extensionWindow.locator('button btn--rounded btn-primary').click();
+ await extensionWindow.getByRole('button', { name: 'Next' }).click();
await extensionWindow.locator('data-testid=page-container-footer-next').click();
+ // ----------------------------
+
+ // await extensionWindow.waitForLoadState('load');
+ // await extensionWindow.waitForSelector('.permissions-connect-header__title', { state: 'visible' });
+
+ // await extensionWindow
+ // .locator('.permissions-connect-choose-account__bottom-buttons')
+ // .getByRole('button', { name: 'Next' })
+ // .click();
+
+ // await extensionWindow.locator('data-testid=page-container-footer-next').click();
return extensionWindow;
};
diff --git a/tests/main.spec.ts b/tests/main.spec.ts
index 50ac00957..f64d1d46c 100644
--- a/tests/main.spec.ts
+++ b/tests/main.spec.ts
@@ -1,11 +1,11 @@
import { test, expect } from '@playwright/test';
import { checkPolicyInLocalStorage } from 'src/modules/playwright';
-test.beforeEach(async ({ page }) => {
- await page.goto('/');
-});
-
test.describe('init screen', () => {
+ test.beforeEach(async ({ page }) => {
+ await page.goto('/');
+ });
+
test('should disclaimer is opened unless agreed', async ({ page }) => {
await checkPolicyInLocalStorage(page);
diff --git a/tests/polkadot_wallet/background.js b/tests/polkadot_wallet/background.js
index c4ec83b34..552915058 100644
--- a/tests/polkadot_wallet/background.js
+++ b/tests/polkadot_wallet/background.js
@@ -1,2 +1,2 @@
/*! For license information please see background.js.LICENSE.txt */
-(()=>{var __webpack_modules__={464:(e,t,n)=>{!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function y(e,t,n,r,i){var s,a=0;for(s=0;s>>8)-1}function m(e,t,n,r){return y(e,t,n,r,16)}function g(e,t,n,r){return y(e,t,n,r,32)}function b(e,t,n,r){!function(e,t,n,r){for(var i,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,x=s,S=a,P=o,T=c,k=u,M=l,A=h,V=d,N=p,E=f,I=y,H=m,O=g,C=b,L=v,U=w,B=0;B<20;B+=2)x^=(i=(O^=(i=(N^=(i=(k^=(i=x+O|0)<<7|i>>>25)+x|0)<<9|i>>>23)+k|0)<<13|i>>>19)+N|0)<<18|i>>>14,M^=(i=(S^=(i=(C^=(i=(E^=(i=M+S|0)<<7|i>>>25)+M|0)<<9|i>>>23)+E|0)<<13|i>>>19)+C|0)<<18|i>>>14,I^=(i=(A^=(i=(P^=(i=(L^=(i=I+A|0)<<7|i>>>25)+I|0)<<9|i>>>23)+L|0)<<13|i>>>19)+P|0)<<18|i>>>14,U^=(i=(H^=(i=(V^=(i=(T^=(i=U+H|0)<<7|i>>>25)+U|0)<<9|i>>>23)+T|0)<<13|i>>>19)+V|0)<<18|i>>>14,x^=(i=(T^=(i=(P^=(i=(S^=(i=x+T|0)<<7|i>>>25)+x|0)<<9|i>>>23)+S|0)<<13|i>>>19)+P|0)<<18|i>>>14,M^=(i=(k^=(i=(V^=(i=(A^=(i=M+k|0)<<7|i>>>25)+M|0)<<9|i>>>23)+A|0)<<13|i>>>19)+V|0)<<18|i>>>14,I^=(i=(E^=(i=(N^=(i=(H^=(i=I+E|0)<<7|i>>>25)+I|0)<<9|i>>>23)+H|0)<<13|i>>>19)+N|0)<<18|i>>>14,U^=(i=(L^=(i=(C^=(i=(O^=(i=U+L|0)<<7|i>>>25)+U|0)<<9|i>>>23)+O|0)<<13|i>>>19)+C|0)<<18|i>>>14;x=x+s|0,S=S+a|0,P=P+o|0,T=T+c|0,k=k+u|0,M=M+l|0,A=A+h|0,V=V+d|0,N=N+p|0,E=E+f|0,I=I+y|0,H=H+m|0,O=O+g|0,C=C+b|0,L=L+v|0,U=U+w|0,e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=S>>>0&255,e[5]=S>>>8&255,e[6]=S>>>16&255,e[7]=S>>>24&255,e[8]=P>>>0&255,e[9]=P>>>8&255,e[10]=P>>>16&255,e[11]=P>>>24&255,e[12]=T>>>0&255,e[13]=T>>>8&255,e[14]=T>>>16&255,e[15]=T>>>24&255,e[16]=k>>>0&255,e[17]=k>>>8&255,e[18]=k>>>16&255,e[19]=k>>>24&255,e[20]=M>>>0&255,e[21]=M>>>8&255,e[22]=M>>>16&255,e[23]=M>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=V>>>0&255,e[29]=V>>>8&255,e[30]=V>>>16&255,e[31]=V>>>24&255,e[32]=N>>>0&255,e[33]=N>>>8&255,e[34]=N>>>16&255,e[35]=N>>>24&255,e[36]=E>>>0&255,e[37]=E>>>8&255,e[38]=E>>>16&255,e[39]=E>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=H>>>0&255,e[45]=H>>>8&255,e[46]=H>>>16&255,e[47]=H>>>24&255,e[48]=O>>>0&255,e[49]=O>>>8&255,e[50]=O>>>16&255,e[51]=O>>>24&255,e[52]=C>>>0&255,e[53]=C>>>8&255,e[54]=C>>>16&255,e[55]=C>>>24&255,e[56]=L>>>0&255,e[57]=L>>>8&255,e[58]=L>>>16&255,e[59]=L>>>24&255,e[60]=U>>>0&255,e[61]=U>>>8&255,e[62]=U>>>16&255,e[63]=U>>>24&255}(e,t,n,r)}function v(e,t,n,r){!function(e,t,n,r){for(var i,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,x=0;x<20;x+=2)s^=(i=(g^=(i=(p^=(i=(u^=(i=s+g|0)<<7|i>>>25)+s|0)<<9|i>>>23)+u|0)<<13|i>>>19)+p|0)<<18|i>>>14,l^=(i=(a^=(i=(b^=(i=(f^=(i=l+a|0)<<7|i>>>25)+l|0)<<9|i>>>23)+f|0)<<13|i>>>19)+b|0)<<18|i>>>14,y^=(i=(h^=(i=(o^=(i=(v^=(i=y+h|0)<<7|i>>>25)+y|0)<<9|i>>>23)+v|0)<<13|i>>>19)+o|0)<<18|i>>>14,w^=(i=(m^=(i=(d^=(i=(c^=(i=w+m|0)<<7|i>>>25)+w|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,s^=(i=(c^=(i=(o^=(i=(a^=(i=s+c|0)<<7|i>>>25)+s|0)<<9|i>>>23)+a|0)<<13|i>>>19)+o|0)<<18|i>>>14,l^=(i=(u^=(i=(d^=(i=(h^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+h|0)<<13|i>>>19)+d|0)<<18|i>>>14,y^=(i=(f^=(i=(p^=(i=(m^=(i=y+f|0)<<7|i>>>25)+y|0)<<9|i>>>23)+m|0)<<13|i>>>19)+p|0)<<18|i>>>14,w^=(i=(v^=(i=(b^=(i=(g^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+g|0)<<13|i>>>19)+b|0)<<18|i>>>14;e[0]=s>>>0&255,e[1]=s>>>8&255,e[2]=s>>>16&255,e[3]=s>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=h>>>0&255,e[17]=h>>>8&255,e[18]=h>>>16&255,e[19]=h>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=f>>>0&255,e[29]=f>>>8&255,e[30]=f>>>16&255,e[31]=f>>>24&255}(e,t,n,r)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function x(e,t,n,r,i,s,a){var o,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=s[c];for(;i>=64;){for(b(l,u,a,w),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(o=1,c=8;c<16;c++)o=o+(255&u[c])|0,u[c]=255&o,o>>>=8;i-=64,t+=64,r+=64}if(i>0)for(b(l,u,a,w),c=0;c=64;){for(b(c,o,i,w),a=0;a<64;a++)e[t+a]=c[a];for(s=1,a=8;a<16;a++)s=s+(255&o[a])|0,o[a]=255&s,s>>>=8;n-=64,t+=64}if(n>0)for(b(c,o,i,w),a=0;a>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|i<<9),s=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|s<<12),this.r[5]=s>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(s>>>14|a<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|o<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function M(e,t,n,r,i,s){var a=new k(s);return a.update(n,r,i),a.finish(e,t),0}function A(e,t,n,r,i,s){var a=new Uint8Array(16);return M(a,0,n,r,i,s),m(e,t,a,0)}function V(e,t,n,r,i){var s;if(n<32)return-1;for(T(e,0,t,0,n,r,i),M(e,16,e,32,n-32,e),s=0;s<16;s++)e[s]=0;return 0}function N(e,t,n,r,i){var s,a=new Uint8Array(32);if(n<32)return-1;if(P(a,0,32,r,i),0!==A(t,16,t,32,n-32,a))return-1;for(T(e,0,t,0,n,r,i),s=0;s<32;s++)e[s]=0;return 0}function E(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function I(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function H(e,t,n){for(var r,i=~(n-1),s=0;s<16;s++)r=i&(e[s]^t[s]),e[s]^=r,t[s]^=r}function O(e,n){var r,i,s,a=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(I(o),I(o),I(o),i=0;i<2;i++){for(a[0]=o[0]-65517,r=1;r<15;r++)a[r]=o[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=o[15]-32767-(a[14]>>16&1),s=a[15]>>16&1,a[14]&=65535,H(o,a,1-s)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function C(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return O(n,e),O(r,t),g(n,0,r,0)}function L(e){var t=new Uint8Array(32);return O(t,e),1&t[0]}function U(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function z(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function R(e,t,n){var r,i,s=0,a=0,o=0,c=0,u=0,l=0,h=0,d=0,p=0,f=0,y=0,m=0,g=0,b=0,v=0,w=0,x=0,S=0,P=0,T=0,k=0,M=0,A=0,V=0,N=0,E=0,I=0,H=0,O=0,C=0,L=0,U=n[0],B=n[1],z=n[2],R=n[3],j=n[4],D=n[5],X=n[6],F=n[7],q=n[8],W=n[9],Z=n[10],K=n[11],G=n[12],Y=n[13],J=n[14],Q=n[15];s+=(r=t[0])*U,a+=r*B,o+=r*z,c+=r*R,u+=r*j,l+=r*D,h+=r*X,d+=r*F,p+=r*q,f+=r*W,y+=r*Z,m+=r*K,g+=r*G,b+=r*Y,v+=r*J,w+=r*Q,a+=(r=t[1])*U,o+=r*B,c+=r*z,u+=r*R,l+=r*j,h+=r*D,d+=r*X,p+=r*F,f+=r*q,y+=r*W,m+=r*Z,g+=r*K,b+=r*G,v+=r*Y,w+=r*J,x+=r*Q,o+=(r=t[2])*U,c+=r*B,u+=r*z,l+=r*R,h+=r*j,d+=r*D,p+=r*X,f+=r*F,y+=r*q,m+=r*W,g+=r*Z,b+=r*K,v+=r*G,w+=r*Y,x+=r*J,S+=r*Q,c+=(r=t[3])*U,u+=r*B,l+=r*z,h+=r*R,d+=r*j,p+=r*D,f+=r*X,y+=r*F,m+=r*q,g+=r*W,b+=r*Z,v+=r*K,w+=r*G,x+=r*Y,S+=r*J,P+=r*Q,u+=(r=t[4])*U,l+=r*B,h+=r*z,d+=r*R,p+=r*j,f+=r*D,y+=r*X,m+=r*F,g+=r*q,b+=r*W,v+=r*Z,w+=r*K,x+=r*G,S+=r*Y,P+=r*J,T+=r*Q,l+=(r=t[5])*U,h+=r*B,d+=r*z,p+=r*R,f+=r*j,y+=r*D,m+=r*X,g+=r*F,b+=r*q,v+=r*W,w+=r*Z,x+=r*K,S+=r*G,P+=r*Y,T+=r*J,k+=r*Q,h+=(r=t[6])*U,d+=r*B,p+=r*z,f+=r*R,y+=r*j,m+=r*D,g+=r*X,b+=r*F,v+=r*q,w+=r*W,x+=r*Z,S+=r*K,P+=r*G,T+=r*Y,k+=r*J,M+=r*Q,d+=(r=t[7])*U,p+=r*B,f+=r*z,y+=r*R,m+=r*j,g+=r*D,b+=r*X,v+=r*F,w+=r*q,x+=r*W,S+=r*Z,P+=r*K,T+=r*G,k+=r*Y,M+=r*J,A+=r*Q,p+=(r=t[8])*U,f+=r*B,y+=r*z,m+=r*R,g+=r*j,b+=r*D,v+=r*X,w+=r*F,x+=r*q,S+=r*W,P+=r*Z,T+=r*K,k+=r*G,M+=r*Y,A+=r*J,V+=r*Q,f+=(r=t[9])*U,y+=r*B,m+=r*z,g+=r*R,b+=r*j,v+=r*D,w+=r*X,x+=r*F,S+=r*q,P+=r*W,T+=r*Z,k+=r*K,M+=r*G,A+=r*Y,V+=r*J,N+=r*Q,y+=(r=t[10])*U,m+=r*B,g+=r*z,b+=r*R,v+=r*j,w+=r*D,x+=r*X,S+=r*F,P+=r*q,T+=r*W,k+=r*Z,M+=r*K,A+=r*G,V+=r*Y,N+=r*J,E+=r*Q,m+=(r=t[11])*U,g+=r*B,b+=r*z,v+=r*R,w+=r*j,x+=r*D,S+=r*X,P+=r*F,T+=r*q,k+=r*W,M+=r*Z,A+=r*K,V+=r*G,N+=r*Y,E+=r*J,I+=r*Q,g+=(r=t[12])*U,b+=r*B,v+=r*z,w+=r*R,x+=r*j,S+=r*D,P+=r*X,T+=r*F,k+=r*q,M+=r*W,A+=r*Z,V+=r*K,N+=r*G,E+=r*Y,I+=r*J,H+=r*Q,b+=(r=t[13])*U,v+=r*B,w+=r*z,x+=r*R,S+=r*j,P+=r*D,T+=r*X,k+=r*F,M+=r*q,A+=r*W,V+=r*Z,N+=r*K,E+=r*G,I+=r*Y,H+=r*J,O+=r*Q,v+=(r=t[14])*U,w+=r*B,x+=r*z,S+=r*R,P+=r*j,T+=r*D,k+=r*X,M+=r*F,A+=r*q,V+=r*W,N+=r*Z,E+=r*K,I+=r*G,H+=r*Y,O+=r*J,C+=r*Q,w+=(r=t[15])*U,a+=38*(S+=r*z),o+=38*(P+=r*R),c+=38*(T+=r*j),u+=38*(k+=r*D),l+=38*(M+=r*X),h+=38*(A+=r*F),d+=38*(V+=r*q),p+=38*(N+=r*W),f+=38*(E+=r*Z),y+=38*(I+=r*K),m+=38*(H+=r*G),g+=38*(O+=r*Y),b+=38*(C+=r*J),v+=38*(L+=r*Q),s=(r=(s+=38*(x+=r*B))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),s=(r=(s+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),s+=i-1+37*(i-1),e[0]=s,e[1]=a,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=h,e[7]=d,e[8]=p,e[9]=f,e[10]=y,e[11]=m,e[12]=g,e[13]=b,e[14]=v,e[15]=w}function j(e,t){R(e,t,t)}function D(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)j(i,i),2!==r&&4!==r&&R(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function X(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)j(i,i),1!==r&&R(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function F(e,n,r){var i,s,a=new Uint8Array(32),o=new Float64Array(80),u=t(),l=t(),h=t(),d=t(),p=t(),f=t();for(s=0;s<31;s++)a[s]=n[s];for(a[31]=127&n[31]|64,a[0]&=248,U(o,r),s=0;s<16;s++)l[s]=o[s],d[s]=u[s]=h[s]=0;for(u[0]=d[0]=1,s=254;s>=0;--s)H(u,l,i=a[s>>>3]>>>(7&s)&1),H(h,d,i),B(p,u,h),z(u,u,h),B(h,l,d),z(l,l,d),j(d,p),j(f,u),R(u,h,u),R(h,l,p),B(p,u,h),z(u,u,h),j(l,u),z(h,d,f),R(u,h,c),B(u,u,d),R(h,h,u),R(u,d,f),R(d,l,o),j(l,p),H(u,l,i),H(h,d,i);for(s=0;s<16;s++)o[s+16]=u[s],o[s+32]=h[s],o[s+48]=l[s],o[s+64]=d[s];var y=o.subarray(32),m=o.subarray(16);return D(y,y),R(m,m,y),O(e,m),0}function q(e,t){return F(e,t,s)}function W(e,t){return r(t,32),q(e,t)}function Z(e,t,n){var r=new Uint8Array(32);return F(r,n,t),v(e,i,r,w)}k.prototype.blocks=function(e,t,n){for(var r,i,s,a,o,c,u,l,h,d,p,f,y,m,g,b,v,w,x,S=this.fin?0:2048,P=this.h[0],T=this.h[1],k=this.h[2],M=this.h[3],A=this.h[4],V=this.h[5],N=this.h[6],E=this.h[7],I=this.h[8],H=this.h[9],O=this.r[0],C=this.r[1],L=this.r[2],U=this.r[3],B=this.r[4],z=this.r[5],R=this.r[6],j=this.r[7],D=this.r[8],X=this.r[9];n>=16;)d=h=0,d+=(P+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*O,d+=(T+=8191&(r>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*X),d+=(k+=8191&(i>>>10|(s=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*D),d+=(M+=8191&(s>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*j),h=(d+=(A+=8191&(a>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*R))>>>13,d&=8191,d+=(V+=o>>>1&8191)*(5*z),d+=(N+=8191&(o>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),d+=(E+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*U),d+=(I+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*L),p=h+=(d+=(H+=l>>>5|S)*(5*C))>>>13,p+=P*C,p+=T*O,p+=k*(5*X),p+=M*(5*D),h=(p+=A*(5*j))>>>13,p&=8191,p+=V*(5*R),p+=N*(5*z),p+=E*(5*B),p+=I*(5*U),h+=(p+=H*(5*L))>>>13,p&=8191,f=h,f+=P*L,f+=T*C,f+=k*O,f+=M*(5*X),h=(f+=A*(5*D))>>>13,f&=8191,f+=V*(5*j),f+=N*(5*R),f+=E*(5*z),f+=I*(5*B),y=h+=(f+=H*(5*U))>>>13,y+=P*U,y+=T*L,y+=k*C,y+=M*O,h=(y+=A*(5*X))>>>13,y&=8191,y+=V*(5*D),y+=N*(5*j),y+=E*(5*R),y+=I*(5*z),m=h+=(y+=H*(5*B))>>>13,m+=P*B,m+=T*U,m+=k*L,m+=M*C,h=(m+=A*O)>>>13,m&=8191,m+=V*(5*X),m+=N*(5*D),m+=E*(5*j),m+=I*(5*R),g=h+=(m+=H*(5*z))>>>13,g+=P*z,g+=T*B,g+=k*U,g+=M*L,h=(g+=A*C)>>>13,g&=8191,g+=V*O,g+=N*(5*X),g+=E*(5*D),g+=I*(5*j),b=h+=(g+=H*(5*R))>>>13,b+=P*R,b+=T*z,b+=k*B,b+=M*U,h=(b+=A*L)>>>13,b&=8191,b+=V*C,b+=N*O,b+=E*(5*X),b+=I*(5*D),v=h+=(b+=H*(5*j))>>>13,v+=P*j,v+=T*R,v+=k*z,v+=M*B,h=(v+=A*U)>>>13,v&=8191,v+=V*L,v+=N*C,v+=E*O,v+=I*(5*X),w=h+=(v+=H*(5*D))>>>13,w+=P*D,w+=T*j,w+=k*R,w+=M*z,h=(w+=A*B)>>>13,w&=8191,w+=V*U,w+=N*L,w+=E*C,w+=I*O,x=h+=(w+=H*(5*X))>>>13,x+=P*X,x+=T*D,x+=k*j,x+=M*R,h=(x+=A*z)>>>13,x&=8191,x+=V*B,x+=N*U,x+=E*L,x+=I*C,P=d=8191&(h=(h=((h+=(x+=H*O)>>>13)<<2)+h|0)+(d&=8191)|0),T=p+=h>>>=13,k=f&=8191,M=y&=8191,A=m&=8191,V=g&=8191,N=b&=8191,E=v&=8191,I=w&=8191,H=x&=8191,t+=16,n-=16;this.h[0]=P,this.h[1]=T,this.h[2]=k,this.h[3]=M,this.h[4]=A,this.h[5]=V,this.h[6]=N,this.h[7]=E,this.h[8]=I,this.h[9]=H},k.prototype.finish=function(e,t){var n,r,i,s,a=new Uint16Array(10);if(this.leftover){for(s=this.leftover,this.buffer[s++]=1;s<16;s++)this.buffer[s]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,s=2;s<10;s++)this.h[s]+=n,n=this.h[s]>>>13,this.h[s]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,a[0]=this.h[0]+5,n=a[0]>>>13,a[0]&=8191,s=1;s<10;s++)a[s]=this.h[s]+n,n=a[s]>>>13,a[s]&=8191;for(a[9]-=8192,r=(1^n)-1,s=0;s<10;s++)a[s]&=r;for(r=~r,s=0;s<10;s++)this.h[s]=this.h[s]&r|a[s];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,s=1;s<8;s++)i=(this.h[s]+this.pad[s]|0)+(i>>>16)|0,this.h[s]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r=16&&(i=n-n%16,this.blocks(e,t,i),t+=i,n-=i),n){for(r=0;r=128;){for(S=0;S<16;S++)P=8*S+G,E[S]=n[P+0]<<24|n[P+1]<<16|n[P+2]<<8|n[P+3],I[S]=n[P+4]<<24|n[P+5]<<16|n[P+6]<<8|n[P+7];for(S=0;S<80;S++)if(i=H,s=O,a=C,o=L,c=U,u=B,l=z,d=j,p=D,f=X,y=F,m=q,g=W,b=Z,M=65535&(k=K),A=k>>>16,V=65535&(T=R),N=T>>>16,M+=65535&(k=(q>>>14|U<<18)^(q>>>18|U<<14)^(U>>>9|q<<23)),A+=k>>>16,V+=65535&(T=(U>>>14|q<<18)^(U>>>18|q<<14)^(q>>>9|U<<23)),N+=T>>>16,M+=65535&(k=q&W^~q&Z),A+=k>>>16,V+=65535&(T=U&B^~U&z),N+=T>>>16,M+=65535&(k=Y[2*S+1]),A+=k>>>16,V+=65535&(T=Y[2*S]),N+=T>>>16,T=E[S%16],A+=(k=I[S%16])>>>16,V+=65535&T,N+=T>>>16,V+=(A+=(M+=65535&k)>>>16)>>>16,M=65535&(k=x=65535&M|A<<16),A=k>>>16,V=65535&(T=w=65535&V|(N+=V>>>16)<<16),N=T>>>16,M+=65535&(k=(j>>>28|H<<4)^(H>>>2|j<<30)^(H>>>7|j<<25)),A+=k>>>16,V+=65535&(T=(H>>>28|j<<4)^(j>>>2|H<<30)^(j>>>7|H<<25)),N+=T>>>16,A+=(k=j&D^j&X^D&X)>>>16,V+=65535&(T=H&O^H&C^O&C),N+=T>>>16,h=65535&(V+=(A+=(M+=65535&k)>>>16)>>>16)|(N+=V>>>16)<<16,v=65535&M|A<<16,M=65535&(k=y),A=k>>>16,V=65535&(T=o),N=T>>>16,A+=(k=x)>>>16,V+=65535&(T=w),N+=T>>>16,O=i,C=s,L=a,U=o=65535&(V+=(A+=(M+=65535&k)>>>16)>>>16)|(N+=V>>>16)<<16,B=c,z=u,R=l,H=h,D=d,X=p,F=f,q=y=65535&M|A<<16,W=m,Z=g,K=b,j=v,S%16==15)for(P=0;P<16;P++)T=E[P],M=65535&(k=I[P]),A=k>>>16,V=65535&T,N=T>>>16,T=E[(P+9)%16],M+=65535&(k=I[(P+9)%16]),A+=k>>>16,V+=65535&T,N+=T>>>16,w=E[(P+1)%16],M+=65535&(k=((x=I[(P+1)%16])>>>1|w<<31)^(x>>>8|w<<24)^(x>>>7|w<<25)),A+=k>>>16,V+=65535&(T=(w>>>1|x<<31)^(w>>>8|x<<24)^w>>>7),N+=T>>>16,w=E[(P+14)%16],A+=(k=((x=I[(P+14)%16])>>>19|w<<13)^(w>>>29|x<<3)^(x>>>6|w<<26))>>>16,V+=65535&(T=(w>>>19|x<<13)^(x>>>29|w<<3)^w>>>6),N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,E[P]=65535&V|N<<16,I[P]=65535&M|A<<16;M=65535&(k=j),A=k>>>16,V=65535&(T=H),N=T>>>16,T=e[0],A+=(k=t[0])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[0]=H=65535&V|N<<16,t[0]=j=65535&M|A<<16,M=65535&(k=D),A=k>>>16,V=65535&(T=O),N=T>>>16,T=e[1],A+=(k=t[1])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[1]=O=65535&V|N<<16,t[1]=D=65535&M|A<<16,M=65535&(k=X),A=k>>>16,V=65535&(T=C),N=T>>>16,T=e[2],A+=(k=t[2])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[2]=C=65535&V|N<<16,t[2]=X=65535&M|A<<16,M=65535&(k=F),A=k>>>16,V=65535&(T=L),N=T>>>16,T=e[3],A+=(k=t[3])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[3]=L=65535&V|N<<16,t[3]=F=65535&M|A<<16,M=65535&(k=q),A=k>>>16,V=65535&(T=U),N=T>>>16,T=e[4],A+=(k=t[4])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[4]=U=65535&V|N<<16,t[4]=q=65535&M|A<<16,M=65535&(k=W),A=k>>>16,V=65535&(T=B),N=T>>>16,T=e[5],A+=(k=t[5])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[5]=B=65535&V|N<<16,t[5]=W=65535&M|A<<16,M=65535&(k=Z),A=k>>>16,V=65535&(T=z),N=T>>>16,T=e[6],A+=(k=t[6])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[6]=z=65535&V|N<<16,t[6]=Z=65535&M|A<<16,M=65535&(k=K),A=k>>>16,V=65535&(T=R),N=T>>>16,T=e[7],A+=(k=t[7])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[7]=R=65535&V|N<<16,t[7]=K=65535&M|A<<16,G+=128,r-=128}return r}function Q(e,t,n){var r,i=new Int32Array(8),s=new Int32Array(8),a=new Uint8Array(256),o=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,s[0]=4089235720,s[1]=2227873595,s[2]=4271175723,s[3]=1595750129,s[4]=2917565137,s[5]=725511199,s[6]=4215389547,s[7]=327033209,J(i,s,t,n),n%=128,r=0;r=0;--i)$(e,t,r=n[i/8|0]>>(7&i)&1),_(t,e),_(e,e),$(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];E(r[0],h),E(r[1],d),E(r[2],o),R(r[3],h,d),te(e,r,n)}function re(e,n,i){var s,a=new Uint8Array(64),o=[t(),t(),t(),t()];for(i||r(n,32),Q(a,n,32),a[0]&=248,a[31]&=127,a[31]|=64,ne(o,a),ee(e,o),s=0;s<32;s++)n[s+32]=e[s];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function se(e,t){var n,r,i,s;for(r=63;r>=32;--r){for(n=0,i=r-32,s=r-12;i>4)*ie[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*ie[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function ae(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;se(e,n)}function oe(e,n,r,i){var s,a,o=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),h=[t(),t(),t(),t()];Q(o,i,32),o[0]&=248,o[31]&=127,o[31]|=64;var d=r+64;for(s=0;s>7&&z(e[0],a,e[0]),R(e[3],e[0],e[1]),0)}(d,i))return-1;for(s=0;s=0},e.sign.keyPair=function(){var e=new Uint8Array(he),t=new Uint8Array(de);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(fe(e),e.length!==de)throw new Error("bad secret key size");for(var t=new Uint8Array(he),n=0;n=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function c(e,t,n){var r=o(e,n);return n-1>=t&&(r|=o(e,n-1)<<4),r}function u(e,t,n,i){for(var s=0,a=0,o=Math.min(e.length,n),c=t;c=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===n)for(i=0,s=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=c(e,t,r)<=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(r=(e.length-t)%2==0?t+1:t;r=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var s=e.length-n,a=s%r,o=Math.min(s,s-a)+n,c=0,l=n;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){s.prototype.inspect=h}else s.prototype.inspect=h;function h(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function y(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,c=a/67108864|0;n.words[0]=o;for(var u=1;u>>26,h=67108863&c,d=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=d;p++){var f=u-p|0;l+=(a=(i=0|e.words[f])*(s=0|t.words[p])+h)/67108864|0,h=67108863&a}n.words[u]=0|h,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n._strip()}s.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==s||a!==this.length-1?d[6-c.length]+c+n:c+n}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=p[e],l=f[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modrn(l).toString(e);n=(h=h.idivn(l)).isZero()?y+n:d[u-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16,2)},a&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},s.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,s=0;i>8&255),n>16&255),6===s?(n>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===s?(n>=0&&(e[n--]=a>>24&255),r=0,s=0):(r=a>>>24,s+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,s=0;s>>26;for(;0!==i&&s>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;se.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var s=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==s&&a>26,this.words[a]=67108863&t;if(0===s&&a>>13,p=0|a[1],f=8191&p,y=p>>>13,m=0|a[2],g=8191&m,b=m>>>13,v=0|a[3],w=8191&v,x=v>>>13,S=0|a[4],P=8191&S,T=S>>>13,k=0|a[5],M=8191&k,A=k>>>13,V=0|a[6],N=8191&V,E=V>>>13,I=0|a[7],H=8191&I,O=I>>>13,C=0|a[8],L=8191&C,U=C>>>13,B=0|a[9],z=8191&B,R=B>>>13,j=0|o[0],D=8191&j,X=j>>>13,F=0|o[1],q=8191&F,W=F>>>13,Z=0|o[2],K=8191&Z,G=Z>>>13,Y=0|o[3],J=8191&Y,Q=Y>>>13,_=0|o[4],$=8191&_,ee=_>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],he=8191&le,de=le>>>13,pe=0|o[9],fe=8191&pe,ye=pe>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(u+(r=Math.imul(h,D))|0)+((8191&(i=(i=Math.imul(h,X))+Math.imul(d,D)|0))<<13)|0;u=((s=Math.imul(d,X))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(f,D),i=(i=Math.imul(f,X))+Math.imul(y,D)|0,s=Math.imul(y,X);var ge=(u+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(d,q)|0))<<13)|0;u=((s=s+Math.imul(d,W)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,D),i=(i=Math.imul(g,X))+Math.imul(b,D)|0,s=Math.imul(b,X),r=r+Math.imul(f,q)|0,i=(i=i+Math.imul(f,W)|0)+Math.imul(y,q)|0,s=s+Math.imul(y,W)|0;var be=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((s=s+Math.imul(d,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,D),i=(i=Math.imul(w,X))+Math.imul(x,D)|0,s=Math.imul(x,X),r=r+Math.imul(g,q)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,q)|0,s=s+Math.imul(b,W)|0,r=r+Math.imul(f,K)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(y,K)|0,s=s+Math.imul(y,G)|0;var ve=(u+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,J)|0))<<13)|0;u=((s=s+Math.imul(d,Q)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(P,D),i=(i=Math.imul(P,X))+Math.imul(T,D)|0,s=Math.imul(T,X),r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(x,q)|0,s=s+Math.imul(x,W)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(b,K)|0,s=s+Math.imul(b,G)|0,r=r+Math.imul(f,J)|0,i=(i=i+Math.imul(f,Q)|0)+Math.imul(y,J)|0,s=s+Math.imul(y,Q)|0;var we=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,$)|0))<<13)|0;u=((s=s+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(M,D),i=(i=Math.imul(M,X))+Math.imul(A,D)|0,s=Math.imul(A,X),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(T,q)|0,s=s+Math.imul(T,W)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,K)|0,s=s+Math.imul(x,G)|0,r=r+Math.imul(g,J)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(b,J)|0,s=s+Math.imul(b,Q)|0,r=r+Math.imul(f,$)|0,i=(i=i+Math.imul(f,ee)|0)+Math.imul(y,$)|0,s=s+Math.imul(y,ee)|0;var xe=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((s=s+Math.imul(d,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(N,D),i=(i=Math.imul(N,X))+Math.imul(E,D)|0,s=Math.imul(E,X),r=r+Math.imul(M,q)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(A,q)|0,s=s+Math.imul(A,W)|0,r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(T,K)|0,s=s+Math.imul(T,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(x,J)|0,s=s+Math.imul(x,Q)|0,r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,$)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(f,ne)|0,i=(i=i+Math.imul(f,re)|0)+Math.imul(y,ne)|0,s=s+Math.imul(y,re)|0;var Se=(u+(r=r+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,ae)|0)+Math.imul(d,se)|0))<<13)|0;u=((s=s+Math.imul(d,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(H,D),i=(i=Math.imul(H,X))+Math.imul(O,D)|0,s=Math.imul(O,X),r=r+Math.imul(N,q)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(E,q)|0,s=s+Math.imul(E,W)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(A,K)|0,s=s+Math.imul(A,G)|0,r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(T,J)|0,s=s+Math.imul(T,Q)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,$)|0,s=s+Math.imul(x,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(b,ne)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(f,se)|0,i=(i=i+Math.imul(f,ae)|0)+Math.imul(y,se)|0,s=s+Math.imul(y,ae)|0;var Pe=(u+(r=r+Math.imul(h,ce)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((s=s+Math.imul(d,ue)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,D),i=(i=Math.imul(L,X))+Math.imul(U,D)|0,s=Math.imul(U,X),r=r+Math.imul(H,q)|0,i=(i=i+Math.imul(H,W)|0)+Math.imul(O,q)|0,s=s+Math.imul(O,W)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(E,K)|0,s=s+Math.imul(E,G)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(A,J)|0,s=s+Math.imul(A,Q)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(T,$)|0,s=s+Math.imul(T,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,s=s+Math.imul(x,re)|0,r=r+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,se)|0,s=s+Math.imul(b,ae)|0,r=r+Math.imul(f,ce)|0,i=(i=i+Math.imul(f,ue)|0)+Math.imul(y,ce)|0,s=s+Math.imul(y,ue)|0;var Te=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((s=s+Math.imul(d,de)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(z,D),i=(i=Math.imul(z,X))+Math.imul(R,D)|0,s=Math.imul(R,X),r=r+Math.imul(L,q)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(U,q)|0,s=s+Math.imul(U,W)|0,r=r+Math.imul(H,K)|0,i=(i=i+Math.imul(H,G)|0)+Math.imul(O,K)|0,s=s+Math.imul(O,G)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(E,J)|0,s=s+Math.imul(E,Q)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(A,$)|0,s=s+Math.imul(A,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(T,ne)|0,s=s+Math.imul(T,re)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,se)|0,s=s+Math.imul(x,ae)|0,r=r+Math.imul(g,ce)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(b,ce)|0,s=s+Math.imul(b,ue)|0,r=r+Math.imul(f,he)|0,i=(i=i+Math.imul(f,de)|0)+Math.imul(y,he)|0,s=s+Math.imul(y,de)|0;var ke=(u+(r=r+Math.imul(h,fe)|0)|0)+((8191&(i=(i=i+Math.imul(h,ye)|0)+Math.imul(d,fe)|0))<<13)|0;u=((s=s+Math.imul(d,ye)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(z,q),i=(i=Math.imul(z,W))+Math.imul(R,q)|0,s=Math.imul(R,W),r=r+Math.imul(L,K)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(U,K)|0,s=s+Math.imul(U,G)|0,r=r+Math.imul(H,J)|0,i=(i=i+Math.imul(H,Q)|0)+Math.imul(O,J)|0,s=s+Math.imul(O,Q)|0,r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(E,$)|0,s=s+Math.imul(E,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(A,ne)|0,s=s+Math.imul(A,re)|0,r=r+Math.imul(P,se)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,ae)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,s=s+Math.imul(x,ue)|0,r=r+Math.imul(g,he)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,he)|0,s=s+Math.imul(b,de)|0;var Me=(u+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ye)|0)+Math.imul(y,fe)|0))<<13)|0;u=((s=s+Math.imul(y,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(z,K),i=(i=Math.imul(z,G))+Math.imul(R,K)|0,s=Math.imul(R,G),r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,Q)|0)+Math.imul(U,J)|0,s=s+Math.imul(U,Q)|0,r=r+Math.imul(H,$)|0,i=(i=i+Math.imul(H,ee)|0)+Math.imul(O,$)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(E,ne)|0,s=s+Math.imul(E,re)|0,r=r+Math.imul(M,se)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(A,se)|0,s=s+Math.imul(A,ae)|0,r=r+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(T,ce)|0,s=s+Math.imul(T,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(x,he)|0,s=s+Math.imul(x,de)|0;var Ae=(u+(r=r+Math.imul(g,fe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(b,fe)|0))<<13)|0;u=((s=s+Math.imul(b,ye)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(z,J),i=(i=Math.imul(z,Q))+Math.imul(R,J)|0,s=Math.imul(R,Q),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(U,$)|0,s=s+Math.imul(U,ee)|0,r=r+Math.imul(H,ne)|0,i=(i=i+Math.imul(H,re)|0)+Math.imul(O,ne)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(E,se)|0,s=s+Math.imul(E,ae)|0,r=r+Math.imul(M,ce)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(A,ce)|0,s=s+Math.imul(A,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(T,he)|0,s=s+Math.imul(T,de)|0;var Ve=(u+(r=r+Math.imul(w,fe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(x,fe)|0))<<13)|0;u=((s=s+Math.imul(x,ye)|0)+(i>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,r=Math.imul(z,$),i=(i=Math.imul(z,ee))+Math.imul(R,$)|0,s=Math.imul(R,ee),r=r+Math.imul(L,ne)|0,i=(i=i+Math.imul(L,re)|0)+Math.imul(U,ne)|0,s=s+Math.imul(U,re)|0,r=r+Math.imul(H,se)|0,i=(i=i+Math.imul(H,ae)|0)+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(E,ce)|0,s=s+Math.imul(E,ue)|0,r=r+Math.imul(M,he)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(A,he)|0,s=s+Math.imul(A,de)|0;var Ne=(u+(r=r+Math.imul(P,fe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ye)|0)+Math.imul(T,fe)|0))<<13)|0;u=((s=s+Math.imul(T,ye)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(z,ne),i=(i=Math.imul(z,re))+Math.imul(R,ne)|0,s=Math.imul(R,re),r=r+Math.imul(L,se)|0,i=(i=i+Math.imul(L,ae)|0)+Math.imul(U,se)|0,s=s+Math.imul(U,ae)|0,r=r+Math.imul(H,ce)|0,i=(i=i+Math.imul(H,ue)|0)+Math.imul(O,ce)|0,s=s+Math.imul(O,ue)|0,r=r+Math.imul(N,he)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(E,he)|0,s=s+Math.imul(E,de)|0;var Ee=(u+(r=r+Math.imul(M,fe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ye)|0)+Math.imul(A,fe)|0))<<13)|0;u=((s=s+Math.imul(A,ye)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(z,se),i=(i=Math.imul(z,ae))+Math.imul(R,se)|0,s=Math.imul(R,ae),r=r+Math.imul(L,ce)|0,i=(i=i+Math.imul(L,ue)|0)+Math.imul(U,ce)|0,s=s+Math.imul(U,ue)|0,r=r+Math.imul(H,he)|0,i=(i=i+Math.imul(H,de)|0)+Math.imul(O,he)|0,s=s+Math.imul(O,de)|0;var Ie=(u+(r=r+Math.imul(N,fe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ye)|0)+Math.imul(E,fe)|0))<<13)|0;u=((s=s+Math.imul(E,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(z,ce),i=(i=Math.imul(z,ue))+Math.imul(R,ce)|0,s=Math.imul(R,ue),r=r+Math.imul(L,he)|0,i=(i=i+Math.imul(L,de)|0)+Math.imul(U,he)|0,s=s+Math.imul(U,de)|0;var He=(u+(r=r+Math.imul(H,fe)|0)|0)+((8191&(i=(i=i+Math.imul(H,ye)|0)+Math.imul(O,fe)|0))<<13)|0;u=((s=s+Math.imul(O,ye)|0)+(i>>>13)|0)+(He>>>26)|0,He&=67108863,r=Math.imul(z,he),i=(i=Math.imul(z,de))+Math.imul(R,he)|0,s=Math.imul(R,de);var Oe=(u+(r=r+Math.imul(L,fe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ye)|0)+Math.imul(U,fe)|0))<<13)|0;u=((s=s+Math.imul(U,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Ce=(u+(r=Math.imul(z,fe))|0)+((8191&(i=(i=Math.imul(z,ye))+Math.imul(R,fe)|0))<<13)|0;return u=((s=Math.imul(R,ye))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c[0]=me,c[1]=ge,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=Se,c[7]=Pe,c[8]=Te,c[9]=ke,c[10]=Me,c[11]=Ae,c[12]=Ve,c[13]=Ne,c[14]=Ee,c[15]=Ie,c[16]=He,c[17]=Oe,c[18]=Ce,0!==u&&(c[19]=u,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,s=0;s>>26)|0)>>>26,a&=67108863}n.words[s]=o,r=a,a=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function b(e,t,n){return g(e,t,n)}function v(e,t){this.x=e,this.y=t}Math.imul||(m=y),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?y(this,e,t):n<1024?g(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,n,r,i,s){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&s,s>>>=13;for(a=2*t;a>=26,n+=s/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i&1}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=i);u--){var h=0|this.words[u];this.words[u]=l<<26-s|h>>>s,l=h&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+n]=67108863&s}for(;i>26,this.words[i+n]=67108863&s;if(0===o)return this._strip();for(r(-1===o),o=0,i=0;i>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!=(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var o,c=r.length-i.length;if("mod"!==t){(o=new s(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);o&&(o.words[h]=d)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},s.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(i=o.div.neg()),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(i=o.div.neg()),{div:i,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,o},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%e;return t?-i:i},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/e|0,n=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new s(1),a=new s(0),o=new s(0),c=new s(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),h=t.clone();!t.isZero();){for(var d=0,p=1;0==(t.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var f=0,y=1;0==(n.words[0]&y)&&f<26;++f,y<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(h)),o.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(o),a.isub(c)):(n.isub(t),o.isub(i),c.isub(a))}return{a:o,b:c,gcd:n.iushln(u)}},s.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new s(1),o=new s(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,l=1;0==(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(o)):(n.isub(t),o.isub(a))}return(i=0===t.cmpn(1)?a:o).cmpn(0)<0&&i.iadd(e),i},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var s=t;t=n,n=s}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new M(e)},s.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function T(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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)}x.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},i(S,x),S.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,s=a}s>>>=22,e.words[i-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new P;else if("p192"===e)t=new T;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return w[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new s(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var o=new s(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new s(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var h=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),f=a;0!==p.cmp(o);){for(var y=p,m=0;0!==y.cmp(o);m++)y=y.redSqr();r(m=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var h=u>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++o||0===r&&0===l)&&(i=this.mul(i,n[a]),o=0,a=0)):o=0}c=26}return i},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new A(e)},i(A,M),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},822:(e,t)=>{"use strict";function n(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function r(...e){const t=(e,t)=>n=>e(t(n));return{encode:Array.from(e).reverse().reduce(((e,n)=>e?t(e,n.encode):n.encode),void 0),decode:e.reduce(((e,n)=>e?t(e,n.decode):n.decode),void 0)}}function i(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(n(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const n=e.indexOf(t);if(-1===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}}function s(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function a(e,t="="){if(n(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function o(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function c(e,t,r){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let i=0;const s=[],a=Array.from(e);for(a.forEach((e=>{if(n(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,n=!0;for(let s=i;st?u(t,e%t):e,l=(e,t)=>e+(t-u(e,t));function h(e,t,r,i){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(l(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${l(t,r)}`);let s=0,a=0;const o=2**r-1,c=[];for(const i of e){if(n(i),i>=2**t)throw new Error(`convertRadix2: invalid data word=${i} from=${t}`);if(s=s<32)throw new Error(`convertRadix2: carry overflow pos=${a} from=${t}`);for(a+=t;a>=r;a-=r)c.push((s>>a-r&o)>>>0);s&=2**a-1}if(s=s<=t)throw new Error("Excess padding");if(!i&&s)throw new Error(`Non-zero padding: ${s}`);return i&&a>0&&c.push(s>>>0),c}function d(e,t=!1){if(n(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(l(8,e)>32||l(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!(n instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return h(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&"number"!=typeof n[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(h(n,e,8,t))}}}function p(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}t.YU=r(d(4),i("0123456789ABCDEF"),s("")),t.pJ=r(d(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a(5),s("")),r(d(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a(5),s("")),r(d(5),i("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),s(""),o((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),t.US=r(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),s("")),t.tH=r(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),s(""));const f=e=>{return r((n(t=58),{encode:e=>{if(!(e instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return c(Array.from(e),256,t)},decode:e=>{if(!Array.isArray(e)||e.length&&"number"!=typeof e[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(c(e,t,256))}}),i(e),s(""));var t};t.Jq=f("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),f("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),f("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const y=[0,2,3,5,6,7,9,10,11];t.S_={encode(e){let n="";for(let r=0;r>25;let n=(33554431&e)<<5;for(let e=0;e>e&1)&&(n^=g[e]);return n}function v(e,t,n=1){const r=e.length;let i=1;for(let t=0;t126)throw new Error(`Invalid prefix (${e})`);i=b(i)^n>>5}i=b(i);for(let t=0;tn)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${n})`);const r=e.toLowerCase();if(e!==r&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const i=(e=r).lastIndexOf("1");if(0===i||-1===i)throw new Error('Letter "1" must be present between prefix and data only');const[s,a]=[e.slice(0,i),e.slice(i+1)];if(a.length<6)throw new Error("Data must be at least 6 characters long");const o=m.decode(a).slice(0,-6),c=v(s,o,t);if(!a.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:s,words:o}}return{encode:function(e,n,r=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(n)||n.length&&"number"!=typeof n[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof n);const i=e.length+7+n.length;if(!1!==r&&i>r)throw new TypeError(`Length ${i} exceeds limit ${r}`);return`${e=e.toLowerCase()}1${m.encode(n)}${v(e,n,t)}`},decode:a,decodeToBytes:function(e){const{prefix:t,words:n}=a(e,!1);return{prefix:t,words:n,bytes:r(n)}},decodeUnsafe:p(a),fromWords:r,fromWordsUnsafe:s,toWords:i}}w("bech32"),w("bech32m"),t.KA={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.$v=r(d(4),i("0123456789abcdef"),s(""),o((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const x={utf8:t.KA,hex:t.$v,base16:t.YU,base32:t.pJ,base64:t.US,base64url:t.tH,base58:t.Jq,base58xmr:t.S_},S=`Invalid encoding type. Available types: ${Object.keys(x).join(", ")}`;t.d3=(e,t)=>{if("string"!=typeof e||!x.hasOwnProperty(e))throw new TypeError(S);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return x[e].encode(t)},t.d3,t.qX=(e,t)=>{if(!x.hasOwnProperty(e))throw new TypeError(S);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return x[e].decode(t)},t.qX},766:(e,t)=>{"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,s=c(e),a=s[0],o=s[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,o)),l=0,h=o>0?a-4:a;for(n=0;n>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===o&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===o&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],a=16383,o=0,c=r-i;oc?c:o+a));return 1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var i,s,a=[],o=t;o>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},834:(e,t,n)=>{"use strict";const r=n(766),i=n(333),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|y(e,t);let r=o(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const i=function(e){if(c.isBuffer(e)){const t=0|f(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),o(e<0?0:0|f(e))}function d(e){const t=e.length<0?0:0|f(e.length),n=o(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return K(e).length;default:if(i)return r?-1:Z(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return V(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){let s,a=1,o=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(s=n;so&&(n=o-c),s=n;s>=0;s--){let n=!0;for(let r=0;ri&&(r=i):r=i;const s=t.length;let a;for(r>s/2&&(r=s/2),a=0;a>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,o,c;switch(a){case 1:t<128&&(s=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(s=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:n=e[i+1],r=e[i+2],o=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const o=Math.min(s,a),u=this.slice(r,i),l=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return S(this,e,t,n);case"base64":return P(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function V(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,i,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function C(e,t,n,r,i){X(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function L(e,t,n,r,i){X(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function U(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,s){return t=+t,n>>>=0,s||U(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,s){return t=+t,n>>>=0,s||U(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||H(e,t,this.length);let r=this[e],i=1,s=0;for(;++s>>=0,t>>>=0,n||H(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||H(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||H(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||H(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||H(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=_((function(e){F(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||H(e,t,this.length);let r=this[e],i=1,s=0;for(;++s=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||H(e,t,this.length);let r=t,i=1,s=this[e+--r];for(;r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||H(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||H(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||H(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=_((function(e){F(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||H(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||H(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||H(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||H(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||O(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,s=0;for(this[t]=255&e;++s>>=0,n>>>=0,r||O(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(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},c.prototype.writeBigUInt64LE=_((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=_((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}let i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}let i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(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},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(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},c.prototype.writeBigInt64LE=_((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=_((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function X(e,t,n,r,i,s){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new R.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){F(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||q(t,e.length-(n+1))}(r,i,s)}function F(e,t){if("number"!=typeof e)throw new R.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,n){if(Math.floor(e)!==e)throw F(e,n),new R.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new R.ERR_BUFFER_OUT_OF_BOUNDS;throw new R.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=D(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=D(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function Z(e,t){let n;t=t||1/0;const r=e.length;let i=null;const s=[];for(let a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function K(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function _(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},559:function(e,t,n){!function(t,r){"use strict";e.exports?e.exports=r(n(873)):t.ed2curve=r(t.nacl)}(this,(function(e){"use strict";if(!e)throw new Error("tweetnacl not loaded");var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t>16&1),c[r-1]&=65535;c[15]=u[15]-32767-(c[14]>>16&1),s=c[15]>>16&1,c[14]&=65535,o(u,c,1-s)}for(r=0;r<16;r++)e[2*r]=255&u[r],e[2*r+1]=u[r]>>8}function p(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return d(n,e),d(r,t),function(e,t,n,r,i){var s,a=0;for(s=0;s<32;s++)a|=e[0+s]^n[0+s];return(1&a-1>>>8)-1}(n,0,r)}function f(e){var a=new Uint8Array(32),o=[t(),t(),t(),t()],f=t(),y=t();if(function(e,a){var o,f,y=t(),m=t(),g=t(),b=t(),v=t(),w=t(),x=t();return function(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}(e[2],r),function(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(e[1],a),h(g,e[1]),l(b,g,i),u(g,g,e[2]),c(b,e[2],b),h(v,b),h(w,v),l(x,w,v),l(y,x,g),l(y,y,b),function(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)h(i,i),1!==r&&l(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}(y,y),l(y,y,g),l(y,y,b),l(y,y,b),l(e[0],y,b),h(m,e[0]),l(m,m,b),p(m,g)&&l(e[0],e[0],s),h(m,e[0]),l(m,m,b),p(m,g)?-1:(o=e[0],d(f=new Uint8Array(32),o),(1&f[0])==a[31]>>7&&u(e[0],n,e[0]),l(e[3],e[0],e[1]),0)}(o,e))return null;var m=o[1];return c(f,r,m),u(y,r,m),function(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)h(i,i),2!==r&&4!==r&&l(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}(y,y),l(f,f,y),d(a,f),a}function y(t){var n,r=new Uint8Array(64),i=new Uint8Array(32);for(e.lowlevel.crypto_hash(r,t,32),r[0]&=248,r[31]&=127,r[31]|=64,n=0;n<32;n++)i[n]=r[n];for(n=0;n<64;n++)r[n]=0;return i}return{convertPublicKey:f,convertSecretKey:y,convertKeyPair:function(e){var t=f(e.publicKey);return t?{publicKey:t,secretKey:y(e.secretKey)}:null}}}))},873:(e,t,n)=>{!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function y(e,t,n,r,i){var s,a=0;for(s=0;s>>8)-1}function m(e,t,n,r){return y(e,t,n,r,16)}function g(e,t,n,r){return y(e,t,n,r,32)}function b(e,t,n,r){!function(e,t,n,r){for(var i,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,x=s,S=a,P=o,T=c,k=u,M=l,A=h,V=d,N=p,E=f,I=y,H=m,O=g,C=b,L=v,U=w,B=0;B<20;B+=2)x^=(i=(O^=(i=(N^=(i=(k^=(i=x+O|0)<<7|i>>>25)+x|0)<<9|i>>>23)+k|0)<<13|i>>>19)+N|0)<<18|i>>>14,M^=(i=(S^=(i=(C^=(i=(E^=(i=M+S|0)<<7|i>>>25)+M|0)<<9|i>>>23)+E|0)<<13|i>>>19)+C|0)<<18|i>>>14,I^=(i=(A^=(i=(P^=(i=(L^=(i=I+A|0)<<7|i>>>25)+I|0)<<9|i>>>23)+L|0)<<13|i>>>19)+P|0)<<18|i>>>14,U^=(i=(H^=(i=(V^=(i=(T^=(i=U+H|0)<<7|i>>>25)+U|0)<<9|i>>>23)+T|0)<<13|i>>>19)+V|0)<<18|i>>>14,x^=(i=(T^=(i=(P^=(i=(S^=(i=x+T|0)<<7|i>>>25)+x|0)<<9|i>>>23)+S|0)<<13|i>>>19)+P|0)<<18|i>>>14,M^=(i=(k^=(i=(V^=(i=(A^=(i=M+k|0)<<7|i>>>25)+M|0)<<9|i>>>23)+A|0)<<13|i>>>19)+V|0)<<18|i>>>14,I^=(i=(E^=(i=(N^=(i=(H^=(i=I+E|0)<<7|i>>>25)+I|0)<<9|i>>>23)+H|0)<<13|i>>>19)+N|0)<<18|i>>>14,U^=(i=(L^=(i=(C^=(i=(O^=(i=U+L|0)<<7|i>>>25)+U|0)<<9|i>>>23)+O|0)<<13|i>>>19)+C|0)<<18|i>>>14;x=x+s|0,S=S+a|0,P=P+o|0,T=T+c|0,k=k+u|0,M=M+l|0,A=A+h|0,V=V+d|0,N=N+p|0,E=E+f|0,I=I+y|0,H=H+m|0,O=O+g|0,C=C+b|0,L=L+v|0,U=U+w|0,e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=S>>>0&255,e[5]=S>>>8&255,e[6]=S>>>16&255,e[7]=S>>>24&255,e[8]=P>>>0&255,e[9]=P>>>8&255,e[10]=P>>>16&255,e[11]=P>>>24&255,e[12]=T>>>0&255,e[13]=T>>>8&255,e[14]=T>>>16&255,e[15]=T>>>24&255,e[16]=k>>>0&255,e[17]=k>>>8&255,e[18]=k>>>16&255,e[19]=k>>>24&255,e[20]=M>>>0&255,e[21]=M>>>8&255,e[22]=M>>>16&255,e[23]=M>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=V>>>0&255,e[29]=V>>>8&255,e[30]=V>>>16&255,e[31]=V>>>24&255,e[32]=N>>>0&255,e[33]=N>>>8&255,e[34]=N>>>16&255,e[35]=N>>>24&255,e[36]=E>>>0&255,e[37]=E>>>8&255,e[38]=E>>>16&255,e[39]=E>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=H>>>0&255,e[45]=H>>>8&255,e[46]=H>>>16&255,e[47]=H>>>24&255,e[48]=O>>>0&255,e[49]=O>>>8&255,e[50]=O>>>16&255,e[51]=O>>>24&255,e[52]=C>>>0&255,e[53]=C>>>8&255,e[54]=C>>>16&255,e[55]=C>>>24&255,e[56]=L>>>0&255,e[57]=L>>>8&255,e[58]=L>>>16&255,e[59]=L>>>24&255,e[60]=U>>>0&255,e[61]=U>>>8&255,e[62]=U>>>16&255,e[63]=U>>>24&255}(e,t,n,r)}function v(e,t,n,r){!function(e,t,n,r){for(var i,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,f=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,m=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,v=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,x=0;x<20;x+=2)s^=(i=(g^=(i=(p^=(i=(u^=(i=s+g|0)<<7|i>>>25)+s|0)<<9|i>>>23)+u|0)<<13|i>>>19)+p|0)<<18|i>>>14,l^=(i=(a^=(i=(b^=(i=(f^=(i=l+a|0)<<7|i>>>25)+l|0)<<9|i>>>23)+f|0)<<13|i>>>19)+b|0)<<18|i>>>14,y^=(i=(h^=(i=(o^=(i=(v^=(i=y+h|0)<<7|i>>>25)+y|0)<<9|i>>>23)+v|0)<<13|i>>>19)+o|0)<<18|i>>>14,w^=(i=(m^=(i=(d^=(i=(c^=(i=w+m|0)<<7|i>>>25)+w|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,s^=(i=(c^=(i=(o^=(i=(a^=(i=s+c|0)<<7|i>>>25)+s|0)<<9|i>>>23)+a|0)<<13|i>>>19)+o|0)<<18|i>>>14,l^=(i=(u^=(i=(d^=(i=(h^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+h|0)<<13|i>>>19)+d|0)<<18|i>>>14,y^=(i=(f^=(i=(p^=(i=(m^=(i=y+f|0)<<7|i>>>25)+y|0)<<9|i>>>23)+m|0)<<13|i>>>19)+p|0)<<18|i>>>14,w^=(i=(v^=(i=(b^=(i=(g^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+g|0)<<13|i>>>19)+b|0)<<18|i>>>14;e[0]=s>>>0&255,e[1]=s>>>8&255,e[2]=s>>>16&255,e[3]=s>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=h>>>0&255,e[17]=h>>>8&255,e[18]=h>>>16&255,e[19]=h>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=f>>>0&255,e[29]=f>>>8&255,e[30]=f>>>16&255,e[31]=f>>>24&255}(e,t,n,r)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function x(e,t,n,r,i,s,a){var o,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=s[c];for(;i>=64;){for(b(l,u,a,w),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(o=1,c=8;c<16;c++)o=o+(255&u[c])|0,u[c]=255&o,o>>>=8;i-=64,t+=64,r+=64}if(i>0)for(b(l,u,a,w),c=0;c=64;){for(b(c,o,i,w),a=0;a<64;a++)e[t+a]=c[a];for(s=1,a=8;a<16;a++)s=s+(255&o[a])|0,o[a]=255&s,s>>>=8;n-=64,t+=64}if(n>0)for(b(c,o,i,w),a=0;a>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|i<<9),s=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|s<<12),this.r[5]=s>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(s>>>14|a<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|o<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function M(e,t,n,r,i,s){var a=new k(s);return a.update(n,r,i),a.finish(e,t),0}function A(e,t,n,r,i,s){var a=new Uint8Array(16);return M(a,0,n,r,i,s),m(e,t,a,0)}function V(e,t,n,r,i){var s;if(n<32)return-1;for(T(e,0,t,0,n,r,i),M(e,16,e,32,n-32,e),s=0;s<16;s++)e[s]=0;return 0}function N(e,t,n,r,i){var s,a=new Uint8Array(32);if(n<32)return-1;if(P(a,0,32,r,i),0!==A(t,16,t,32,n-32,a))return-1;for(T(e,0,t,0,n,r,i),s=0;s<32;s++)e[s]=0;return 0}function E(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function I(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function H(e,t,n){for(var r,i=~(n-1),s=0;s<16;s++)r=i&(e[s]^t[s]),e[s]^=r,t[s]^=r}function O(e,n){var r,i,s,a=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(I(o),I(o),I(o),i=0;i<2;i++){for(a[0]=o[0]-65517,r=1;r<15;r++)a[r]=o[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=o[15]-32767-(a[14]>>16&1),s=a[15]>>16&1,a[14]&=65535,H(o,a,1-s)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function C(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return O(n,e),O(r,t),g(n,0,r,0)}function L(e){var t=new Uint8Array(32);return O(t,e),1&t[0]}function U(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function z(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function R(e,t,n){var r,i,s=0,a=0,o=0,c=0,u=0,l=0,h=0,d=0,p=0,f=0,y=0,m=0,g=0,b=0,v=0,w=0,x=0,S=0,P=0,T=0,k=0,M=0,A=0,V=0,N=0,E=0,I=0,H=0,O=0,C=0,L=0,U=n[0],B=n[1],z=n[2],R=n[3],j=n[4],D=n[5],X=n[6],F=n[7],q=n[8],W=n[9],Z=n[10],K=n[11],G=n[12],Y=n[13],J=n[14],Q=n[15];s+=(r=t[0])*U,a+=r*B,o+=r*z,c+=r*R,u+=r*j,l+=r*D,h+=r*X,d+=r*F,p+=r*q,f+=r*W,y+=r*Z,m+=r*K,g+=r*G,b+=r*Y,v+=r*J,w+=r*Q,a+=(r=t[1])*U,o+=r*B,c+=r*z,u+=r*R,l+=r*j,h+=r*D,d+=r*X,p+=r*F,f+=r*q,y+=r*W,m+=r*Z,g+=r*K,b+=r*G,v+=r*Y,w+=r*J,x+=r*Q,o+=(r=t[2])*U,c+=r*B,u+=r*z,l+=r*R,h+=r*j,d+=r*D,p+=r*X,f+=r*F,y+=r*q,m+=r*W,g+=r*Z,b+=r*K,v+=r*G,w+=r*Y,x+=r*J,S+=r*Q,c+=(r=t[3])*U,u+=r*B,l+=r*z,h+=r*R,d+=r*j,p+=r*D,f+=r*X,y+=r*F,m+=r*q,g+=r*W,b+=r*Z,v+=r*K,w+=r*G,x+=r*Y,S+=r*J,P+=r*Q,u+=(r=t[4])*U,l+=r*B,h+=r*z,d+=r*R,p+=r*j,f+=r*D,y+=r*X,m+=r*F,g+=r*q,b+=r*W,v+=r*Z,w+=r*K,x+=r*G,S+=r*Y,P+=r*J,T+=r*Q,l+=(r=t[5])*U,h+=r*B,d+=r*z,p+=r*R,f+=r*j,y+=r*D,m+=r*X,g+=r*F,b+=r*q,v+=r*W,w+=r*Z,x+=r*K,S+=r*G,P+=r*Y,T+=r*J,k+=r*Q,h+=(r=t[6])*U,d+=r*B,p+=r*z,f+=r*R,y+=r*j,m+=r*D,g+=r*X,b+=r*F,v+=r*q,w+=r*W,x+=r*Z,S+=r*K,P+=r*G,T+=r*Y,k+=r*J,M+=r*Q,d+=(r=t[7])*U,p+=r*B,f+=r*z,y+=r*R,m+=r*j,g+=r*D,b+=r*X,v+=r*F,w+=r*q,x+=r*W,S+=r*Z,P+=r*K,T+=r*G,k+=r*Y,M+=r*J,A+=r*Q,p+=(r=t[8])*U,f+=r*B,y+=r*z,m+=r*R,g+=r*j,b+=r*D,v+=r*X,w+=r*F,x+=r*q,S+=r*W,P+=r*Z,T+=r*K,k+=r*G,M+=r*Y,A+=r*J,V+=r*Q,f+=(r=t[9])*U,y+=r*B,m+=r*z,g+=r*R,b+=r*j,v+=r*D,w+=r*X,x+=r*F,S+=r*q,P+=r*W,T+=r*Z,k+=r*K,M+=r*G,A+=r*Y,V+=r*J,N+=r*Q,y+=(r=t[10])*U,m+=r*B,g+=r*z,b+=r*R,v+=r*j,w+=r*D,x+=r*X,S+=r*F,P+=r*q,T+=r*W,k+=r*Z,M+=r*K,A+=r*G,V+=r*Y,N+=r*J,E+=r*Q,m+=(r=t[11])*U,g+=r*B,b+=r*z,v+=r*R,w+=r*j,x+=r*D,S+=r*X,P+=r*F,T+=r*q,k+=r*W,M+=r*Z,A+=r*K,V+=r*G,N+=r*Y,E+=r*J,I+=r*Q,g+=(r=t[12])*U,b+=r*B,v+=r*z,w+=r*R,x+=r*j,S+=r*D,P+=r*X,T+=r*F,k+=r*q,M+=r*W,A+=r*Z,V+=r*K,N+=r*G,E+=r*Y,I+=r*J,H+=r*Q,b+=(r=t[13])*U,v+=r*B,w+=r*z,x+=r*R,S+=r*j,P+=r*D,T+=r*X,k+=r*F,M+=r*q,A+=r*W,V+=r*Z,N+=r*K,E+=r*G,I+=r*Y,H+=r*J,O+=r*Q,v+=(r=t[14])*U,w+=r*B,x+=r*z,S+=r*R,P+=r*j,T+=r*D,k+=r*X,M+=r*F,A+=r*q,V+=r*W,N+=r*Z,E+=r*K,I+=r*G,H+=r*Y,O+=r*J,C+=r*Q,w+=(r=t[15])*U,a+=38*(S+=r*z),o+=38*(P+=r*R),c+=38*(T+=r*j),u+=38*(k+=r*D),l+=38*(M+=r*X),h+=38*(A+=r*F),d+=38*(V+=r*q),p+=38*(N+=r*W),f+=38*(E+=r*Z),y+=38*(I+=r*K),m+=38*(H+=r*G),g+=38*(O+=r*Y),b+=38*(C+=r*J),v+=38*(L+=r*Q),s=(r=(s+=38*(x+=r*B))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),s=(r=(s+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),s+=i-1+37*(i-1),e[0]=s,e[1]=a,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=h,e[7]=d,e[8]=p,e[9]=f,e[10]=y,e[11]=m,e[12]=g,e[13]=b,e[14]=v,e[15]=w}function j(e,t){R(e,t,t)}function D(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)j(i,i),2!==r&&4!==r&&R(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function X(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)j(i,i),1!==r&&R(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function F(e,n,r){var i,s,a=new Uint8Array(32),o=new Float64Array(80),u=t(),l=t(),h=t(),d=t(),p=t(),f=t();for(s=0;s<31;s++)a[s]=n[s];for(a[31]=127&n[31]|64,a[0]&=248,U(o,r),s=0;s<16;s++)l[s]=o[s],d[s]=u[s]=h[s]=0;for(u[0]=d[0]=1,s=254;s>=0;--s)H(u,l,i=a[s>>>3]>>>(7&s)&1),H(h,d,i),B(p,u,h),z(u,u,h),B(h,l,d),z(l,l,d),j(d,p),j(f,u),R(u,h,u),R(h,l,p),B(p,u,h),z(u,u,h),j(l,u),z(h,d,f),R(u,h,c),B(u,u,d),R(h,h,u),R(u,d,f),R(d,l,o),j(l,p),H(u,l,i),H(h,d,i);for(s=0;s<16;s++)o[s+16]=u[s],o[s+32]=h[s],o[s+48]=l[s],o[s+64]=d[s];var y=o.subarray(32),m=o.subarray(16);return D(y,y),R(m,m,y),O(e,m),0}function q(e,t){return F(e,t,s)}function W(e,t){return r(t,32),q(e,t)}function Z(e,t,n){var r=new Uint8Array(32);return F(r,n,t),v(e,i,r,w)}k.prototype.blocks=function(e,t,n){for(var r,i,s,a,o,c,u,l,h,d,p,f,y,m,g,b,v,w,x,S=this.fin?0:2048,P=this.h[0],T=this.h[1],k=this.h[2],M=this.h[3],A=this.h[4],V=this.h[5],N=this.h[6],E=this.h[7],I=this.h[8],H=this.h[9],O=this.r[0],C=this.r[1],L=this.r[2],U=this.r[3],B=this.r[4],z=this.r[5],R=this.r[6],j=this.r[7],D=this.r[8],X=this.r[9];n>=16;)d=h=0,d+=(P+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*O,d+=(T+=8191&(r>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*X),d+=(k+=8191&(i>>>10|(s=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*D),d+=(M+=8191&(s>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*j),h=(d+=(A+=8191&(a>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*R))>>>13,d&=8191,d+=(V+=o>>>1&8191)*(5*z),d+=(N+=8191&(o>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),d+=(E+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*U),d+=(I+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*L),p=h+=(d+=(H+=l>>>5|S)*(5*C))>>>13,p+=P*C,p+=T*O,p+=k*(5*X),p+=M*(5*D),h=(p+=A*(5*j))>>>13,p&=8191,p+=V*(5*R),p+=N*(5*z),p+=E*(5*B),p+=I*(5*U),h+=(p+=H*(5*L))>>>13,p&=8191,f=h,f+=P*L,f+=T*C,f+=k*O,f+=M*(5*X),h=(f+=A*(5*D))>>>13,f&=8191,f+=V*(5*j),f+=N*(5*R),f+=E*(5*z),f+=I*(5*B),y=h+=(f+=H*(5*U))>>>13,y+=P*U,y+=T*L,y+=k*C,y+=M*O,h=(y+=A*(5*X))>>>13,y&=8191,y+=V*(5*D),y+=N*(5*j),y+=E*(5*R),y+=I*(5*z),m=h+=(y+=H*(5*B))>>>13,m+=P*B,m+=T*U,m+=k*L,m+=M*C,h=(m+=A*O)>>>13,m&=8191,m+=V*(5*X),m+=N*(5*D),m+=E*(5*j),m+=I*(5*R),g=h+=(m+=H*(5*z))>>>13,g+=P*z,g+=T*B,g+=k*U,g+=M*L,h=(g+=A*C)>>>13,g&=8191,g+=V*O,g+=N*(5*X),g+=E*(5*D),g+=I*(5*j),b=h+=(g+=H*(5*R))>>>13,b+=P*R,b+=T*z,b+=k*B,b+=M*U,h=(b+=A*L)>>>13,b&=8191,b+=V*C,b+=N*O,b+=E*(5*X),b+=I*(5*D),v=h+=(b+=H*(5*j))>>>13,v+=P*j,v+=T*R,v+=k*z,v+=M*B,h=(v+=A*U)>>>13,v&=8191,v+=V*L,v+=N*C,v+=E*O,v+=I*(5*X),w=h+=(v+=H*(5*D))>>>13,w+=P*D,w+=T*j,w+=k*R,w+=M*z,h=(w+=A*B)>>>13,w&=8191,w+=V*U,w+=N*L,w+=E*C,w+=I*O,x=h+=(w+=H*(5*X))>>>13,x+=P*X,x+=T*D,x+=k*j,x+=M*R,h=(x+=A*z)>>>13,x&=8191,x+=V*B,x+=N*U,x+=E*L,x+=I*C,P=d=8191&(h=(h=((h+=(x+=H*O)>>>13)<<2)+h|0)+(d&=8191)|0),T=p+=h>>>=13,k=f&=8191,M=y&=8191,A=m&=8191,V=g&=8191,N=b&=8191,E=v&=8191,I=w&=8191,H=x&=8191,t+=16,n-=16;this.h[0]=P,this.h[1]=T,this.h[2]=k,this.h[3]=M,this.h[4]=A,this.h[5]=V,this.h[6]=N,this.h[7]=E,this.h[8]=I,this.h[9]=H},k.prototype.finish=function(e,t){var n,r,i,s,a=new Uint16Array(10);if(this.leftover){for(s=this.leftover,this.buffer[s++]=1;s<16;s++)this.buffer[s]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,s=2;s<10;s++)this.h[s]+=n,n=this.h[s]>>>13,this.h[s]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,a[0]=this.h[0]+5,n=a[0]>>>13,a[0]&=8191,s=1;s<10;s++)a[s]=this.h[s]+n,n=a[s]>>>13,a[s]&=8191;for(a[9]-=8192,r=(1^n)-1,s=0;s<10;s++)a[s]&=r;for(r=~r,s=0;s<10;s++)this.h[s]=this.h[s]&r|a[s];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,s=1;s<8;s++)i=(this.h[s]+this.pad[s]|0)+(i>>>16)|0,this.h[s]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},k.prototype.update=function(e,t,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r=16&&(i=n-n%16,this.blocks(e,t,i),t+=i,n-=i),n){for(r=0;r=128;){for(S=0;S<16;S++)P=8*S+G,E[S]=n[P+0]<<24|n[P+1]<<16|n[P+2]<<8|n[P+3],I[S]=n[P+4]<<24|n[P+5]<<16|n[P+6]<<8|n[P+7];for(S=0;S<80;S++)if(i=H,s=O,a=C,o=L,c=U,u=B,l=z,d=j,p=D,f=X,y=F,m=q,g=W,b=Z,M=65535&(k=K),A=k>>>16,V=65535&(T=R),N=T>>>16,M+=65535&(k=(q>>>14|U<<18)^(q>>>18|U<<14)^(U>>>9|q<<23)),A+=k>>>16,V+=65535&(T=(U>>>14|q<<18)^(U>>>18|q<<14)^(q>>>9|U<<23)),N+=T>>>16,M+=65535&(k=q&W^~q&Z),A+=k>>>16,V+=65535&(T=U&B^~U&z),N+=T>>>16,M+=65535&(k=Y[2*S+1]),A+=k>>>16,V+=65535&(T=Y[2*S]),N+=T>>>16,T=E[S%16],A+=(k=I[S%16])>>>16,V+=65535&T,N+=T>>>16,V+=(A+=(M+=65535&k)>>>16)>>>16,M=65535&(k=x=65535&M|A<<16),A=k>>>16,V=65535&(T=w=65535&V|(N+=V>>>16)<<16),N=T>>>16,M+=65535&(k=(j>>>28|H<<4)^(H>>>2|j<<30)^(H>>>7|j<<25)),A+=k>>>16,V+=65535&(T=(H>>>28|j<<4)^(j>>>2|H<<30)^(j>>>7|H<<25)),N+=T>>>16,A+=(k=j&D^j&X^D&X)>>>16,V+=65535&(T=H&O^H&C^O&C),N+=T>>>16,h=65535&(V+=(A+=(M+=65535&k)>>>16)>>>16)|(N+=V>>>16)<<16,v=65535&M|A<<16,M=65535&(k=y),A=k>>>16,V=65535&(T=o),N=T>>>16,A+=(k=x)>>>16,V+=65535&(T=w),N+=T>>>16,O=i,C=s,L=a,U=o=65535&(V+=(A+=(M+=65535&k)>>>16)>>>16)|(N+=V>>>16)<<16,B=c,z=u,R=l,H=h,D=d,X=p,F=f,q=y=65535&M|A<<16,W=m,Z=g,K=b,j=v,S%16==15)for(P=0;P<16;P++)T=E[P],M=65535&(k=I[P]),A=k>>>16,V=65535&T,N=T>>>16,T=E[(P+9)%16],M+=65535&(k=I[(P+9)%16]),A+=k>>>16,V+=65535&T,N+=T>>>16,w=E[(P+1)%16],M+=65535&(k=((x=I[(P+1)%16])>>>1|w<<31)^(x>>>8|w<<24)^(x>>>7|w<<25)),A+=k>>>16,V+=65535&(T=(w>>>1|x<<31)^(w>>>8|x<<24)^w>>>7),N+=T>>>16,w=E[(P+14)%16],A+=(k=((x=I[(P+14)%16])>>>19|w<<13)^(w>>>29|x<<3)^(x>>>6|w<<26))>>>16,V+=65535&(T=(w>>>19|x<<13)^(x>>>29|w<<3)^w>>>6),N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,E[P]=65535&V|N<<16,I[P]=65535&M|A<<16;M=65535&(k=j),A=k>>>16,V=65535&(T=H),N=T>>>16,T=e[0],A+=(k=t[0])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[0]=H=65535&V|N<<16,t[0]=j=65535&M|A<<16,M=65535&(k=D),A=k>>>16,V=65535&(T=O),N=T>>>16,T=e[1],A+=(k=t[1])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[1]=O=65535&V|N<<16,t[1]=D=65535&M|A<<16,M=65535&(k=X),A=k>>>16,V=65535&(T=C),N=T>>>16,T=e[2],A+=(k=t[2])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[2]=C=65535&V|N<<16,t[2]=X=65535&M|A<<16,M=65535&(k=F),A=k>>>16,V=65535&(T=L),N=T>>>16,T=e[3],A+=(k=t[3])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[3]=L=65535&V|N<<16,t[3]=F=65535&M|A<<16,M=65535&(k=q),A=k>>>16,V=65535&(T=U),N=T>>>16,T=e[4],A+=(k=t[4])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[4]=U=65535&V|N<<16,t[4]=q=65535&M|A<<16,M=65535&(k=W),A=k>>>16,V=65535&(T=B),N=T>>>16,T=e[5],A+=(k=t[5])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[5]=B=65535&V|N<<16,t[5]=W=65535&M|A<<16,M=65535&(k=Z),A=k>>>16,V=65535&(T=z),N=T>>>16,T=e[6],A+=(k=t[6])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[6]=z=65535&V|N<<16,t[6]=Z=65535&M|A<<16,M=65535&(k=K),A=k>>>16,V=65535&(T=R),N=T>>>16,T=e[7],A+=(k=t[7])>>>16,V+=65535&T,N+=T>>>16,N+=(V+=(A+=(M+=65535&k)>>>16)>>>16)>>>16,e[7]=R=65535&V|N<<16,t[7]=K=65535&M|A<<16,G+=128,r-=128}return r}function Q(e,t,n){var r,i=new Int32Array(8),s=new Int32Array(8),a=new Uint8Array(256),o=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,s[0]=4089235720,s[1]=2227873595,s[2]=4271175723,s[3]=1595750129,s[4]=2917565137,s[5]=725511199,s[6]=4215389547,s[7]=327033209,J(i,s,t,n),n%=128,r=0;r=0;--i)$(e,t,r=n[i/8|0]>>(7&i)&1),_(t,e),_(e,e),$(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];E(r[0],h),E(r[1],d),E(r[2],o),R(r[3],h,d),te(e,r,n)}function re(e,n,i){var s,a=new Uint8Array(64),o=[t(),t(),t(),t()];for(i||r(n,32),Q(a,n,32),a[0]&=248,a[31]&=127,a[31]|=64,ne(o,a),ee(e,o),s=0;s<32;s++)n[s+32]=e[s];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function se(e,t){var n,r,i,s;for(r=63;r>=32;--r){for(n=0,i=r-32,s=r-12;i>4)*ie[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*ie[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function ae(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;se(e,n)}function oe(e,n,r,i){var s,a,o=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),h=[t(),t(),t(),t()];Q(o,i,32),o[0]&=248,o[31]&=127,o[31]|=64;var d=r+64;for(s=0;s>7&&z(e[0],a,e[0]),R(e[3],e[0],e[1]),0)}(d,i))return-1;for(s=0;s=0},e.sign.keyPair=function(){var e=new Uint8Array(he),t=new Uint8Array(de);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(fe(e),e.length!==de)throw new Error("bad secret key size");for(var t=new Uint8Array(he),n=0;n{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new i(r,s||e,a),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,a=new Array(s);i{t.read=function(e,t,n,r,i){var s,a,o=8*i-r-1,c=(1<>1,l=-7,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,s=p&(1<<-l)-1,p>>=-l,l+=o;l>0;s=256*s+e[t+h],h+=d,l-=8);for(a=s&(1<<-l)-1,s>>=-l,l+=r;l>0;a=256*a+e[t+h],h+=d,l-=8);if(0===s)s=1-u;else{if(s===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),s-=u}return(p?-1:1)*a*Math.pow(2,s-r)},t.write=function(e,t,n,r,i,s){var a,o,c,u=8*s-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,f=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+h>=1?d/c:d*Math.pow(2,1-h))*c>=2&&(a++,c/=2),a+h>=l?(o=0,a=l):a+h>=1?(o=(t*c-1)*Math.pow(2,i),a+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&o,p+=f,o/=256,i-=8);for(a=a<0;e[n+p]=255&a,p+=f,a/=256,u-=8);e[n+p-f]|=128*y}},406:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var o,c=[],u=!1,l=-1;function h(){u&&o&&(u=!1,o.length?c=o.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(o=c,c=[];++l1)for(var n=1;n{var r=n(595),i=n(120),s=[n(225)];e.exports=r.createStore(i,s)},225:(e,t,n)=>{e.exports=function(){return n(414),{}}},414:()=>{"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,a,o=gap,c=t[e];switch(c&&"object"==typeof c&&"function"==typeof c.toJSON&&(c=c.toJSON(e)),"function"==typeof rep&&(c=rep.call(t,e,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(c)){for(s=c.length,n=0;n{var r=n(511),i=r.slice,s=r.pluck,a=r.each,o=r.bind,c=r.create,u=r.isList,l=r.isFunction,h=r.isObject;e.exports={createStore:p};var d={version:"2.0.12",enabled:!1,get:function(e,t){var n=this.storage.read(this._namespacePrefix+e);return this._deserialize(n,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(n,r){e.call(t,t._deserialize(n),(r||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return p.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return p(this.storage,this.plugins,e)}};function p(e,t,n){n||(n=""),e&&!u(e)&&(e=[e]),t&&!u(t)&&(t=[t]);var r=n?"__storejs_"+n+"_":"",p=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var f=c({_namespacePrefix:r,_namespaceRegexp:p,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var n=e.read(t)===t;return e.remove(t),n}catch(e){return!1}},_assignPluginFnProp:function(e,t){var n=this[t];this[t]=function(){var t=i(arguments,0),r=this;function s(){if(n)return a(arguments,(function(e,n){t[n]=e})),n.apply(r,t)}var o=[s].concat(t);return e.apply(r,o)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var n="";try{n=JSON.parse(e)}catch(t){n=e}return void 0!==n?n:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(u(e))a(e,(function(e){t._addPlugin(e)}));else if(!s(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!l(e))throw new Error("Plugins must be function values that return objects");var n=e.call(this);if(!h(n))throw new Error("Plugins must return an object of function properties");a(n,(function(n,r){if(!l(n))throw new Error("Bad plugin property: "+r+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(n,r)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;e&&(e.warn?e.warn:e.log).apply(e,arguments)}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},d,{plugins:[]});return f.raw={},a(f,(function(e,t){l(e)&&(f.raw[t]=o(f,e))})),a(e,(function(e){f._addStorage(e)})),a(t,(function(e){f._addPlugin(e)})),f}},511:(e,t,n)=>{var r=Object.assign?Object.assign:function(e,t,n,r){for(var i=1;i{e.exports=[n(367),n(26),n(240),n(362),n(109),n(884)]},362:(e,t,n)=>{var r=n(511),i=r.Global,s=r.trim;e.exports={name:"cookieStorage",read:function(e){if(!e||!u(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){e&&(a.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:o,remove:c,clearAll:function(){o((function(e,t){c(t)}))}};var a=i.document;function o(e){for(var t=a.cookie.split(/; ?/g),n=t.length-1;n>=0;n--)if(s(t[n])){var r=t[n].split("="),i=unescape(r[0]);e(unescape(r[1]),i)}}function c(e){e&&u(e)&&(a.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},367:(e,t,n)=>{var r=n(511).Global;function i(){return r.localStorage}function s(e){return i().getItem(e)}e.exports={name:"localStorage",read:s,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(s(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},884:e=>{e.exports={name:"memoryStorage",read:function(e){return t[e]},write:function(e,n){t[e]=n},each:function(e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},remove:function(e){delete t[e]},clearAll:function(e){t={}}};var t={}},26:(e,t,n)=>{var r=n(511).Global;e.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:s,remove:function(e){return i.removeItem(e)},clearAll:function(){s((function(e,t){delete i[e]}))}};var i=r.globalStorage;function s(e){for(var t=i.length-1;t>=0;t--){var n=i.key(t);e(i[n],n)}}},240:(e,t,n)=>{var r=n(511).Global;e.exports={name:"oldIE-userDataStorage",write:function(e,t){if(!o){var n=u(e);a((function(e){e.setAttribute(n,t),e.save(i)}))}},read:function(e){if(!o){var t=u(e),n=null;return a((function(e){n=e.getAttribute(t)})),n}},each:function(e){a((function(t){for(var n=t.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=u(e);a((function(e){e.removeAttribute(t),e.save(i)}))},clearAll:function(){a((function(e){var t=e.XMLDocument.documentElement.attributes;e.load(i);for(var n=t.length-1;n>=0;n--)e.removeAttribute(t[n].name);e.save(i)}))}};var i="storejs",s=r.document,a=function(){if(!s||!s.documentElement||!s.documentElement.addBehavior)return null;var e,t,n;try{(t=new ActiveXObject("htmlfile")).open(),t.write('